Help with common ground using ULN2003A with 328P

I am trying to run 4 12v LED light strips using a ULN2003A Darlington Array 7 NPN and an AT 328P for output.

It was suggested to me that I need to tie the 12v battery ground to the arduino ground but when I wire this up it seems that the 328P starts acting up (maybe rebooting). It worked fine when testing the 2003 with 5v.

If someone could please look at this schematic and offer some advice on how I am trying to wire this it would be much appreciated.

Hi,

I seem to misss a few components of your atmega: crystal with capacitors, and most important: capacitors between ground and 5V. If you switch a large load - and 4 led strips represent quit a large load - this may give a voltage drop on your circuit. The atmega takes this as a queue to reset, because for a moment it was turned off. I had this while pulsing a 1 Amp current, an extra pair of capacitors (47 uF) near the atmega solved the problem.

You do need to connect the GND from all parts of your circuit together, that is good advice, otherwise the HIGH signals from your atmega may not be seen as HIGH by the ULN.

As an extra: connect pin 9 to Vcc (12v), this connects the flyback diodes, though this is more relevant when working with motors then with leds.

Cheers,

Jack

COM connection is not needed for LEDs.
0.1uF caps on VCC and AVCC pins will certainly help, if not solve the problem.
All Gnds MUST be connected as CaptainJack says.

The 12V LEDs strips have built in current limit resistors, yes?

Thanks guys

CaptainJack:
I seem to misss a few components of your atmega: crystal with capacitors

The bootloader is configured to use the 8mhz internal clock

CrossRoads:
The 12V LEDs strips have built in current limit resistors, yes?

They have individual resistors per led

You NEED supply decoupling chips!!!

Grumpy_Mike:
You NEED supply decoupling chips!!!

I do ? please tell me more, I have no idea what those are ?

0.1uF caps on VCC and AVCC pins. From pin to Gnd, place close to the pin.

CrossRoads:
0.1uF caps on VCC and AVCC pins. From pin to Gnd, place close to the pin.

thanks crossroads your advice is very much apreciated

driz:

Grumpy_Mike:
You NEED supply decoupling chips!!!

I do ? please tell me more, I have no idea what those are ?

http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html