0
\$\begingroup\$

A motion sensor and a relay should be connected with an atmega328p. I soldered my circuit on a perfboard and have 5V power and ground rails on it.

Can I use the rail for the COM port of the ULN2803a or do I need to remove the VCC, jdVCC jumper on my relay and connect a separate power supply to it? And take connect the COM port to that VCC?

It strikes me as a bit strange that I would need that many power sources for such a simple project, including the socket for the lamp that should be controlled with the relay, I'd need 3 sockets for this project.

Also, am I under the correct impression, that the use of the ULN2803a inverts my logic? Without I switched the relay ON with LOW, now HIGH provides the ON state.

enter image description here

And on a side note, any suggestions on how to improve my schematics are welcome. I'm just starting out and I would image that my schematic probably isn't that well to read.

Regarding the diodes:

enter image description here

On the product pictures on my 8CH relay these are labeled D1-D8.

\$\endgroup\$
1
\$\begingroup\$

The ULN2003/2803 uses a Darlington output stage and this drops about a volt when activated so, if your 5 volt relays need a minimum voltage that is greater than 4 volts you might have problems. I'd consider using logic level MOSFETs directly driven from the IO pins. You will also need flyback diodes across the relays.

Also, am I under the correct impression, that the use of the ULN2803a inverts my logic?

If you connect your load (the relay) between output and Vcc (5 volts) then a logic 1 at the input will drive current through the relay coil.

And on a side note, any suggestions on how to improve my schematics are welcome. I'm just starting out and I would image that my schematic probably isn't that well to read.

It's not bad - I've seen a lot worse. I'd consider using the GND/0 volt triangle symbol in several more places and removing the GND connections that string across your diagram. It just makes it easier to follow.

Can I use the rail for the COM port

Yes you can but my preference would be to get rid of the 2803 and use MOSFETs and flyback diodes for reasons already mentioned.

\$\endgroup\$
  • \$\begingroup\$ "You will also need flyback diodes across the relays." in case I use MOSFETs right? The 2803 can be used as is because it already takes care of the flyback diodes? The relay also works with 3.3V inputs so I don't mind the voltage drops and I already have the 2803 at hand, so I'll stick to it then. If I still need extra diodes, 4001 will do? \$\endgroup\$ – idkfa Feb 27 '18 at 10:33
  • \$\begingroup\$ 1N4001 would be fine. \$\endgroup\$ – Andy aka Feb 27 '18 at 10:48
  • \$\begingroup\$ But would I need them with 2803? And would I need to place them on the input or output site? \$\endgroup\$ – idkfa Feb 27 '18 at 10:51
  • \$\begingroup\$ Across the relays unless the relays have them already incorporated. I don't read german so I could work out where the data sheet was. \$\endgroup\$ – Andy aka Feb 27 '18 at 10:53
  • 1
    \$\begingroup\$ @idkfa yes, they are the diodes exactly! \$\endgroup\$ – Andy aka Feb 27 '18 at 11:34

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.