Pages: [1]   Go Down
Author Topic: Energy, voltage regulators and capacitors... HELP!  (Read 872 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 21
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello! First post, first Arduino project and total newbie in electronics, so bear with me...

I'm building a project that has an atmega 328p chip, a  vibration sensor, an LCD 16x2 display, an RTC, 6 AA batteries and a dc motor rated for 9v.
My project worked great for a beginner, but it also worked thru my batteries in 2 days. It's supposed to last at least a month.

I added a software watchdog to loop after 2 seconds, changed the lm7805 regulator for a 78L05, switched of the led and the LCD, changed the vibration sensor from one normally closed to one normally open but the batteries still don't last long.
Now I'm considering changing the 6 AA batteries to one 6 volt battery so it lasts longer, but the motor will be under powered if I do that.
Is it possible to put a capacitor in the circuit to charge from the 6 volt battery and release 9 volts for 2 seconds?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 21
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If I put 2 capacitors in series, what happens? Does it double the voltage?
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 227
Posts: 6639
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You need to design the circuit for lower power consumption. Here are some suggestions, based on what I do in my own battery operated designs:

- Run the atmega328p chip at a lower clock frequency, e.g. 8MHz or 1MHz
- Put the atmega328p chip in sleep mode for most of the time
- Turn off the lcd backlight when it is not in use (it sounds like you are already doing this)
- Power the LCD from an Arduino pin through a 100 ohm resistor, so that you can turn it off completely when it is not required (this saves about 4mA)
- Use a micropower voltage regulator e.g. MCP1702
- Look for anything else that is taking current (the vibration sensor?) and find ways to reduce its power consumption

Using these techniques, I can get the power consumption sufficiently low that I can run an atmega328p-based design from a 9V battery (of course, I don't have a motor in my design) and it doesn't need an on/off switch.

Yes it's possible to generate 9V from 6V, but you need more than just a capacitor. Google for "boost converter".
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Offline Offline
Newbie
*
Karma: 0
Posts: 21
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You need to design the circuit for lower power consumption. Here are some suggestions, based on what I do in my own battery operated designs:

- Run the atmega328p chip at a lower clock frequency, e.g. 8MHz or 1MHz
- Put the atmega328p chip in sleep mode for most of the time
- Turn off the lcd backlight when it is not in use (it sounds like you are already doing this)
- Power the LCD from an Arduino pin through a 100 ohm resistor, so that you can turn it off completely when it is not required (this saves about 4mA)
- Use a micropower voltage regulator e.g. MCP1702
- Look for anything else that is taking current (the vibration sensor?) and find ways to reduce its power consumption

Using these techniques, I can get the power consumption sufficiently low that I can run an atmega328p-based design from a 9V battery (of course, I don't have a motor in my design) and it doesn't need an on/off switch.

Yes it's possible to generate 9V from 6V, but you need more than just a capacitor. Google for "boost converter".


Thanks for the answer, but I did all that except for the lower clock frequency.

- By watchdog, I meant putting it on sleep mode (noob confusion... smiley-cry)
- Already powering the LCD from the 328p
- Already changed the LM7805 for a 78L05, but I’m considering changing to LP2950 which is even better

The motor only runs 5 or 6 seconds each day, so it shouldn’t run the batteries dry in 3 days. I think I need to check if there is anything else that’s draining the batteries...

I've been checking the net for boost converter designs. I think I'm going to consider adding this to my design. A 6 volt battery is way better that the 6 AA batteries I'm using right now.
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 227
Posts: 6639
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

1. Which sleep mode are you using? Power down mode is the one to aim for, the other ones keep the clock running.

2. What vibration sensor are you using?

3. Have you measured the current draw when the system is in sleep mode?
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

United Kingdom
Offline Offline
Tesla Member
***
Karma: 227
Posts: 6639
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

PS - the 78L05 current draw (3mA) doesn't explain your batteries lasting only 2 days, that's only 144mAh, and AA battery capacities are in the region of 2000mAh.

The LP2950 does have a much lower quiescent current (200uA) than the 78L05, but the MCP1702 is a lot better still (2uA).
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Offline Offline
Edison Member
*
Karma: 37
Posts: 1355
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

vander,

Assuming you don't already have one, I suggest you get a multimeter so you can measure current.   (If cost is an issue, you can get a cheap one for around $10 USD.)   You can measure the total current and/or the current draw for the various parts of your circuit to find out where the power is going.

You can look-up how to do it, but current measurement is a bit tricky.  You have to break the curcuit and insert the meter in series.    And, you have to be careful not to connect the meter (in the current-measurement mode) when there isn't something to limit the current (such as the Arduino or motor, etc.).  If you connect a current meter directly across a battery (with nothing in series), you'll get the maximum current from the battery and you'll blow the fuse in the meter.   (Usually there is a separate current connection on the meter, so that nothing bad happens if you are measuring voltage and you accidently switch the meter to "current".)

Quote
...changed the lm7805 regulator for a 78L05,
That won't help that much.  Linear regulators "work" by "wasting" power.   The voltage gets divided between the regulator and the load (4V across the regulator and 5V across the load = 9V) and the same current passes through the regulator before going to the load.   Power is calculated by multiplying Voltage x Current, so with that set-up, your regulator is consuming almost as much power as your 5V circuit.   (There is also a small amount of current used to "power" the regulator, even if there is no power going to the load.)

A switching regulator is more complicated to build (it takes an inductor) but it can be nearly 100% efficient.   You can get more current out of a switching regulator than you put in!  (But, less voltage = about about the same amount of power.)   I believe switching regulators generally take a bit more power to "run the regulator", so they may be less efficient at very-low currents.  But, in low-current, low-power, applications, you usually can use a regular 'ol  linear regulator, since you are wasting very-little anyway.   

I've never built a switching regulator.  But in hindsight, I should have use one (or two) on the project I'm finishing-up now!
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 362
Posts: 17307
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I've never built a switching regulator.  But in hindsight, I should have use one (or two) on the project I'm finishing-up now!

Why build when you can buy so cheap? Save the building for more important cooler stuff.  smiley-wink

http://www.ebay.com/itm/251066005460?ssPageName=STRK:MEWAX:IT&_trksid=p3984.m1423.l2649

Lefty
Logged

the land of sun+snow
Offline Offline
Faraday Member
**
Karma: 159
Posts: 2927
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

2000 mA-Hr/72-hours = 27 mA. That's all you can draw ... on average ... for a 3-day time
period, and it's not a lot. You obviously need to shut everything down most of the time.
The processor and LCD backlite alone will drain the battery.

You might think about going to a 12V SLA battery, or two 6V SLAs in series. You can get
them with much higher energy levels than 2000 mA-Hr.

http://www.jameco.com/webapp/wcs/stores/servlet/StoreCatalogDrillDownView?langId=-1&storeId=10001&catalogId=10001&categoryName=cat_47&subCategoryName=Rechargeable&category=4715
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 21
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry for the delayed response, but I’ve been driving myself crazy with this.
I found that my design isn't the culprit. I measured the current everywhere on my PCB. It now looks like Swiss cheese from all the holes I Put in it to measure current. Ended my stock of jumpers to plug them all...

I measured the voltage of my batteries and found that four of them had between 1.10v and 1.20v. One had .80v and one had -.02 volts!! I didn't know it was even possible to drain a battery to the point of negative voltage!!
Did some reading and found that it's a common problem when the batteries aren't all the same brand or even the same charged voltage. If one drains faster than the others, it gets negative voltage if connected in series.

That's a big problem since i expect to keep my design turned on for at least one month.

Now I'm considering changing to a 6v 4.5 amps lead battery. I have to see if the motor turns with less volts . The only problem is to find the right voltage regulator.
I don't know if I keep the lm7805, the 78L05 or another regulator... What do you think?
Which would be the most efficient?
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 227
Posts: 6639
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I measured the voltage of my batteries and found that four of them had between 1.10v and 1.20v. One had .80v and one had -.02 volts!! I didn't know it was even possible to drain a battery to the point of negative voltage!!

That's because the strongest batteries can reverse-charge the weakest one eventually.

Did some reading and found that it's a common problem when the batteries aren't all the same brand or even the same charged voltage. If one drains faster than the others, it gets negative voltage if connected in series.

That's a big problem since i expect to keep my design turned on for at least one month.

Just make sure the batteries are all from the same blister pack.

Now I'm considering changing to a 6v 4.5 amps lead battery. I have to see if the motor turns with less volts . The only problem is to find the right voltage regulator.
I don't know if I keep the lm7805, the 78L05 or another regulator... What do you think?

Neither, you need a low-dropout regulator. I have used TL750L and MCP1702 for this sort of project.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Offline Offline
Newbie
*
Karma: 0
Posts: 21
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I measured the voltage of my batteries and found that four of them had between 1.10v and 1.20v. One had .80v and one had -.02 volts!! I didn't know it was even possible to drain a battery to the point of negative voltage!!

That's because the strongest batteries can reverse-charge the weakest one eventually.

Did some reading and found that it's a common problem when the batteries aren't all the same brand or even the same charged voltage. If one drains faster than the others, it gets negative voltage if connected in series.

That's a big problem since i expect to keep my design turned on for at least one month.

Just make sure the batteries are all from the same blister pack.

Now I'm considering changing to a 6v 4.5 amps lead battery. I have to see if the motor turns with less volts . The only problem is to find the right voltage regulator.
I don't know if I keep the lm7805, the 78L05 or another regulator... What do you think?

Neither, you need a low-dropout regulator. I have used TL750L and MCP1702 for this sort of project.

Yesterday I connected the 6v battery to the board and it read 6.77v. Today, after it being connected all afternoon and night, I checked the voltage and got 0.01 more volts than the day before - 6.78!! Usually, the LCD's backlight didn't even lit after one day because the output voltage dropped bellow 5v, but now it works fine, even with the LM7805!!  I'll try to go to the store and pick up a TL750L05 reg and try it out to see if I get more days out of the battery.

Now I only have to test the motor to see if it works with 6v. If not, I'll try my hand with a boost converter. Do you know any simple designs for a boost converter from 6v to 9v? I saw a few on an online store, but I can't wait one month for them to get here, so I'll try to make one. Saw a few designs online, but none from 6v to 9v...

Thanks for the support!
Logged

Pages: [1]   Go Up
Jump to: