How do I turn on and off a 12v LED depending on battery voltage without using a microcontroller?

Thread Starter

bigjoncoop

Joined Feb 1, 2019
32
I initially was going to use an Arduino and some npn transistors in order to turn on or off LEDs depending on battery voltage.

I want to turn on either R, G, or B of a LED strip depending on the voltage of a battery. Green for 12v to 11v, blue for 11v to 10.5v, and red from 10.5v to 9.9v. Originally I was going to use the Arduino but I do not have enough patience to learn how to write code for it. I have found lots of premade projects that are close to what I'm trying to do but not exact and I tried for a week to make it work with out any luck. And it seems very hard to get help from the "programming guys"...

So now I am wondering if I can do this with mosfets or some IC. I was wondering if there is a way the trigger on and off a mosfet depending on a certain voltage in the range of 12v and 10v? And if a mosfet is not what I should be using then what can I use in order to achieve this?

Or if someone could point me in the right direction.

It would just be nice to have a big visual identifier of the battery voltage level for my upcoming project

Thanks
 

wayneh

Joined Sep 9, 2010
16,102
I initially was going to use an Arduino and some npn transistors in order to turn on or off LEDs depending on battery voltage.

I want to turn on either R, G, or B of a LED strip depending on the voltage of a battery. Green for 12v to 11v, blue for 11v to 10.5v, and red from 10.5v to 9.9v. Originally I was going to use the Arduino but I do not have enough patience to learn how to write code for it. I have found lots of premade projects that are close to what I'm trying to do but not exact and I tried for a week to make it work with out any luck. And it seems very hard to get help from the "programming guys"...

So now I am wondering if I can do this with mosfets or some IC. I was wondering if there is a way the trigger on and off a mosfet depending on a certain voltage in the range of 12v and 10v? And if a mosfet is not what I should be using then what can I use in order to achieve this?

Or if someone could point me in the right direction.

It would just be nice to have a big visual identifier of the battery voltage level for my upcoming project

Thanks
Have you ever looked into the LM3914? It’s often used to make a voltage bar graph.
 

crutschow

Joined Mar 14, 2008
23,293
What type of 12V battery?
A 12V lead-acid battery is essentially dead at 9.9V.
What if the voltage is above 12V?

What you want is called a window comparator.
As Wayneh suggested, a LM3914 dot-bar IC can be used for that.
Below is the LTspice simulation of such a circuit.
The trip points for each LED are fixed ratios of each other so they can't be independently adjusted, but the values shown are close to what you wanted.

upload_2019-2-4_19-34-7.png
 

Attachments

dl324

Joined Mar 30, 2015
8,849
Or if someone could point me in the right direction.
Does your LED have a common anode or cathode? Do you want moving dot or bar display?

One quad opamp. This gives a bar display.
upload_2019-2-4_19-47-32.png
This was designed for another member. The voltages on the inverting inputs are the trip points. With the input divider, the actual voltages are 3X and are listed under the pin numbers of the outputs. You can adjust resistors as necessary for your trip points.
 

AnalogKid

Joined Aug 1, 2013
8,100
You don't define the LED states either above 12 V or below 9.9 V. If you go the easy route and leave the green or red LEDs on for voltages outside the ranges you stated, then you have this:

Green - greater than 11.o V
Blue - 11.0 V to 10.5 V
Red - less than 10.5 V

Now the circuit is down to only two comparators, and a third to make the three states mutually exclusive. What is the worst case maximum voltage being monitored?

What are the LED characteristics? Voltage? Current? Are they all tied to V+ and you turn them on by grounding one side, or are they all grounded and you turn them on by pulling one side up to a power rail?

ak
 
Last edited:

Thread Starter

bigjoncoop

Joined Feb 1, 2019
32
hey thx for all your input. greatly appreciated.

the voltage cant go over 12.6 - Max voltage for 3s 18650 Batteries. - Bms Controlled
the voltage cant go below 9.6 - Min Voltage for 3s 18650 Batteries. - BMS Controlled

the LEDs are a RGB strip. Non addressable. They have a common Anode. take v+ in and depending one which color i apply ground to will make it lite. I can use either a 5v or 12 strip. i have both

i like both of the methods suggested. Can they be used for my led strips? since they have a common anode?

*i only want any one color lite at any given time
 

crutschow

