12v DC supply for 5v and 7v loads on PCB.... direction needed

LesJones

Joined Jan 8, 2017
3,702
In post #7 Ian has already explained the problem with the schematic in post #6. The 7812 is attempting to output 12 volts more positive than it's common terminal which is connected to +5 volts. So it is attempting to output 17 volts (5 + 12) with respect to the negative rail. It cannot do this as it's input terminal is only connected to +12 volts. There is always a voltage drop between the input and output of the regulator and for an LM7812 this would be at least about 2.5 volts. Also as the 7812 is only seeing an input voltage of 7 volts (12 -5) there is no way of knowing how it would behave.
Re post #11 As your input supply is 12 volts you can't use a 7812 to regulate the 12 volt supply as its input voltage needs to be higher than its output voltage. (LDO (low dropout regulators.) regulator can work with a lower input output differential than older regulators like the LM78xx series. Are the brightness of the three LEDs to be controlled independently or all together ?
My suggested method in post #4 was to save power and heat generation but now that you tell us that you want to control the brightness of the LEDs using PWM it is not suitable.
As you are using an Attiny85 to generate the PWM you could use an inductor to control the current by limiting the maximum PWM duty cycle. As the Attiny85 has an ADC input you could also sense the LED current through a low value resistor using the ADC to create a closed loop current control. (This would depend on what other functions the ATtiny85 had to do and the availability of I/O pins.)

Les.
 

Ian0

Joined Aug 7, 2020
4,900
In post #7 Ian has already explained the problem with the schematic in post #6. The 7812 is attempting to output 12 volts more positive than it's common terminal which is connected to +5 volts. So it is attempting to output 17 volts (5 + 12) with respect to the negative rail. It cannot do this as it's input terminal is only connected to +12 volts. There is always a voltage drop between the input and output of the regulator and for an LM7812 this would be at least about 2.5 volts. Also as the 7812 is only seeing an input voltage of 7 volts (12 -5) there is no way of knowing how it would behave.
Re post #11 As your input supply is 12 volts you can't use a 7812 to regulate the 12 volt supply as its input voltage needs to be higher than its output voltage. (LDO (low dropout regulators.) regulator can work with a lower input output differential than older regulators like the LM78xx series. Are the brightness of the three LEDs to be controlled independently or all together ?
My suggested method in post #4 was to save power and heat generation but now that you tell us that you want to control the brightness of the LEDs using PWM it is not suitable.
You assumed (post #4) that each LED was 7V so three in series would be 21V, and a boost converter would be required.
Now that we see the picture we know there the total would be 7V, so I would recommend a buck converter with a PWM input such as
https://www.diodes.com/assets/Datasheets/AL8843.pdf
and run the LEDs off the 12V supply.
Only needs three external components (inductor, diode, current sense resistor)
No need whatsoever for a separate 7V supply.
 

Tonyr1084

Joined Sep 24, 2015
6,864
johnaustinkaty as I stated - my circuit is probably wrong. As others have pointed out - IT IS WRONG! I was hoping it might work. Apparently not. I understand trying to not waste voltage or turning it into excess heat. So I have no solution for you beyond what others are suggesting.

Somehow I missed that you're trying to drive LED's with both voltages; or did I miss something else? With LED's it's a matter of controlling current, not voltage. While you need sufficient voltage, their primary means of control is via current regulation.

Good luck with your project. I have a construction project of my own going on and am not spending much time on this website, thought it is my favorite site. Again, welcome to AAC.
 

BobTPH

Joined Jun 5, 2013
4,781
The misinformation in this thread is approaching the level of Facebook.

I think we now understand that there is one (not three) LED device that consists of 3 LEDs in series needing somewhere between 6.6 and 8.4V to operate at 450 mA.

We also know that it is driven with PWM by an Arduino.

Naturally, this means our original solutions are no longer operative.

A DIY buck converter powered by the Arduino, as suggested by @Ian0, is the way I would go, but may be beyond the skill of the TS.

The simple method would be using the 12V rail and a resistor.. The disadvantage of that method is wasting about 2.25W of power requiring at least a 3W resistor which will get very hot.

A constant current driver is still in play as well.

It all comes down to the TS’s requirements and skills.

Bob
 

Thread Starter

johnaustinkaty

Joined Jul 16, 2021
37
The misinformation in this thread is approaching the level of Facebook.

I think we now understand that there is one (not three) LED device that consists of 3 LEDs in series needing somewhere between 6.6 and 8.4V to operate at 450 mA.

We also know that it is driven with PWM by an Arduino.

Naturally, this means our original solutions are no longer operative.

A DIY buck converter powered by the Arduino, as suggested by @Ian0, is the way I would go, but may be beyond the skill of the TS.

The simple method would be using the 12V rail and a resistor.. The disadvantage of that method is wasting about 2.25W of power requiring at least a 3W resistor which will get very hot.

A constant current driver is still in play as well.

It all comes down to the TS’s requirements and skills.

Bob
I wrote the sketch (arduino IDE) that controls the PWM (0-255) for fading the LED on, then off. I then flashed the code to the attiny85.
All of that is working fine. I am currently using an IRLZ44N mosfet, triggered by the attiny85, to send voltage/current to the LED.

My dilemma has been finding out the best/correct way to manage my DC supply to the devices in my project. I'm wanting to eliminate the two bulky voltage regulators I am using currently. I am using a 12v battery supply. I have an LED (3 in series) that require 7v total.
The other devices in the system need 5v.
If I use an LM7805 volt reg for 5v, will I be wasting 7v and watts as heat? I definitely don't want to do that of course.

I like the idea of a DIY buck converter using arduino. I will Google that. Thx
 

BobTPH

Joined Jun 5, 2013
4,781
If you learn nothing else from thus thread, please learn that you do not operate an LED from a constant voltage, as you still seem to be doing.

Bob
 

Thread Starter

johnaustinkaty

Joined Jul 16, 2021
37
The description of the AL8843 says that the current is externally adjustable, so with the appropriate resistors in the circuit, I should be able to get a constant 450mA?
 

LesJones

Joined Jan 8, 2017
3,702
To set the LED current to 450 mA Rset on the application circuit in the AL8843 data sheet will need to be 0.22 ohm.
Yo can control the brightness by connecting the PWM output from the ATtiny85 to the control input of the AL8843.
If your total load on the +5 volt rail is only 40 mA you will only waste 280 mW using a linear regulator. You could use an LM78L05 which is smaller than an LM7805. I think designing your own switching regulator based on an Arduino would waste more power than a linear regulator. If you want to use a switching regulator an MC4063 is one possible solution.

Les.
 

Ian0

Joined Aug 7, 2020
4,900
To set the LED current to 450 mA Rset on the application circuit in the AL8843 data sheet will need to be 0.22 ohm.
Yo can control the brightness by connecting the PWM output from the ATtiny85 to the control input of the AL8843.
If your total load on the +5 volt rail is only 40 mA you will only waste 280 mW using a linear regulator. You could use an LM78L05 which is smaller than an LM7805. I think designing your own switching regulator based on an Arduino would waste more power than a linear regulator. If you want to use a switching regulator an MC4063 is one possible solution.

Les.
LP2951 will give an even lower quiescent current than a 78L05 (75uA vs. 5mA)
I think you mean MC34063. It has a quiescent current of 4mA, and a dropout voltage of 1.3V, so it will waste about 70mW. 210mW improvement over the linear regulator, but for 6% (without considering the camera) overall gain is it worth the cost of the inductor?
 
Top