Reduce current draw

Thread Starter

HackThePlanet

Joined May 30, 2018
8
Here's a link to the schematic for my project: https://easyeda.com/YeahWhateverMan/pk-due_copy_copy

I'm very much a noob when it comes to electronics. I've designed this circuit (probably very poorly) that uses 5 potentiometers to control 5 sperate 12vRGB LED light strips using an Arduino mega (I was going to use the Due, hence the name of the project folder, but later decided on the mega). Basically, the Arduino sketch just watches for the potentiometers to cross a specified threshold value, which then triggers a state transition.

On the other end of the Arduino, 5 PWM signals are used to drive the gate of 5 seperate logic level, N-channel MOSFETs (RFP30N06LE). The source of the MOSFETs are connected to the red channel of the light strips (green and blue are tied to 12v and unused for now).

To power everything, I'm using a 12v Li-ion battery. This is where I'm having problems. The battery can be plugged into a wall wart for charging, meaning that if connected to my circuit, would be supplying the charge voltage. This is too high for the Arduino Vin pin.

My solution was to use a buck/boost regulator to keep the supply at exactly 12v if connected to the charger, and keeping it as near 12v as possible while the battery discharges. Then I used a second buck/boost regulator to generate the 5v supply for the potentiometers as well as a logic IC. I did add a switch to disconnect the circuit from the battery while it is charging, but this is for something that my kids will be playing with, so you can't trust a simple switch for safety.

When prototyped on breadboards, I used 2 different regulators (buck converters) as I waited for the buck/boost boards to arrive in the mail. I added in a voltage/amperage/power meter between the switch from the battery and the rest of the circuit. On breadboard I was seeing max 1.5 amps with all led strips on at their fullest. Since changing to the buck/boost regulators, I can only turn 2 on full, and a third about half way, before the current draw exceeds the battery's ability to output. Can anyone explain what I've done wrong and how I might fix this?

1572855418686.png1572855418686.png
 
Last edited by a moderator:

Thread Starter

HackThePlanet

Joined May 30, 2018
8
Here's a link to the product page for the regulators:

2pcs DC-DC Auto Boost Buck Converter Red Board High Performance Low Ripple Adjustable Power Module 5.0-32V to 1.25-35V XL6009 Voltage Regulator https://www.amazon.ca/dp/B07KYDP8CW/ref=cm_sw_r_cp_apa_i_9x3UDbM4VHQRB

As for the battery, I purchased it a long time ago from eBay, not sure that I can track down the exact data sheet. I will upload a photo of the info sticker that is on the battery itself.
 

Thread Starter

HackThePlanet

Joined May 30, 2018
8
I forgot to link the buck converters I used also, These were the ones that worked fine, drawing a max of 1.5 amps.

These are the RGB LED strips I am using, in case that is relevant.

And finally, I did track down the same battery on Amazon as well, I have the 20,000Ah.

I hope this helps, unfortunately I'm not sure where to track down the actual data sheets for these things.
 

Thread Starter

HackThePlanet

Joined May 30, 2018
8
I do not see any current ratings on the led strips ?

Regards, Dana.
I asked the seller for a data sheet, or at least some proper information regarding the electrical characteristics. In the meantime, I have 3 extra sections that I'm not using, I will attempt to figure out what components are used, maybe that will help?
 

djsfantasi

Joined Apr 11, 2010
7,395
What is the current draw of the 5V circuits?

If it is low enough, you could power them from the 5V pin on the Arduino Mega. Thus saving the current used by the second buck-boost converter.

One other minor point. Why do you have pull-down resistors on S0-S4? These appear to be outputs to the 74LS32. As output pins, they will always be in a defined state, and no resistors are needed. Plus, when the output of these pins are HIGH, you may unnecessarily be wasting 0.5mA per high pin.

By your description of how the potentiometers are used, it sounds as if you don’t need the full range of 1023 values from the analog pins. Thus, you may be able to include a resistor in series with the pot and 5V to minimize current draw when the pot is at its extreme position.

While you wiring of Q1 appears to work, an NPN transistor is usually placed between the cathode of an LED and ground. You don’t have it wired this way.
 

Thread Starter

HackThePlanet

Joined May 30, 2018
8
What is the current draw of the 5V circuits?

If it is low enough, you could power them from the 5V pin on the Arduino Mega. Thus saving the current used by the second buck-boost converter.

One other minor point. Why do you have pull-down resistors on S0-S4? These appear to be outputs to the 74LS32. As output pins, they will always be in a defined state, and no resistors are needed. Plus, when the output of these pins are HIGH, you may unnecessarily be wasting 0.5mA per high pin.

By your description of how the potentiometers are used, it sounds as if you don’t need the full range of 1023 values from the analog pins. Thus, you may be able to include a resistor in series with the pot and 5V to minimize current draw when the pot is at its extreme position.

While you wiring of Q1 appears to work, an NPN transistor is usually placed between the cathode of an LED and ground. You don’t have it wired this way.
Thanks for your comment, and sorry for the delay in responding. I'll do my best to tackle everything you've addressed.

1. I will have to get back to you on the current draw for the 5v circuits. Just got my new multimeter today so I'll be back to tinkering shortly.

2. As for powering the 5v circuits from the Arduino 5v pin, I was under the impression that this should be avoided, hence why I went with the seperate regulated supply. I can test this later as well if the measured current draw falls within the allowable range for the microcontroller board.