Joined Mar 14, 2008
23,293
the voltage cant go over 12.6 - Max voltage for 3s 18650 Batteries. - Bms Controlled
the voltage cant go below 9.6 - Min Voltage for 3s 18650 Batteries. - BMS Controlled
So what do you want the circuit to do for a voltage of 9.6V and 12.6V since that was undefined in your first post?

Can they be used for my led strips? since they have a common anode?
All the LEDs in post #3 have the LED anodes connected together.
 

AnalogKid

Joined Aug 1, 2013
8,100
Here is my entry. R2, R3, and U1D for a 2-input NOR gate the turns on the blue LED only when both the red and green are off. If either one is on, the voltage at pin 13 is around 4.5 V, which is greater than the 2.5 V reference. Still don't know the LED current; a 2N7000 can sink around 200 mA.

R6, R7, and R8 are chosen such that the voltage at the center of the two pots' rotations equal the trip points for the comparisons, 11.0 V and 10.5 V, scaled down for a 2.5 V reference. Looking at it now, R7 probably can be deleted because the two trip points are so close together in value.

ak
Battmon-3LED-1.gif
 

Thread Starter

bigjoncoop

Joined Feb 1, 2019
32
The Led Strips i have are SMD 5050. which use about 0.2w per led.
I would only be using at most 50 of them. so a total of 10w.
I have both 5v and 12v strips. I can use which ever is more appropriate for circuit.

As for which color for 12.6 = Green and 9.6 = Red

and really I would be fine with only 2 colors. Green and Red
Green = 12.6v - 10.5v
Red = 10.5 - 9.6
and it doesn't have to be so precise... Im just looking for a easy visual representation of the battery voltage. Its really just for "show" since I will have a voltage LCD read out. Im just doing this to make this project stand out from all the other charge cases everyone else has.

Project details:
1. built in raspberry pi with 7in touch screen. which will play music, record video, run software to change paramaters for our racing/freestyle quadcopters, games etc...

2. built in 50,000mah diy 18650 battery to run a RC charger to charge our quadcopter lipo batteries

3. Battery Voltage LCD readout

4. USB ports to charge misc. electronics and batteries etc...

5. Built in amplifier and speakers

6. 15v DC input from wall adapter in order to charge internal 18650 battery* / power RC charger when mains voltage is avalable, with auto switching circuit using diodes.

I want to use these led strips underneath the Plexiglass inside the case to illuminate it. and i figured it would be a nice touch to have it change colors as battery voltage gets low.

* I AM NOT MAKING A DIY CHARGING CIRCUIT TO CHARGE THE INTERNAL 18650 BATTERY!!! (everyone is always assuming i am and warning me on the dangers of doing so "incorrectly")
 
Last edited:

AnalogKid

Joined Aug 1, 2013
8,100
1. Can you post a datasheet or link for the LED strips? I don't think your power calc is correct, and it still is not clear if they need current limiting.

2. A single red/green indicator is much less complex. 2 opamps instead of 3, only one adjustment pot.

ak
 

Thread Starter

bigjoncoop

Joined Feb 1, 2019
32
1. Can you post a datasheet or link for the LED strips? I don't think your power calc is correct, and it still is not clear if they need current limiting.

2. A single red/green indicator is much less complex. 2 opamps instead of 3, only one adjustment pot.

ak

I am fine with a single red/green indicator... 12.6v - 10.6v = Green & 10.6v - 9.6v = Red *doesn't have to be exactly those voltages. Round about is fine
________________

LED strip I want to use- 12v is better since I dont have enough of these in 5v
Going to use about 3ft max


DC 12V Dimmable SMD5050.

DataSheet - https://e-radionica.com/productdata/RGB5050LED.pdf
 

Attachments

AnalogKid

Joined Aug 1, 2013
8,100
The datasheet for an individual LED does not have any information about the strip characteristics.

Here is an updated schematic for the reduced requirements.

ak
Battmon-2LED-1.gif
 
Last edited:

Thread Starter

bigjoncoop

Joined Feb 1, 2019
32
The datasheet for an individual LED does not have any information about the strip characteristics.

Here is an updated schematic for the reduced requirements.

ak
View attachment 169576

the strip i have has 60 smd5050 rgb leds per meter. i only really want to use 3ft. but i can use 1 meter. you tell me...
Here is datasheet: !!! the datasheet shows some info for 1ft / 1meter / 5meters. But mainly 5meters

https://sirs-e.com/wp-content/uploads/2009/05/5050-12RGB-6040-DataSheet.pdf

Thanks again
 

Attachments

Top