Go Down

Topic: Controlling 10 LEDS @ 6volts but with high side switching.. (Read 529 times) previous topic - next topic

DAngel666

Hello community!   I'm a programmer of many years but my experience of electronics is limited and so I'd ask for your guidance as this is my first arduino project :)


What am I trying to do?

- I have 10 LEDS (decking LEDs)
- Each LED is chained to the next by it's negative pole (in other words I have a single wire connecting the whole lot)
- The PSU for this is 6 Volts
- I then have 10 wires feeding to each single light on their positive pole

I have done a lot of reading and realised this is less than ideal - but these lights are embedded in a wall and so, well, I'm a bit stuffed if I don't use high side switching.   I have a breadboard, some resistors, some NPN transistors (which I now realise I can't use after experimentation) and have prototyped some code to show sequencing etc. works (and learn arduino).  I can control 10 outputs fine with my

From what I've read it seems I need a greater level of complexity to switch the lights on positive only - it looks me like two transistors are required per light, resistors to control current.  I've had a crash course in transistors via the web and am quite excited by electronics :D

I have a ARCELI WeMos D1 R2 WiFi ESP8266 board.

Can anyone give me some guidance on the circuit I'm trying to build?   My current thinking is to use PNP transistors in a pair per 'switch' but I'm unsure of resistor values and so forth. 

I have to admit there is a part of me thinking about relays just for the fun noises of them clunking on/off but this feels a bit out of odds with modern times.  I'm totally aware this would of been better with low side switching and an appropriate (super cheap) add on board to do it.

AJLElectronics

The Vf of a typical LED is around 2V (rounded). So to be able to light 10 in a series string, you will need at least a 20V power supply. You also need a series resistor to set the current through the chain.

With 6V, they will not even light. Which side you switch is irrelevant to that or anything else really.

DAngel666

The original PSU with this is definitely 6 volts, not 20 (stated on the transformer).  If I touch a single + wire to the + supply the single light lights as expected.

Each LED originally had two wires fed to it + and -.  I have had a meter on the supply in addition and it reads 6 volts.

If I block connect all 10 of the + lines to the supply the all light correctly.


I suck at electronics so apologies if I'm not being clear or am misunderstanding. 

AJLElectronics

I suspect that you are getting serial and parallel connection mixed up. Which is it? Serial is +Ve to -Ve chains, parallel is all +Ve together and all -Ve together.

Do these LEDs have resistors? If no then they should if you want them to last more than a few minutes in parallel.

In series you can get away with one resistor to set the current for the whole chain.

DAngel666

All +Ve and -Ve together - parallel.


Originally there were two wires running down the chain feeding each LED in turn - there were no resistors (and aren't now).   

Now there is a single wire from -Ve running down the whole chain, and each LED has it's own, separate +Ve connection.  ATM this is married together in a block connector connecting to the PSU +Ve supply.

From what you're saying the danger I'm now in is that without current limiting resistors attaching a single LED would be a bad idea :)   

TomGeorge

I suspect that you are getting serial and parallel connection mixed up. Which is it? Serial is +Ve to -Ve chains, parallel is all +Ve together and all -Ve together.

Do these LEDs have resistors? If no then they should if you want them to last more than a few minutes in parallel.

In series you can get away with one resistor to set the current for the whole chain.
@AJLElectronics I think you are confused.
@DAngel66 stated back in his/her original post that all the strips were wired common negative, with each strip having its own 6V positive wire.
Each strip is supplied as a 6V strip with current limit resistors already fitted in the strip.
This means that to switch/power each strip ON, high side switching will be needed.

Quote
The original PSU with this is definitely 6 volts, not 20 (stated on the transformer).  If I touch a single + wire to the + supply the single light lights as expected.
Each LED originally had two wires fed to it + and -.  I have had a meter on the supply in addition and it reads 6 volts.
If I block connect all 10 of the + lines to the supply the all light correctly.
Tom... :)
Everything runs on smoke, let the smoke out, it stops running....

TomGeorge

Hi,
Either of these circuits should suit your application;


These are generic schematics I have developed, the 5V in your case will be 6V.

Tom... :)
Everything runs on smoke, let the smoke out, it stops running....

DAngel666

Thanks - I have NPN transistors already and I guess the second circuit would be easier in terms of it's less components.

So, I'd be pushing in 3.3v from the arduino on the MCU Out -currently i've got these kicking about:

Product Name : Power Transistors;Model : 2N2222
Type : NPN;Package type : TO-92
Collector-emitter Voltage : 30V;Collector current : 600mA
Power : 625mW;weight : 19g
Package Content : 100(+/-2%) xPower Transistors

...which are overspec for what I need I guess - but OK?   Are the resistor values shown (1k/10k) fine?  And finally, could you recommend a mosfet?   I'll do some reading on mosfets as i've only lightly read up on them - but in the diagram above what limits current to the output?

I've also got a Adafruit 12-Channel 16-bit PWM LED Driver - SPI Interface [ADA1455] lying around but this is designed for negative side switching.

gilshultz

The above MOSFET circuits provided by TomGeorge will work great! I would suggest you change the gate source resistors to a much lower value if possible, preferable less then 2K. The reason for this is if you start PWMing you will get heating in the MOSFET because of the Miller capacitance. This occurs between the transition from off to on and on to off, The MOSFET is acting as a variable resistor in that range, Also you must be careful of the VGS rating, depending on the MOSFET especially if you approach 12V or greater.  This response is to help you get started in solving your problem, not solve it for you.
Good Luck & Have Fun!
Gil
This response is to help you get started in solving your problem, not solve it for you.
Good Luck & Have Fun!
Gil

JCA34F


DAngel666

Good question - the PSU is marked thus:

PRI: 220-240V 50-60hz 0.10A
SEC: U rated = 6V      P = 6W
        U out    = 6V      .Tv = 75c

Big thanks for the feedback so far I'm busy reading up in the background :)

runaway_pancake

If you want to dim or blink, and that like, then a transistor is best.
If it's a simple matter of On/Off then a relay is the answer - lots of "relay modules" out there.
"Who is like unto the beast? who is able to make war with him?"
When all else fails, check your wiring!

DAngel666

Hi All,

So a bit of an update - I went away and did some reading and spent some time digesting what was here - and also got hold of some TO220AB mosfets to play with (P-Channel MOSFET, 19 A, 55 V, 3-Pin TO-220AB Infineon IRF9Z34NPBF) which we had lying round at work.

I've breadboarded a single 'switch' using TomGeorge (so many thanks) second diagram (less components) using the resistors he suggested for a first try - I've connected up D0 to my transistor and setup a simple 2 second loop setting it high then low for testing.

I took 5V from the board itself (good enough for testing I figured) and I have a simple lead as an out which i'm connecting to a meter - and - low and behold - i can see 0V and then 5V every 2 seconds :)

I don't have a value on the LEDs themselves but given the whole PSU is rated at 6Watts/6V out is there anything I need to worry about before replicating this ten times over on a board with solder?   I'm concerned about single LED current draw - does the circuit limit this as (unless i'm wrong) the mosfet is now just a gate opening directly to the source - should I have current limiting on the out?

Go Up