• Electronics and Embedded Programming V2
    1,309 replies, posted
  • [QUOTE=benjojo;31666793]Does Gumtix have UART? If so use that?[/QUOTE] Thanks, I also found out that gumstix uses i2c.
  • [QUOTE=Protocol7;31672946]I have an old broken harddrive stripped apart. Time to fuck with the motor :v:.[/QUOTE] Good luck. I got nowhere with my back-emf sensing BLDC motor driver. Funny thing is, each of the individual parts seemed to work fine. Zero-crossing detector worked fine, the constant acceleration spin-up routine seemed OK (after a little debugging), etc. But when I put it all together it just sat there like a lump of spaghetti. Probably doesn't help that I don't have any of the proper tools...
  • [img]http://i.imgur.com/5dzeF.jpg[/img] I was not expecting this when I lifted the mystery SOIC part, has to be one of the more unusual things I've found.
  • I think I may have fried my arduino. Yesterday, I had it working nicely, powering my 10 meters of a total of 600 RGB Leds. Then, today I plug it in and the program that's in there is acting VERY strangely (really slow responce time, not doing correct colors, etc.) and I haven't touched it since yesterday. The power was unplugged (when I wasn't using it). So I think that maybe the program got corrupted. So I go to re-upload it and here's exactly what happens (Arduino Uno): Click upload. Wait 1/2/3 seconds. L flashes. RX flashes 3 times in succession (100-300 ms apart). Then the IDE says, "avrdude: stk500_getsync(): not in sync: resp=0x00 avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51" Any ideas?
  • [QUOTE=bobthe2lol;31676288]I think I may have fried my arduino. Yesterday, I had it working nicely, powering my 10 meters of a total of 600 RGB Leds. Then, today I plug it in and the program that's in there is acting VERY strangely (really slow responce time, not doing correct colors, etc.) and I haven't touched it since yesterday. The power was unplugged (when I wasn't using it). So I think that maybe the program got corrupted. So I go to re-upload it and here's exactly what happens (Arduino Uno): Click upload. Wait 1/2/3 seconds. L flashes. RX flashes 3 times in succession (100-300 ms apart). Then the IDE says, "avrdude: stk500_getsync(): not in sync: resp=0x00 avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51" Any ideas?[/QUOTE] Make sure you are programming it correctly. But it sounds to me like you've damaged it, powering 600 LEDs directly will almost certainly exceed the maximum pin current.
  • [QUOTE=Chryseus;31676685]Make sure you are programming it correctly. But it sounds to me like you've damaged it, powering 600 LEDs directly will almost certainly exceed the maximum pin current.[/QUOTE] So... How should I power them? I got the 12v 5a power supply from adafruit, and it has a connector that I don't think I should just wrap a wire around and stick in the led strip. And doesn't the board have overcurrent protection?
  • Maximum pin current is 40mA. Small LEDs can draw 20mA each. 600*20 = 12000mA. 12000 > 40 Hope you had a nice big FET driving those LEDs. [QUOTE=bobthe2lol;31677224]And doesn't the board have overcurrent protection?[/QUOTE] No, because you shouldn't be powering anything through an I/O pin. They're strictly for signalling. You need a power transistor to switch larger loads.
  • [QUOTE=bobthe2lol;31677224]So... How should I power them? I got the 12v 5a power supply from adafruit, and it has a connector that I don't think I should just wrap a wire around and stick in the led strip. And doesn't the board have overcurrent protection?[/QUOTE] You make use of a transistor like this: [img]http://www.ladyada.net/images/tvbgone/transistordrive.jpg[/img] [QUOTE=ROBO_DONUT;31677258]Maximum pin current is 40mA. Small LEDs can draw 20mA each. 600*20 = 12000mA. 12000 > 40 [/QUOTE] They are probably in mixed series / parallel configuration with reduced current such as 4mA per branch.
  • There's no load resistor on that LED... [QUOTE=Chryseus;31677302]You make use of a transistor like this: [img]They are probably in mixed series / parallel configuration with reduced current such as 4mA per branch.[/QUOTE] Using a 12V supply, you can have no more than 6 in series, which means 100 strands in parallel. That's still well over 10 times the rated current.
  • [QUOTE=ROBO_DONUT;31677336]There's no load resistor on that LED...[/QUOTE] Good job spotting that I just quickly grabbed an image from Google. This is more like it: [img]http://hades.mech.northwestern.edu/images/d/d6/Transistor_common_emitter.gif[/img] Actual value for the base resistor depends on load, you can work it out as follows: 1. Find the maximum load current 2. Find the required base current (Iload / 10) {10 is a good low current gain as might be expected in a average transistor} 3. Using the base current work out the resistor size ((Vpin - Vbe) / Ibase)
  • [QUOTE=ROBO_DONUT;31677258]Maximum pin current is 40mA. Small LEDs can draw 20mA each. 600*20 = 12000mA. 12000 > 40 Hope you had a nice big FET driving those LEDs. No, because you shouldn't be powering anything through an I/O pin. They're strictly for signalling. You need a power transistor to switch larger loads.[/QUOTE] Well, I'm not very good at electronics and math, but I did follow the tutorial, and it involved using 3 MOSFETS (whatever those are) and connecting the 12v line of the led strips to Vin on the board, so I wasn't powering them via the I/O pins. I belive I had the left line of the mosfet connected to the pwm pins for brightness modulation. I wired it up like in the picture here: [t]http://www.ladyada.net/wiki/_media/products/rgbledstrip/ledstripfet.gif[/t]
  • [QUOTE=bobthe2lol;31677501]Well, I'm not very good at electronics and math, but I did follow the tutorial, and it involved using 3 MOSFETS (whatever those are) and connecting the 12v line of the led strips to Vin on the board, so I wasn't powering them via the I/O pins. I belive I had the left line of the mosfet connected to the pwm pins for brightness modulation.[/QUOTE] It sounds like you had everything set up right. Your board shouldn't be damaged. Perhaps it's a software issue?
  • [QUOTE=ROBO_DONUT;31677592]It sounds like you had everything set up right. Your board shouldn't be damaged. Perhaps it's a software issue?[/QUOTE] What sort of software issue? The only thing I can think of is that the bootloader got corrupted, and I can't really fix that without some piece of equipment right (or another arduino, I kind of want a Mega... more pins)?
  • [QUOTE=bobthe2lol;31677655]What sort of software issue? The only thing I can think of is that the bootloader got corrupted, and I can't really fix that without some piece of equipment right (or another arduino, I kind of want a Mega... more pins)?[/QUOTE] You can reprogram AVRs using the parallel port and three resistors.
  • [QUOTE=ROBO_DONUT;31678365]You can reprogram AVRs using the parallel port and three resistors.[/QUOTE] Well, here's hoping that he actually has a parallel port on his motherboard, if that's the case. @bob2thelol: do you get any different results if you unhook everything from the arduino and just use it from USB power with something simple like the blink sketch? It's a long shot, but it can't hurt.
  • [QUOTE=Lapsus;31679681]Well, here's hoping that he actually has a parallel port on his motherboard, if that's the case. @bob2thelol: do you get any different results if you unhook everything from the arduino and just use it from USB power with something simple like the blink sketch? It's a long shot, but it can't hurt.[/QUOTE] That was one of the first thing I tried. I thought, is something shorting out, or are some of the pins shorting, or doing something else wierd? So I unplugged everything, let it sit for a bit, then plugged in USB only and tried the blink sketch. Same result. :( And nope, I don't have a parallel port. Heh... damn.
  • [QUOTE=Chryseus;31674919][img]http://i.imgur.com/5dzeF.jpg[/img] I was not expecting this when I lifted the mystery SOIC part, has to be one of the more unusual things I've found.[/QUOTE] Ah, the joys of SMD chokes.
  • Added new supplier to the list, [url=http://www.rshelectronics.co.uk/]RSH Electronics[/url] they have some good bargain packs and ship international for £4.00
  • Just a quick question: what would be the best way of powering a 5V microcontroller off a 12V AC power supply? Just build a diode bridge, slap on some capacitors and use a linear regulator (7805)? Or is there a better way?
  • [QUOTE=q3k;31692137]Just a quick question: what would be the best way of powering a 5V microcontroller off a 12V AC power supply? Just build a diode bridge, slap on some capacitors and use a linear regulator (7805)? Or is there a better way?[/QUOTE] That's pretty much as simple as you can get. If you have an op-amp and transistors laying around you can build your own regulator which would save you the cost of a 7805 if you don't already have one.
  • [QUOTE=Chryseus;31692181]That's pretty much as simple as you can get. If you have an op-amp and transistors laying around you can build your own regulator which would save you the cost of a 7805 if you don't already have one.[/QUOTE] You still need a voltage reference, which would generally be some sort of diode (preferably zener). You can also drop the op-amp circuit and use a single transistor like a voltage follower with the zener diode at the input. I think the op-amp probably adds some stability, though.
  • [QUOTE=Chryseus;31674919][img]http://i.imgur.com/5dzeF.jpg[/img] I was not expecting this when I lifted the mystery SOIC part, has to be one of the more unusual things I've found.[/QUOTE] Gotta wonder what the machine building these looks like.
  • Looks like was just inserted nearly complete into the package and then sealed. I don't know anything about IC production but that is just a guess.
  • [QUOTE=DrLuke;31705178]Gotta wonder what the machine building these looks like.[/QUOTE] This probably: [img]http://moreintelligentlife.com/files/china%20factory.jpg[/img] [b]Edit[/b] My new article on resistors and potentiometers is done, [url]http://chryseus8086.co.uk/?p=176[/url] hopefully someone will find it useful.
  • Curiosity: how would you go about recording a radio-frequency unfilitered signal, gathering data from it inside a windows program, then generating a new arbitrary signal and outputting it? Unfiltered as in, all frequencies, both input and output.
  • [QUOTE=Nikita;31725043]Curiosity: how would you go about recording a radio-frequency unfilitered signal, gathering data from it inside a windows program, then generating a new arbitrary signal and outputting it? Unfiltered as in, all frequencies, both input and output.[/QUOTE] You can't record raw wideband RF in real-time without some really fancy hardware. You can, however, bring a specific band down to an intermediate frequency (IF) by mixing (or sampling) it with a local oscillator. Your IF can be low enough that you can sample it with an ordinary sound card. You can find lots on this topic by searching for software-defined radio. Jeri Ellsworth recently did a [url=http://www.youtube.com/watch?v=YFVgq3ZB0Mo]bunch of videos[/url] where she builds and debugs a quadrature sampling detector.