3. I added the pulldown resistors as I was experiencing some undesirable "noise", which would occasionally give a false HIGH to the 74LS32. This could have been due to the less than ideal ratsnest I had setup at the time and I'm certainly open to the idea of conserving some components if possible, as well as (obviously) reducing the current draw. Regardless, these pins are used in combination with the potentiometers to determine the current/next state of the code (they're setup as output, but the code does perform a digital read on them as well). I will remove these and see how it performs now with the cleaner setup.

4. You are right in that I have a "buffer" setup for the analog read of the potentiometers. The potentiometer will only trigger a state transition if the analog value exceeds or falls below that higher threshold value (I believe I have it set to 20), while also relying on the state of the indicator led. So basically, if the potentiometer is already above that threshold and is changed but remains higher than the set value, the microcontroller responds by outputting the mapped value of the pot on the respective PWM pin. But if it then falls below that threshold, the microcontroller sets the corresponding PWM output low, as well as the corresponding "s" output. I think that adding a resistor here would be ideal, since there is a slight disagreement between the indicator led and the led strip (the exact moment the led goes low, the led strip is still faintly lit for a small degree of rotation, before also turning off). Perhaps the resistors would fix this?

5. As for the led, I did have it placed between the resistor and the collector of the NPN, but this resulted in the led staying on after startup/reset. Again, this was observed with my previously messy setup and could have been due to any number of mistakes on my part. I haven't had any issues with the way it is setup though, is this something I should think about changing also?

Again, I'm very much a beginner with electronics. I can do very basic stuff and I didn't expect this project to be as difficult for me as it has turned out to be. I can code like it's nobody's business, but I've never experimented with electronic circuits prior to this. That said, I'm constantly doing all that I can to learn more and become more competent/self sufficient. I don't like asking for help, but due to obvious safety concerns with this project, I felt it was my best bet.

Also, as if I wasn't already in over my head, I've been entertaining the idea of making my own led rings to replace the light strips. I've been eyeing the neopixels and they seem pretty simple, at least conceptually. Since they are 5v devices, this seems like it just might make my life a little bit easier, and could also help reduce the current draw (if the claims of the electrical characteristics of the neopixels are true, then this should be a substantial reduction in current draw).
 

Thread Starter

HackThePlanet

Joined May 30, 2018
8
I must be doing something wrong with the current measurement. I inserted the leads first between the output of the regulated 5v and the input to my circuit, no reading and no power to the circuit or Arduino. I then inserted the leads between the 12v input to the regulator and it reads 33ma, but again there was no power to the Arduino or my circuit. Curious what is going on here.

The leads were inserted in series with the +ve power wire in both cases, with the +ve lead connected to the regulated output, negative lead to the circuit input in the first case. In the second attempt the +ve lead was connected to the +12v from battery, negative lead to the regulator input. What am I missing here?
 

Thread Starter

HackThePlanet

Joined May 30, 2018
8
Nevermind, I had the test lead plugged into the wrong socket of the multimeter :eek:. Like I said, complete noob. But I'm not sure my findings will be very useful nevertheless. With everything connected as it should be, I can only turn 2 pots completely and a third one about half way. The current reading I got under those conditions was about 0.8mA. This was with the leads between the 5v regulator output and my circuit. I then disconnected all 5 light strips and tested again, this time it showed about 0.5uA! Not sure how to proceed from here except to continue probing, hopefully not destroying anything in the process.
 

dendad

Joined Feb 20, 2016
3,722
It is best to use the Arduino +5V to power the pots. Otherwise, the Arduino +5V and the external +5V may vary a bit over time and the Arduino will read that as a valid signal change. If you use the Arduino +5V, and it varies a bit, the ADC Vref (when using the Arduino +5V supply) and the pot readings track, so you get a more stable reading.
It is ok to power stuff from the Arduino +5V, just as long as you do not draw excessive current. And, if you can power the Arduino from lower than 12V, it's reg will run cooler.
 

Thread Starter

HackThePlanet

Joined May 30, 2018
8
It is best to use the Arduino +5V to power the pots. Otherwise, the Arduino +5V and the external +5V may vary a bit over time and the Arduino will read that as a valid signal change. If you use the Arduino +5V, and it varies a bit, the ADC Vref (when using the Arduino +5V supply) and the pot readings track, so you get a more stable reading.
It is ok to power stuff from the Arduino +5V, just as long as you do not draw excessive current. And, if you can power the Arduino from lower than 12V, it's reg will run cooler.
Thanks for the info! I am currently working on completely re-designing this setup. In the new design I will be using the Arduino 5v pin to power the pots. I also found an incredibly helpful video by Great Scott on YouTube that shows how to implement a current limiting feature on the exact same buck/boost regulators that I'm using. This should solve my over current problem.

As for how I'm using the potentiometers, do you have any advice for me on whether I should add some resistors in series with them, and if so, how do I figure out the value of resistor to use? I understand that since these pots are in parallel, the total resistance will be lower than the smallest resistor value. Will this matter at all with how they're being used?
 

dendad

Joined Feb 20, 2016
3,722
If you want rull range, just run the pots between 0V and +5V.
If you want, add a series resistor from the wiper to the ADC input, and a cap from input to 0V.
 
Top