Why does my circuit drains the battery over night ?

HI guys,

I am a noob, with basic knowledge of electronics, and this is my first automation project with Arduino.

I have build a circuit that should turn off an AC load when there is a movement around :

PIR (as motion detector),+ Solid state relay module (FC 86) + Arduino uno + 9V battery.

I have checked the action of it and it works great.

I have left it on over night, to check if it gets hot or smoke or whatever...
.
and in the morning, I realized, that the system drained my battery in 8 hours (probably less, I was asleep)

Attached are the circuit drawing, and a picture of the actual circuit...

I assume that it has to do with not using any resistors in the circuit, right ? wrong ? heheheh

(these drop up / drop down resistors is something that i have to learn asap...)

Thanks guys,

Doron

OP's images

Those batteries have very little capacity. Add to that you are running through a linear regulator, which wastes about half the capacity anyway. I'm surprised it lasts all night.

OK,
Thanks for your answer.
I have read abut linear regulator a bit right now,
So, what am I missing ? is it really just something with adding resistors to the circuit ? (and then, I will go to learn more about these drop down / drop up resistors)
If somebody would like to draw the correct version of this circuit, that will not drain the battery within less than 8 hours, I will much appreciate it.
and back to the books and videos to learn more electronics...

TBH you are going to struggle to get the power consumption low enough to run from any reasonable size battery for more than a few hours. Getting really low power consumption is a project in itself, not one I have had much to do with. Is there no mains available to power it?

The final project will run on wall dc supply, but I was very surprised about how fast can an Arduino drain a battery.
I thought that it's very low consumption pcb, and that I could build stand alone Arduino projects running on battery for weeks....

Every day I am learning new things, LOL

I realise its so easy to ask others why your battery is going flat overnight, but you will learn a lot if you work it out for yourself.

Measure how much current the project is using with a multimeter, in mA, imagine its 10mA. Then check the datasheet for the battery and identify its capacity in mA hours, lets imagine its 100mAhr.

The battery will last capacity/current drain = 100mAhr/10mA = 10 hours.

So the first thing to do is measure the current consumption of the project..................

Great answer and indication,
As a noob, I still don't have the 'experinced feeling' of what resistance, current, capacity mean.
I will do what you recommended and start develope this feeling... (I am coming from mechanical engineering, it's much easier to 'feel' the products...)

These days you dont have to look hard to learn stuff, heard of Google ? Great tool.

I just typed in a search;

'what is current tutorial'

Lots of stuff out there ....................

Doronb:
The final project will run on wall dc supply, but I was very surprised about how fast can an Arduino drain a battery.

You call that a battery? :astonished:

Doronb:
I will do what you recommended and start develope this feeling... (I am coming from mechanical engineering, it's much easier to 'feel' the products...)

Well, as a mechanical engineer you had to learn the basics of electrics.
The arduino uno by itself uses about 45ma, your battery has about 450mAh at 45ma drainage, so, your circuit would work for 10h max. If you put the relay there then bye bye battery.

As you won't run it on battery, that's not much current you're using anyway. But you can improve the energy usage a lot in your application, if it matters at all.

Things you can do:

  • Lower the refresh rate of the sensor. In your application, even if you read the sensor once every 5 seconds would be enough.
  • Use NC or NO of the relay according to the position you will use more. If the system will be mostly off, you put it on the NO of the relay. These relay modules can use up to 100ma when it's on.
  • Lower the speed of the arduino. There are several tutorials for that.
  • Remove the microcontroller and use it separately, change the bootloader to 1mhz without crystal oscilator, although in this case you need to make a pcb, and, well, it doesn't sound like you're interested in going so far.

The arduino boards are not designed for low power applications. While one can make the chip used on the uno run for years on a battery of it spends most of it's time sleeping, the rest of the parts on the uno would draw far more current than the processor (to put it in context, the power led alone uses as much power as the processor does when not sleeping, and other components much again - and if the processor is sleeping, the power led uses 100,000 times as much power)

The 9v batteries are a trap and a bit of a fraud for beginners - many kits and such send you a 9v snap connector probably because it is cheap - but they don't mention the small capacity - it is a regular theme here for people showing up with the "battery dies, what is wrong?" - then we see that the battery is the standard 9v thing.

I looked at a data sheet for that battery and estimating from the curve there is at most 500ma/hr capacity

I have a 6AA battery pack that I use for testing and demos

Best advice I have is to get a larger battery tray (I use AA Eneloop rechargeable batteries) - then measure the draw of your device if you are concerned about how long it will run.

Remember also that all regulators have a bit of voltage drop in operations. A Buck/Boost regulator will boost low supply voltages to the desired level. I.E. a 3.7v battery with the proper Boost regulator can power a 5v device

Good luck

tadashimori:
Things you can do:

As long as OP is using an Uno and a 9V block battery, not much that can be improved upon. 10 hours running, that's about it.

If using the bare IC, or (easier) a Pro Mini with regulator & power LED removed, you can build projects that run for a few years on a pair of AA batteries. That should be the first step in a low power project.

However as OP wants to use wall power (which I assume means 5V supply - USB charger or mobile old phone charger), that's pretty much problem solved.

wvmarle:
As long as OP is using an Uno and a 9V block battery, not much that can be improved upon. 10 hours running, that's about it.

Indeed, you can only improve it to get an extra couple hours, nothing really significant.
When I wrote that I was about to suggest another changes, but then it looked like too much info, as OP wasn't asking for that much.