High Side Switch from Arduino to 12V+ LEDs

Thread Starter

mxabeles

Joined Apr 25, 2009
284
*****RESOLVED***** Using electromagnetic relay as high side switch to 12V LEDs. I was apprehensive as relays have welded shut strobing 120v tubes. I was also using questionable relay module boards from Amazon. Knock on copper, but it seems the light load of these DC LEDs and desoldering relays fron cheap board has assuaged my worries. Ran hard test over 30min last night, no contact welding.******

----------
Hello wonderful AAC fam,
I am looking to switch 4017 chased LEDs on and off on 12v positive rail from a digital output pin on my Arduino. Jeez, I thought I had it! Used a reed relay and the 12v LEDs must be sinking too much current and welded the contacts of relay in under 10 minutes lol.
I don't want to use electromagnetic relay - I'm pulsing these pretty hard with Arduino, and have had those weld up on me before. SSR relay is totally overkill.
So, for a nice embedded high side switch, I would love some guidance. I'm guessing either PNP transistor (maybe driven by NPN between Arduinon pin and PNP) or P channel MOSFET? I have zero experience working with either components, might as well start now.

**The 12V LEDs are 1.2 watt - 100amps give or take. Maybe the reed relay is just sh**? I got it off Amazon. Do you think I'd have any luck ordering more reliable reeds from Digikey? The contacts are rated at 500mA.

Attached schematic.High_Side.jpegHigh_Side.jpeg
 
Last edited:

BobTPH

Joined Jun 5, 2013
9,253
Is there a reason the switch has to be in the high side? A low side switch is simpler, needing only a MOSFET.
 

Thread Starter

mxabeles

Joined Apr 25, 2009
284
The low side of LEDs are being driven by the ULN2803. Where in the circuit could I successfully have a low side switch to i/o the LEDs? I tried jumping the ULN2803 GND pin but the LEDs don't fully turn off. Thanks! The point of this circuit is to have a bunch of animated LEDs being driven by only a few Arduino pins (2 pins = clock and high side switch).

I'm going to test with electromagnetic relay tonight or tomorrow. Again, if I stay off of Amazon when shopping for (most) components, maybe I'll be alright. The only time they have actually welded up on me is the cheap relay x8 module boards on Amazon.
 
Last edited:

BobTPH

Joined Jun 5, 2013
9,253
Where are the signals for the ULN2803 coming from? Can’t you just turn them all off whenever you would turn off the high side switch?

If you really do need a separate high side switch for all of them, then I would suggest a P-channel MOSFET and an NPN level translator.
 

ElectricSpidey

Joined Dec 2, 2017
2,880
Just drive a PMOS with an NPN transistor.

If all of your load driver channels are not in use as per your drawing you can use one of the channels as the NPN driver.

You could also place a PWM signal there if desired to adjust the brightness of the LEDs.

The reason you can't use the load driver ground is because each channel has pulldown resistors that bring the common emitters somewhat low because of the push/pull 4017 outputs...if you really wanted to use that ground as a switch you could try placing diodes at each channel input.
 
Last edited:

LadySpark

Joined Feb 7, 2024
194
Which version of Arduino are you trying to use? Because most can be powered with the 12V, then you can use the 5V supply pin to power the 4017. Also, The COM pin should be on 12+ on the ULN2803.

The output of the 4017 should sink current so just the logic voltage is driving the uln2803. That is why the output doesn't go out. This is how the output of the 4017 should be loaded:
Screenshot_2024-05-08_17-52-07.jpg
 
Last edited:

ElectricSpidey

Joined Dec 2, 2017
2,880
The COM pin of the load driver can be left open when driving non-inductive loads. (but connecting it to the positive rail can't hurt)

And there is absolutely no good reason to place a pulldown resistor on the outputs of the 4017.
 

Thread Starter

mxabeles

Joined Apr 25, 2009
284
Just drive a PMOS with an NPN transistor.

If all of your load driver channels are not in use as per your drawing you can use one of the channels as the NPN driver.

You could also place a PWM signal there if desired to adjust the brightness of the LEDs.

The reason you can't use the load driver ground is because each channel has pulldown resistors that bring the common emitters somewhat low because of the push/pull 4017 outputs...if you really wanted to use that ground as a switch you could try placing diodes at each channel input.
Hey thanks this makes sense. So the diodes would be placed in series between 4017 output and base pin of ULN chip? That way I could just have a TIP120 NPN switching ground of ULN on and off....yes?
 
Last edited:

BobTPH

Joined Jun 5, 2013
9,253
lot of people are making comments here that make little sense, I wonder if my schematic is visible lol
If a post does not make sense to you, perhaps you are not understanding it.

Your schematic has no labels on the IC pins. It is visible, but too much work for us to follow. I am not going to look up the pinouts of the chips to read your “schematic.”
 

Thread Starter

mxabeles

Joined Apr 25, 2009
284
Also using four LEDs is just an example. I plan to use x8 so I can utilize the entire ULN2803. Thanks again for all the responses, I love this forum.
 

Thread Starter

mxabeles

Joined Apr 25, 2009
284
If a post does not make sense to you, perhaps you are not understanding it.

Your schematic has no labels on the IC pins. It is visible, but too much work for us to follow. I am not going to look up the pinouts of the chips to read your “schematic.”
Fair point. The 4017 outputs are driving the base pins of ULN2803. Next time I can add labels to pins.
 

LadySpark

Joined Feb 7, 2024
194
The COM pin of the load driver can be left open when driving non-inductive loads. (but connecting it to the positive rail can't hurt)

And there is absolutely no good reason to place a pulldown resistor on the outputs of the 4017.
We have side commentary.

So why do you think " there is absolutely no good reason to place a pulldown resistor on the outputs of the 4017" When its normally used with driving regular LEDs to Gnd with a resistor?
Com pin to Vcc when sinking a load through the chip is normal practice.
 

ElectricSpidey

Joined Dec 2, 2017
2,880
Hey thanks this makes sense. So the diodes would be placed in series between 4017 output and base pin of ULN chip? That way I could just have a TIP120 NPN switching ground of ULN on and off....yes?
Yes...in theory.

Small signal diodes with the anodes toward the 4017.

Please test this before making any kind of commitment.
 

BobTPH

Joined Jun 5, 2013
9,253
Also using four LEDs is just an example. I plan to use x8 so I can utilize the entire ULN2803. Thanks again for all the responses, I love this forum.
The 4017 has 10 states and 10 outputs. With 1-8 used to drive 8 LEDs, states 9 and 10 leave all LEDs off. So, with no additional hardware, and only 1 Arduino pin, you can do everything you are trying to do with an additional Arduino pin and an extra high side switch.
 

ElectricSpidey

Joined Dec 2, 2017
2,880
We have side commentary.

So why do you think " there is absolutely no good reason to place a pulldown resistor on the outputs of the 4017" When its normally used with driving regular LEDs to Gnd with a resistor?
Com pin to Vcc when sinking a load through the chip is normal practice.
The 4017 is not driving the LEDs to ground, it's driving the base of a Darlington transistor, which in turn is driving the LED to ground. (low side switch)

The 4017 outputs are push/pull therefore there is no need for any pull resistors, even if the 4017 had only the ability to source current there would still be no need for the pulldown due to the internal pull resistors in the load driver...and it would still work even if those weren't there.

As for the COM pin...there is no need to connect this pin for normal chip operation, it is only needed to protect the transistors from flyback voltage when driving an inductive load.
 
Top