Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

switch between two voltage sources dependent on micro processor output

Status
Not open for further replies.

SamV67

New Member
Hello,
sorry if this has already been addressed but I haven't been able to find anything on this particular problem.

I am designing a lighting circuit that runs on a 24V dimable supply, I am using a standard LM350 circuit and it works well. At this point I want to add a feature that turns the LEDs all the way on when a button is pressed, so for instance if the dimming supply is set at 12V and the button is pressed the lighting supply should switch from the 12V from the dimming circuit to the straight 24V. This circuit draws about 3A (I think, it might be less than that but for the purpose of not frying components I prefer to overestimate current and voltage limits) when all of the LEDs are on.

My original thought was to use a relay to switch between the two lines but most relays that I have looked at are too large for the space that is available for the circuit. So my question would be if anyone has an idea about how to do this with something that has a small profile?

Thanks in advance
 
Post a circuit of what the LM350 is doing.
 
You will also need to give details of the strings of LEDs and the current limiting resistors. If the string of LEDs consist of 5 LEDs (Assuming 1.8 volts for red LEDs) then the LEDs will have 9 volts across them and the current limiting resistor will have 3 volts across it when connected to 12 volts. If the voltage is raised to 24 volts then the string of 5 LEDs will only have a little more than 9 volts across them but the resistor will have almost 15 volts across it. This means that the current will go up to almost 5 times the value on 12 volts. I suspect you were expecting it to be only double. The brightness is almost directly proportional to the current.
 
You mention "if the [24V] dimming supply is set at 12V", but LEDs are current-driven devices; you don't normally change their brightness by changing the supply voltage. I'm puzzled as to how this dimmer works :confused:.
 
If you want to control the brightness from a micro processor why not use a PWM output driving a suitable switching transistor or MOSFET in series with the LEDs. If the processor you are using does not have a PWM output then just generate the switching signal in software.
 
Schematics please.
 
Hello,
Thank you for the replies, and sorry for taking so long to get back to you.
I've attached the schematic. As for why I'm not not using PWM, I came in on this project in the middle and it was already designed to run via varying voltage, (which is changing the current as a consequence) additionally the LM350 has a heat sink on it to help disperse the heat to keep the junction temperature down.
 

Attachments

  • schematic.jpg
    schematic.jpg
    88.8 KB · Views: 202
What are the voltage sources? I see just one.

And what actually means for you, switching between sources?

The pot at the bottom as is, is just a resistor. The tap is not connected. If the LM350 does its thing, voltage will stay unchanged forever.
 
Oops I knew I was forgetting something, here is the corrected version of the schematic with something that I hope clarifies what I'm looking to do. I seem to be having a hard time finding the right words to describe my goal so I hope the picture helps
 

Attachments

  • schematic.jpg
    schematic.jpg
    115.2 KB · Views: 168
Ok, now we can see better where you're aiming.
I want to add a feature that turns the LEDs all the way on when a button is pressed, so for instance if the dimming supply is set at 12V and the button is pressed the lighting supply should switch from the 12V from the dimming circuit to the straight 24V.
How will you revert back to using the dimmer, or should the array be permanently run from 24V once the button has been pressed?
 
If you could manage with about 22.5 volts rather than 24 I think just breaking the connection to the ground end of the pots would work. The regulator would switch hard on attempting to get 1.25 volts between its adjust and output terminals. If you want to control it with a micro processor you could use a small mosfet such as a 2N7000 or one quarter of a quad bilateral switch such as a CD4066. If you just want to use a push button then you could just toggle a latch (Such as a CD4013) with the switch and drive the mosfet from its output. If you used a push on/push off type push button you could just connect this between the bottom of the pot and ground.

Les.
 
.... or here's another possibility:
SupplySwitcher.gif
 
alec_t, I think I can see what is going on in your schematic but to be sure;
A positive voltage from the MCU turns on Q1 which then turns on M1 allowing +24V to reach the LED array and the diodes prevent backflow into Q1 and the dimming circuit, is this correct?
 
Hola Alec

Cannot see why D2 is actually needed; much less how it works. The BJT seems to be not competing with anything else...

confundido rasca cabeza.gif
 
Hola Sam

Is the switching between sources a frequent thing or a relay could have a use here? Closed only for the momentary condition, if any.
 
This type of adjustable regulator works by attempting to maintain 1.25 volts between the output pin and the adjust pin. If you connected the adjust pin to ground the output would be 1.25 volts. If we ignore the small current that passes from the adjusting pin then the ratio between the 240 ohm resistor and the value that the 5K pots has to be set to to obtain 12 volts out is in the same ratio as 1.25 volts to the output voltage (12) minus 1.25 volts. As 12 -1.25 is 10.75 then the 5K pot will be set to 240 * 10.75/1.25 = 240 * 8.6 = 2064 ohms. If the bottom of the pot is not connected to ground then there can be no current through the 240 ohm resistor. As there is no current through it there will be no voltage across it. As the aim of the regulator is to attempt to maintain 1.25 volts between the output and adjust terminals it will drive its internal pass transistor to the fully on condition. There will always be a minimum voltage drop between the input and output of a regulator. This is called the dropout voltage. This is why the output will only be about 22.5 volts and not 24 volts.

Les.
 
ah thank you Les, I understand now.
atferrari, is not a frequent thing and I was thinking about using a relay to accomplish this but I was having a hard time finding small relays on mouser, the available space for this circuit is not very large and much of it is being used for the heatsink however I don't have any actual dimensions at the moment. So I was wondering about other ways it could be accomplished
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top