Okay sorry I haven't started the tutorials yet. I've been kind of busy lately between my senior project and my own personal projects, and I actually wrote the first part twice, but both times my browser crashed before I could post it (or I accidentally closed the post reply...)
|
|
# ? Sep 19, 2008 13:02 |
|
|
# ? May 21, 2024 19:14 |
|
SnoPuppy posted:All I meant is that straight C is pretty low level. There are very few things that you could do that wouldn't be obvious how to do in assembly. And, unless it relies on some obscure opcode, you can generally turn assembly into C. No, most hand-written Assembly code doesn't have an analog in C. It's hard enough to accurately decompile a program written in C back into C. Edit: For instance, a lot of hand-written Assembly code will do fancy things with CPU registers and the stack (if applicable on your hardware) that you can't represent in C because C abstracts both of those things. Hand-written subroutines and flow control and often look and act nothing like C functions and flow control statements as well. BattleMaster fucked around with this message at 19:08 on Sep 23, 2008 |
# ? Sep 23, 2008 18:46 |
|
BattleMaster posted:No, most hand-written Assembly code doesn't have an analog in C. It's hard enough to accurately decompile a program written in C back into C. Initially I was referring to a RISC ISA, which generally doesn't have too many 'fancy' instructions. I will grant you that a CISC ISA will be significantly more complicated, although usually that just moves the advantage to the compiler (because its easier for a tool to deal with all the different instructions). Lets take a look at a common RISC architecture, MIPS. You can do basic math (add/sub/mult/div) and basic logic operations (as well as shifts). There are a handful of compare, branch and jump instructions (6-7 maybe?) and a few ways to address memory. Nothing is very fancy and its pretty easy to see how you would accomplish the same thing in C. Granted, depending which compiler is used, the results may be very different, but I imagine that a good compiler could produce similar code. This is especially true if the coder understands the hardware and how the compiler will generate instructions. I think its important to understand assembly - knowing the hardware makes you a more efficient coder. Its just that C is much easier to read and faster to code.
|
# ? Sep 23, 2008 21:18 |
|
BattleMaster posted:No, most hand-written Assembly code doesn't have an analog in C. It's hard enough to accurately decompile a program written in C back into C. We're all talking* about a modern RISC modified Harvard architecture that was designed with C compilers in mind. Its much, much, more obvious what is going on when you write a line of C compared to something like a HC11 or 8051. *I assume we were all referring to AVRs... hobbesmaster fucked around with this message at 00:35 on Sep 24, 2008 |
# ? Sep 24, 2008 00:30 |
|
Hey don't get me wrong, I love both C and Assembly for different jobs. I just object when people say that C is 'just' a set of macros for Assembly. If you program in Assembly the same way a C compiler generates code you may as well just use C instead! The compiler will do a lot of things that are a hassle to have to do by hand. There are a few things that translate fairly directly like assignment and arithmetic, but just write and call a few functions in C for your favourite embedded system and take a look at the code it generates and you'll see what I mean. I didn't say anything about 'fancy' instructions, I was just using that to say that programmers writing in Assembly will use 'fancy' tricks to tailor the code to the job that won't quite be like anything a C compiler could generate. Maybe it was a bad choice of words, but I don't think most people will want to put the effort in to write Assembly code in the same way that C compiler generates it. hobbesmaster posted:We're all talking* about a modern RISC modified Harvard architecture that was designed with C compilers in mind. Its much, much, more obvious what is going on when you write a line of C compared to something like a HC11 or 8051. I was mostly going after the statement about how hand-written Assembly code translates 1:1 into C most of the time. It's nowhere close to that, even on platforms designed with C in mind, unless you put in a conscious effort to act like a compiler. BattleMaster fucked around with this message at 00:56 on Sep 24, 2008 |
# ? Sep 24, 2008 00:42 |
|
I'm starting a Degree course on monday in Electronics and Communications Engineering at the University of Kent. Definitely looking forward to it, though I've realised I've forgotten the small amount we learnt about electronics from A-Level
|
# ? Sep 24, 2008 14:12 |
|
What materials can be used to insulate speaker wire from emi? I have 4ga and 8ga power/speaker wires running near some RCA and I think I'm getting interference from the power wires.
|
# ? Sep 25, 2008 03:31 |
|
Unless it is a FUCKTON of power, interference is probably not occurring from wire to wire. Are the ends of the wires connected properly? What makes you suspect they might be interfering?
|
# ? Sep 25, 2008 03:43 |
|
I have 220W@4ohm + 1600W@2ohm MAX amps (Kicker, Phoenix Gold). Disconnect the RCA's from the PG amp and the alternator whine/all noise goes away even though the Kicker is still hooked up and working. I'm using 8ga power wire for speaker wire to my sub, so it's kinda hard to shove into the amp's speaker wire holes. And the speaker wire is inches away from the RCA wire(they intersect, don't run parallel).
tokki g fucked around with this message at 03:58 on Sep 25, 2008 |
# ? Sep 25, 2008 03:51 |
|
I still haven't touched my radio yet, HiroshigeStations, but I am going to give another try to building a FAN5607 LED dimmer. Last time I attempted this I just couldn't get it to work. I'm either overheating the Surface mount chip or I'm not using the proper caps. He said he was using hard drive caps, but I was using some caps off an old CD player. here's a link to the project I'm trying to copy. obelix from mobileread.com posted:Reading at night is very important for me. With REB 1100 I had a great night reading, so I spent some time to find the best solution for my new Sony 500. Can anyone tell me if I'm building this correctly? The originator is russian and couldn't help me too much. Here's my circuit. Click here for the full 1632x1224 image. Here's his circuit. Click here for the full 923x336 image. And here's the circuit from the chip manual
|
# ? Sep 25, 2008 14:19 |
|
Vaporware posted:And here's the circuit from the chip manual I think your LED might be hooked up backwards. You have pin 7 shown as LED- and pin 16 as LED+ in your first photograph, but the schematic I quoted has it the other way around.
|
# ? Sep 25, 2008 18:22 |
|
What does everyone do with regards to component storage? Giant tacklebox, those plastic mini-drawer units? (problem with static? who knows) I'm finding it increasingly difficult to stay organized, and I have a giant box full of random junk that's 2 feet deep. 90% of my components stay in the ziplock bags that digikey and mouser sent me. This is driving me completely mad.
|
# ? Sep 25, 2008 23:50 |
|
tokki g posted:What materials can be used to insulate speaker wire from emi? I have 4ga and 8ga power/speaker wires running near some RCA and I think I'm getting interference from the power wires. You could always try looping the noisy wire through a ferrite. Grounded shielded cable (even at just the intersection point) is also an option.
|
# ? Sep 26, 2008 03:12 |
|
Vaporware posted:I still haven't touched my radio yet, HiroshigeStations, but I am going to give another try to building a FAN5607 LED dimmer. Last time I attempted this I just couldn't get it to work. I think you may have wired up your chip wrong. The datasheet shows a top-down view of the chip with Pin 1(EN) on the top left side. The pins are then numbered counterclockwise. Here's how you should have it (my edits in red): Click here for the full 1632x1224 image. I believe you need to tie EN high to max the LEDs, though if it has an internal pull-up you may be able to leave it floating. You may have fried the chip, so if you wire it correctly and it still doesn't work that may be the cause.
|
# ? Sep 26, 2008 03:42 |
|
RiskyChris posted:What does everyone do with regards to component storage? Giant tacklebox, those plastic mini-drawer units? (problem with static? who knows) I'm starting to lose it too. I had one of those mini-drawer units but then it became too small to hold a decent selection of passive components. Then I switched to using it for ICs and put the resistors into little plastic containers like craft stores sell to sort beads in. This would work except my symmetry sense is offended when I can't fit an entire decade of standard values into one container. I don't know if there is a good solution. The easy to use ones take up too much space (drawer units) and the space saving ways (ziplocs in a box) turn into a mess.
|
# ? Sep 26, 2008 04:15 |
|
I have no doubt I killed that chip. Lucky I planned ahead and bought 5. I need a new soldering iron tip before I try the next one. I can't get good contact with all the corrosion on mine.
|
# ? Sep 26, 2008 12:44 |
|
Vaporware posted:I have no doubt I killed that chip. Lucky I planned ahead and bought 5. I need a new soldering iron tip before I try the next one. I can't get good contact with all the corrosion on mine. Steel Wool might fix that tip temporarily. You should get some flux and rosin (cleaner) when you buy the new tips. Also, always tin the tip with fresh solder before turning off the iron.
|
# ? Sep 26, 2008 15:09 |
|
I ground off the corrosion with a dremel, but it turns out I tossed my lightwedge out in my last house clean-up. So I'm back to the drawing board. I picked up an LM2703 evaluation board to drive the LEDs, but I need to figure out how to dim them. (click for spec sheet PDF) 1 SW Power Switch input. 2 GND Ground. 3 FB Output voltage feedback input. 4 SHDN Shutdown control input, active low. 5 VIN Analog and Power input. I am totally clueless, I thought the spec sheet would explain a bit more about this, but it's over my head. I know I need to reduce Iout, but I don't see a way to do that. This eval circuit seems to only take 2-7V in and output 20V @15mA. There's a VSW connection, but I don't see how I could use it. Is there a way to reduce Iout?
|
# ? Oct 1, 2008 02:12 |
|
Iout will depend on the value of a resistor you place between the output of this circuit (top of Cout) and the LED. In this case, 20V is your output voltage, so Iout will equal 20V divided by your resistor value (ie a 10K resistor would make it 2mA). How much current do your LEDs require? You can use a switch to change between values of R, or put in a variable resistor. The SW on that chip has to do with it being a switching power supply. Read around page 8 of that data sheet, it explains the way it operates.
|
# ? Oct 1, 2008 05:48 |
|
So I can just modify the output with a pot? I'm just running generic white LEDs (a wide angle and a standard 90deg one) both kinds are 3.5V@20mA models with a on/off around 2.75V@4mA. I have a couple of leftover pots, a 167k and a 500k, I can probably build a nice little dimmer switch using those and the resistor combination rules. I'm planning on powering from an old cell phone battery, but I can work on that when I've got the actual lighting finished.
|
# ? Oct 1, 2008 11:23 |
|
Yeah that should work. I haven't really had a chance to look at the datasheet to see how much current this can source, so if you use the example schematic, make sure 15mA is enough. Also, make sure the resistor(s) you use are appropriately sized for the power (P=(I^2)*R) going through them.
|
# ? Oct 1, 2008 21:29 |
Vaporware posted:I ground off the corrosion with a dremel, but it turns out I tossed my lightwedge out in my last house clean-up. Okay, hang on. First of all, the max output voltage on this chip is 20V so I would try for something lower first while still experimenting. Second, for driving LEDs you may want to run this thing in a current feedback more rather than in voltage feedback. Remember that the device operates by trying to keep the voltage at its feedback pin at around 1.25V. Therefore by putting a resistor from FB to ground, the current over this resistor when the output is regulated properly will be some constant (since the voltage is also constant and so is resistance). Therefore it functions effectively as a current regulator. By using a resistor between Vout and FB (R2 in your picture), we obtain a voltage regulator. Generally, most regulators with external feedback like this one can be made to run as a current regulator as well as a voltage regulator. You just use R1 to determine the current you want (current will equal the feedback voltage, around 1.25V, divided by R1) and put your load from Vout to FB. This is a very common way to drive LEDs, since LEDs are best controlled by current, not voltage. Here's a datasheet for the part I found. Look at figure 4 on page 9, and it shows a schematic of exactly this. http://symmetrongroup.ru/extra/ns/LM2703.pdf you can vary current simply by changing R2 (just make sure it can't go too low, like maybe 30ohms minimum). Remember, the maximum output voltage is 20V, so don't put to many LEDs in series. You Vout should be the feedback voltage plus the combined forward voltage of the LEDs (white leds have a Vf of 3-3.5V, so four is the most you can safely get). Also make sure your output bypass capacitor is suited to high frequencies. Electrolytics won't cut it. Get a decent ceramic cap. How many LEDs do you want to drive? There are simple tricks that you could use to drive many more than four with this IC.
|
|
# ? Oct 2, 2008 18:06 |
|
Well, my original intent was to build a better lightwedge frontlight for my ebook. I would be driving 4 LEDs for more even lighting, but I wanted to also be able to dim them for more pleasant nightime reading.
|
# ? Oct 2, 2008 18:58 |
|
I'm working on a project that uses different leds at the same time. How would I lay out the circuit here: 4x AA Rechargables: ~5V Source. 5x blue leds 3.5V drop @ 35mA (in series using a 1x 1W 10ohm resistor for 30mA each led) 4x red leds 2.5V drop @ 70mA (in series using a 1x 1W 10ohm resistor for 62.5mA each led) Right now they are separate cicuits(batteries + red leds OR batteries + blue leds). I would like to be able to link them. I'm assuming I need some high wattage rating resistors. I also have a 7.2V rechargeable pack if I need to split them.
|
# ? Oct 7, 2008 17:02 |
|
I know its a long shot, but I have an electronics related question and this seemed like the best place to ask it. I have some 40 KHz ultrasonic transducers that I am using as a pulser/receiver pair. I am able to transmit and receive pulses just fine, but I am trying to get high range resolution and am running into some issues. It appears that my receiver continues to oscillate after the receive echos, giving me what looks like a longer pulse. This is bad, because two objects that are close together are not distinguishable (their echos overlap). Is this just a function of my cheap rear end transducers? Or is there something that can be done to reduce this echo? Right now the RX side is just AC coupled into an A/D. Originally I was going to try to send a coded pulse out and convolve the echo with the transmitted pulse to compress my returns (similar to RADAR), but this ringing effect makes that almost impossible.
|
# ? Oct 7, 2008 17:16 |
|
this thread is pretty drat cool, and inspired me to mess around with the idea of creating an LED desklight from 42 leds, using [url]this[/url=http://led.linear1.org/led.wiz] as a starting point. im using a 12 volt source (initally a battery, then maybe replace it with a laptop power supply I have lying around, also 12v) and the forward voltage on each led is 3.5v and forward current is 20mA. the wizard tells m that I need to use 82 om resistors for each 3 leds in parralel. ive recreated it in the java circuit simulator to post here, before I go out and by the poarts necessary, is there any thing that Im missing or should be doing differently? I want to keep it really simple for the first time and I'm not too concerned with light output, ill be happy if the thing lights up once ive soldred everything together. any help appreciated
|
# ? Oct 7, 2008 17:39 |
|
Eamonn posted:Otherwise it looks good, though.
|
# ? Oct 7, 2008 18:45 |
|
That should work. 12-(3.5*3)=1.5V 1.5V/82ohm ~= 18mA. It's hard to tell where your power and ground are on that picture, so I'm assuming power comes in on the top left and ground is on the bottom right. Eamonn posted:...that I need to use 82 om resistors for each 3 leds in parralel... This is just nitpicky, but you probablty meant that you have sets of 3 LEDs in parallel. The 3 LEDs of each set are in series.
|
# ? Oct 7, 2008 18:47 |
|
I did some ultrasonics range sensing a long time ago- so take with a grain of salt:SnoPuppy posted:I have some 40 KHz ultrasonic transducers that I am using as a pulser/receiver pair. I am able to transmit and receive pulses just fine, but I am trying to get high range resolution and am running into some issues. It appears that my receiver continues to oscillate after the receive echos, giving me what looks like a longer pulse. This is bad, because two objects that are close together are not distinguishable (their echos overlap). quote:Originally I was going to try to send a coded pulse out and convolve the echo with the transmitted pulse to compress my returns (similar to RADAR) The maxbotix sonar board has gotten some good reviews. Here's their FAQ: http://www.maxbotix.com/MaxSonar-EZ1__FAQ.html
|
# ? Oct 8, 2008 01:22 |
|
Cross_ posted:I did some ultrasonics range sensing a long time ago- so take with a grain of salt: I appreciate the response! I am actually using a 500 Kilo-sample/second A-D converter to sample the return echos (after they have been amplified), so I get the raw 40 KHz return echos with which to do signal processing on. Right now I am just sending a burst of 10 cycles out and listening for the return echo. What I want to try to do is selectively invert the phase of the transmitted burst (i.e. two cycles at 0 deg, three at 180 deg, another at 0 deg, etc). Basically binary phase shift keying. By doing this, you get a signal that has very nice auto correlation properties (see: http://en.wikipedia.org/wiki/Barker_code). It allows you to spread your tx power out over time, so that you don't have to have a really high powered pulse, while still giving the resolution of a very narrow pulse. If you tried this with a normal burst, you wouldn't be able to distinguish between objects that are close together because the echos overlap. This might explain it a bit better: http://en.wikipedia.org/wiki/Pulse_compression The problem is that it requires you to shift and detect phase changes in only a few cycles. Since my receiver seems to ring, I can't detect the alternating phase of the echo (it just looks like a long burst). I suppose I could try to send an FM chirp - it has similar auto correlation properties, but unfortunately most ultrasonic transducers have a very narrow bandwidth (bad for a chirp). Either way, it might be the best I can do.
|
# ? Oct 8, 2008 02:17 |
|
Hillridge posted:This is just nitpicky, but you probablty meant that you have sets of 3 LEDs in parallel. The 3 LEDs of each set are in series. Additionally the LED manufacturers recommend that each LED is placed in parallel with a resistor for the most even illumination. Even from the same batch LEDs have enough variation to have some brighter and some darker in a series layout.
|
# ? Oct 8, 2008 02:40 |
|
nmfree posted:The way this diagram is drawn up I don't think it's going to work, or at least work the way you want. If you go back to the website you linked and generate their schematic again, that's what you need to do, which is wire the groups of 3 LEDs/1 reisitor in parallel, using the positive and negative terminals of the battery as a common feed for the respective side of the array. ya, I wasn't sure how to make it exactly like the diagram generated on the website, but I see what you mean. Also I meant parrallel. whoopsies
|
# ? Oct 8, 2008 03:26 |
|
Vaporware posted:Additionally the LED manufacturers recommend that each LED is placed in parallel with a resistor for the most even illumination. Even from the same batch LEDs have enough variation to have some brighter and some darker in a series layout. even illumination isn't an issue at this point, for the first time around I'm trying to keep it simple, but hopefully usable in the end.
|
# ? Oct 8, 2008 03:27 |
|
Well the nice guys at Cypress Semi came to my school the other day and gave us a tour of their product and some free samples. They make the PSoC, Programmable System on a Chip, and it looks to be a pretty cool device for beginners and advanced users. Its a mixed signal array that lets you put both digital and analog components on the chip and it also has a relatively fast micro controller on it. For beginners it has a really simple drag and drop interface and for advanced users you can program the micro controller and pretty much design your own blocks for the analog/digital sections. The software is free to futz around with too so if you want to just see what developing for one would be like you can. If you are a student and shoot them an e-mail i would think you could work out a deal where you can get a discount or an eval board. Their page is really terrible for linking so if you want to check them out go to cypress.com and look into the "PSoC EVAL1 Academic Development Kit" in the store. I haven't really messed around with one yet but from the limited stuff i've done they seem to be a great way to do somewhat advanced stuff, like controlling an LCD or using an ADC, with very minimal coding.
|
# ? Oct 9, 2008 15:19 |
|
MAH POKEYMANS posted:I haven't really messed around with one yet but from the limited stuff i've done they seem to be a great way to do somewhat advanced stuff, like controlling an LCD or using an ADC, with very minimal coding. Don't worry, you'll hate it with a passion soon enough.
|
# ? Oct 12, 2008 05:52 |
SnoPuppy posted:I know its a long shot, but I have an electronics related question and this seemed like the best place to ask it. What kind of transducers are you using? Do they require a DC bias to set the diaphragm tension? If so, the bias level may be a factor. It effectively acts to dampen the elastic membrane's motion, so if it's underdamped you'll get some ringing, whereas if it's overdamped you'll have slow response time. My senior project happens to be SODAR ranging (though it uses a continuous signal instead of pulses). Pretty cool stuff. The effective Q of your transducer and conditioning circuitry will inherently cause some ringing; there is no way around that. Also it sounds like you're shooting for a really high data rate on a slow carrier. In general the carrier frequency should be at least ten times the baud rate, if not hundreds. ANIME AKBAR fucked around with this message at 02:07 on Oct 13, 2008 |
|
# ? Oct 13, 2008 01:58 |
|
hobbesmaster posted:Don't worry, you'll hate it with a passion soon enough. Well i have used the PSoC a bit over the weekend and am still undecided on it. I think if I had no idea how to program a microcontroller I would think this is the greatest thing ever. The problem I have is I know what I want to do but it is incredibly hard to describe with some simple graphical blocks and transfer functions. For example I wanted to make a variable pulse PWM to control a servo. In the PSoC it took me about an hour to figure out the logic behind it. On my mega16 it took about 10minutes to figure out the timer preloads and set all the registers I needed. I think what it comes down to is how well you are planned to do your project. If you have everything planned out ahead of time, flow charts and all that jazz, you will be able to implement it on a real micro faster. However, if you have a vague idea of what you want to do a PSoC might be a bit better. I haven't really tooled around with the analog portion of the chip yet but it looks pretty cool
|
# ? Oct 13, 2008 07:20 |
|
Can I contract anyone here to make a sweet Ironman arc reactor for halloween? When it comes to solder, my hands are michael j foxish.
|
# ? Oct 13, 2008 11:53 |
|
mtwieg posted:What kind of transducers are you using? Do they require a DC bias to set the diaphragm tension? If so, the bias level may be a factor. It effectively acts to dampen the elastic membrane's motion, so if it's underdamped you'll get some ringing, whereas if it's overdamped you'll have slow response time. The transducers I am using are very cheap - 5 bucks at sparkfun. I have pretty much given up on using them for high bandwidth/high resolution sensing, just due to the bandwidth limitations (only ~4KHz so I am limited to ~10cm). I can get the first echo just fine, but if I have objects which are close together, I just get one big echo instead of two distinct ones (due to the bandwidth issues). And you're right of course about the high data rates for such a low bandwidth system. The SODAR sounds interesting - how does it work with a continuous wave? Wouldn't there be range ambiguity at every wavelength multiple (or do you use multiple receivers in a bistatic configuration)?
|
# ? Oct 13, 2008 17:48 |
|
|
# ? May 21, 2024 19:14 |
SnoPuppy posted:The transducers I am using are very cheap - 5 bucks at sparkfun. I have pretty much given up on using them for high bandwidth/high resolution sensing, just due to the bandwidth limitations (only ~4KHz so I am limited to ~10cm). I can get the first echo just fine, but if I have objects which are close together, I just get one big echo instead of two distinct ones (due to the bandwidth issues). And you're right of course about the high data rates for such a low bandwidth system. quote:The SODAR sounds interesting - how does it work with a continuous wave? Wouldn't there be range ambiguity at every wavelength multiple (or do you use multiple receivers in a bistatic configuration)? I'm not in charge of handling that data processing, though. I design the PCBs and the analog stuff. ANIME AKBAR fucked around with this message at 22:16 on Oct 13, 2008 |
|
# ? Oct 13, 2008 22:13 |