UNL2803A relay driver pin connection - Page 1
Forum section: electronics / beginners

author: sean87
author_rank: Regular Contributor
timestamp: June 26, 2011, 11:24:22 pm
content: Hi all,I want to use UNL2803A in my little project. Everything is good so far, but before I really put the relay driver in use, I want to know what is the PIN #10 Task and where should I connect it? In datasheet it is referred as "Common free wheeling diodes".Also here is a picture of my breadboard, take a look please. The chip on the left is PICAXE 20X2 and the right chip is UNL2803A.Thanks!

author: ivan747
author_rank: Super Contributor
timestamp: June 26, 2011, 11:50:39 pm
content: Quote from: sean87 on June 26, 2011, 11:24:22 pmThere are some diodes called the flyback diodes that go connected in parallel with your load. In this case your load goes from the positive of your power supply to the ULN2803.When you have an inductive load such as a relay or a motor, they generate a very high voltage across their coil (in case of a relay, the coil is anything but the switch itself). This high voltage can destroy your ULN2803.So normally, when you're dealing with inductive loads, you should add a diode like thisBut the ULN2803 is nice enough to add them inside it for youThe diodes inside the are connected together and they have to be connected to the positive supply pin to ensure the relays don't fry your chip. The diodes go out on pin 10.So it should look like the attachmentBold fonts are given for quick reference and not for yelling at people.Ivan

author: Unknown
author_rank: Unknown
timestamp: June 26, 2011, 11:57:47 pm
content: Quote from: sean87 on June 26, 2011, 11:24:22 pmPin 10 should go to your positive supply voltage, this places a freewheel diode across each output to snub back EMF from inductive loads such as relays. Your design will work without a pin 10 connection but your chip may not last very long.

author: sean87
author_rank: Regular Contributor
timestamp: June 26, 2011, 11:59:47 pm
content: Thanks a lot for nice information. I think I got the idea.Just one question remains. I have a 5V DC and a 12V DC adapters which powers my circuit. Obviously the 5V is for PIC and some LED's and 12V is for relays.Now where should I connect the PIN #9 of the UNL2803? Should it go to GND of my 5V adapter or the GND of 12V source? Or no difference?Thanks again.

author: ivan747
author_rank: Super Contributor
timestamp: June 27, 2011, 12:10:03 am
content: Quote from: sean87 on June 26, 2011, 11:59:47 pmYou must join the grounds of both, otherwise they circuit will be incomplete since the current will not be able to flow through anything connected to the other supply. If you are dealing with LEDs you must add a resistor in series, specially with a 12V power supply. I recommend 1K for 12V and 330 ohms for 5V.

author: ivan747
author_rank: Super Contributor
timestamp: June 27, 2011, 12:14:50 am
content: By the way, is the 5V power supply regulated? If you don't know, check the label. If it doesn't say regulated, then it might be putting as much as 8 volts into your PICAXE! An unregulated 12V adapter is OK as long as you use it for things like relays.Check out the Sparkfun unregulated power supply tutorial for more info on this. Just Google it. It is very interesting and important to know.

author: sean87
author_rank: Regular Contributor
timestamp: June 27, 2011, 12:25:00 am
content: Quote from: ivan747 on June 27, 2011, 12:14:50 amWell yeah I am using a very nice DC adapter, and I already cheked it with volt meter, it does a nice 5.0V all the time, maybe sometims ~0.1V difference. I will later use a voltage reglature when I move these stuff onto a PCB!

author: ivan747
author_rank: Super Contributor
timestamp: June 27, 2011, 12:58:23 am
content: Quote from: sean87 on June 27, 2011, 12:25:00 amA little off topic but get some proper drill bits for PCB work. If you are working with a Dremel, you better get rid of the conical bit for PCB related work unless you are working on a large hole. I recommend those bits that look like normal drill bits but have a 1/8" shank (if my memory serves well, that's the standard size for Dremel tools and the like). Get something from ~0.5 mm to 1 or 2 mm. No need for more than 10 of them. For anything bigger, a small conical tip from those assortments will do the job. Ah, and if you're working on a plastic enclosure, make sure to let the bits cool down once in a while, or else the plastic will start to melt and it will be difficult to control the Dremel and you might get a very bad hole.

author: sean87
author_rank: Regular Contributor
timestamp: June 27, 2011, 01:27:52 am
content: Thanks for the tips! I will keep in mind. Actually I am very good with dremels