Beginners: please read this post and this post before posting to the forum.
0 Members and 1 Guest are viewing this topic.
I'm pretty green with this stuff myself so maybe I can offer a similar perspective.One solution I've used for this type of thing is an optocoupler a.k.a. opto-isolator instead of transistors. They kind of function similar to a relay and also provide a layer of protection for the microcontroller. They are cheap too. You can get them in DIP packages that contain several internally.Here's one at the Electronics Goldmine (single type) and they have a few of others too, as do many other component sources.http://www.goldmine-elec-products.com/prodinfo.asp?number=A10065I basically hooked mine up similar to a relay. The control side (input) is an LED, so dead easy to figure out and I would guess it uses less power than yer standard LED too so you should be able to pack as many in as you want. The controlled side (output) can switch higher volts and amps than the input, so you just power the output with a big enough power supply to activate your relay coils.Is this making sense? It's just a stepping-up method of running large stuff from a small controller. The output from your Arduino activates the optocoupler's internal LED, the output from the optocoupler activates your relays, and your relays activate your awesome Halloween display stuff.Since these are cheap and readily available, you should be able to pick one up and get it pretty quick for experimenting/implementing. For me it would seem pretty late in the season for putting a display together by Halloween, but that's just me.
Here's a 4N29 at Digikey for more info:http://search.digikey.com/scripts/dksearch/dksus.dll?Detail&name=4N29M-NDand here's the datasheet for it:http://www.fairchildsemi.com/ds/4N/4N32M.pdf
As I've been reading, I've seen talk about placing a diode between the relay and the transistor to protect the transistor from blacklash voltage when the relay cuts off... is that an issue with the optoisolator? Should I worry about it?
Will I need anything more than power source to-> optoisolator to-> relay to-> power source? (Assuming I have the right voltage... I may need to use a 12v source with this 9v relay, looking into what I'd need for a resistor)Edit: I've been reading on reducing voltage from 12 to 9... and a simple solution someone provided was to place 2 LED's in series on the 12v line to reduce the voltage, but wouldnt that burn up the LED's running them at 12v?
Why is reducing DC voltage so darn difficult?!
Wonder if the 9v relays will work at 12v without damage?Another edit: Looks like I may just use 12v relays... the cost to reduce the voltage to 9 from 12 plus the cost of the 9v relay is more than just buying a 12v relay.
I did get the optoisolators, mainly because they are simple as hell to use. 5v arduino power in, run the 12v across the other 2 pins. Easy peasy.
I will need to find out what kind of diode to run on the relay... based on your drawing it should lay across the in/out of the relay... I'll have to google the figure in the diagram to see which way to put it (I DO know they are polarized and won't work (or offer the protection) if placed backwards)
No reason to use optocouplers. A transistor is more than adequate and much cheaper