Low power self-controlled off-switch

Smajdalf:
AFAIK 2 transistors are needed for such circuit.

Sorry, I don't understand what you mean.

Assuming the MOSFET is correct now, the left circuit does not work?

terraduino:
@srnet
My regulators has quiescent current of about 6uA.
Not worth dumping my stock of those and buying new with 2uA :wink:

Best

How small is this battery pack that 6 uA is a significant load?

Have you created a power profile to properly account for your power usage? You can study the attached application note to see an example. Depending on the particulars of your system, the sleep current might only have a small effect on battery life, or it might be quite large.

Since you say you are operating from a higher voltage battery pack, that implies to me that you are powering something a bit more substantial than some sensors and a transmitter. Either that or you've chosen a suboptimal battery. Without details it's hard to judge.

1416 - Low-Power Design Guide.pdf (274 KB)

@Jiggy-Ninja
Thanks for your response and the low power guide. I've to check that later though. Hence, my understanding of power profile might be different to yours. With my DMM I measured power consumption when and for how long the sensor array, i.e. µC plus multiple sensors plus nRF, is active and is sleep. Then I calculate an approximate lifetime. But I only use 75% of battery packs due to self-discharge. Should be a quite conservative calculation.

And no, 6uA are not important. It's more about to learn how to do it. Nevertheless, I've voltage regulators which waste some mA when idle and that's significant even for my fun projects.
Btw. with "higher voltage battery pack" I wanted to note that I'm not feeding constant 3.6V or the like but up to 6V. I usually use battery packs of 2, 3 and 4 NiMH with 500, 800, or 1900 mAh. Additionally, I use single LiIon/LG HE4 with 2500 mAh to power some sensor arrays.
I'm trying to get my self-made sensor arrays to run for one year on batteries. :slight_smile:

Hope that clarifies my phrasing.
Best

Nordic Semi makes quite a few chips that start with nRF. Most likely you are referring to nRF24L01+. Am I correct?

An nRF24L01+ can operate from 3.6V down to 1.9V. An ATmega328P can operate down to 1.8V if you reduce the clock speed to 4 MHz or less. If all of your sensors have compatible voltage ranges, you can run everything off of a pair of AA/AAA batteries or a single lithium coin cell with no regulator.

There are custom cores (like MCUDude's MiniCore) that let you use more versatile clock options, but I think most of them will really only let you use the 1 MHz internal clock (the 8 MHz RC oscillator divided by 8), rather than some more flexible options like a 4 MHz external crystal, or an 8 MHz or 16 MHz crystal divided by 8. You probably won't need better than 1 MHz though.

Another solution is to use a lower output voltage on the regulator. CMOS digital circuitry acts like a switched capacitor resistor. Like a normal resistor, reducing the voltage proportionally reduces the current drawn. With a linear regulator, powering your Arduino with 2.5V will use half as much power as giving it 5V, even with the same input voltage to the regulator.

Analog and RF circuitry may complicate how this works, but it's an option worth exploring if you are going to regulate the voltage anyway.

@Jiggy-Ninja
You are correct, I'm using nRF24L01+. I apologize for my ignorance.

Thanks again for your suggestions. Actually, I already use MiniCore and MicroCore ;).
Btw. I power some projects directly by 2 AAA/AA without regulator but this is not always working, see PIR sensors. But maybe I should dig into reducing clock frequency again. I thought I'd tested that a few months ago and the nRF24L01+ was not working reliable with 1 MHz µC clock.
In general, I try to use the lowest possible voltage, depending on the requirements of the attached sensors. Most tend to require 3.3V. Moreover, I have quite some spare 3.3V LDO voltage regulator,hence, I preferably use this voltage. :wink:

Best

You may find this circuit useful. I came up with this to protect a Lithium cell. It uses a Microchip part normally used for forcing a reset on low voltage (my part selection trips at just under 3V), which in turn controls a Fairchild Load switch, good to 2.8 amps. Granted, it too uses a 1 meg pull up on one of its internal control Mosfets. But we're talking less than 1 uA, once the circuit trips.

The transceiver won't care about your MCU clock speed. I haven't used it very much, but I did use it with an ATtiny @ 4MHz once a few years ago in a school project. Sending a small packet every 1.5 seconds for 16 hours per day we estimated about 30 days of battery life.

Chips very rarely require a single specific voltage that they run at. The majority define a range. Common ranges are 2.0V-3.6V or 2.7V-5.5V. PIR sensors look to be a little bit special. Because they have a 3.3V regulator built into them, they need a higher voltage (Adafruit page says 5V-12V) to operate properly, so it won't work on 2 AA/AAAs without a boost converter.

If you have a mix of sensors that have a variety of voltage requirements that complicates power delivery significantly. Managing that is a significant challenge on its own.

PeterPan321:
You may find this circuit useful. I came up with this to protect a Lithium cell. It uses a Microchip part normally used for forcing a reset on low voltage (my part selection trips at just under 3V), which in turn controls a Fairchild Load switch, good to 2.8 amps. Granted, it too uses a 1 meg pull up on one of its internal control Mosfets. But we're talking less than 1 uA, once the circuit trips.

DIY Central

There are chips specifically designed to protect Lithium cells not just from overdischarging but also overcharging. Yours only protects against overdischarge. If you're going to go through the bother of making your own PCB, you might as well use the correct protection IC like this bq297x (which is one of a million that I just picked at random).

Jiggy-Ninja:
There are chips specifically designed to protect Lithium cells not just from overdischarging but also overcharging. Yours only protects against overdischarge. If you're going to go through the bother of making your own PCB, you might as well use the correct protection IC like this bq297x (which is one of a million that I just picked at random).

First, my post was directed at terraduino, whose need might be assisted by the specific circuit I presented. I don't recall him asking specifically about lithium cell protection. Second, my circuit was an add on to an already designed and fabricated system that had a lithium cell charge manager (a max1555), which does not employ over-discharge protection, but also required no external MOSFETs, as the TI chips (and most battery management ICs) do. My PC board was an interim design phase which worked, and was later added to a subsequent version of the main circuit. I stuck with it because in the end, the MAX1555 together with the circuit I presented was a significantly cheaper solution. You can insist I "might as well" use what you call a "correct" IC, but sometimes the "correct" approach is the least expensive solution that works reliably. Also in this case, my "interim" solution was found useful to a lot of my DIY customers who have plenty of alternate ways of safely charging their cells, but did not have a way of protecting their circuit in the event it was accidentally left on.

One function of the forum is to give people a place to bring up ideas for discussion mainly asking for help of some kind.
Another function is to leave a record that others may read to find solutions or just understand the subject better.
JN's post may help others who don't have your particular hardware.

Threads are like open rooms in a house party, everyone in the room has a voice. JN had no idea about your particular hardware since you never brought it up while asking for help so the least you can do is not play gotcha-trap about it while he can kick himself for not demanding a complete circuit first.

If you want to discuss a matter in private then it is better to use private rooms (PM).

@PeterPan321
Thanks for your circuit link, have bookmarked it. Although I use some of those (arbitrarily picked ebay link) to protect my LiIon. However, these seem to produce some problems themself I could not track down yet. But that's something for another thread. :confused:

Jiggy-Ninja:
The transceiver won't care about your MCU clock speed.

It does not,not even indirectly? I'm really not into it and I thought SPI clock depends on uC clock. Thankfor bringing this up.

Jiggy-Ninja:
ATtiny @ 4MHz

My ATTiny13a are clocked 4.8 MHz and work stable and reliable with that. Will try with 1.2 MHz next :slight_smile:

Jiggy-Ninja:
Chips very rarely require a single specific voltage that they run at. The majority define a range.

True, but most sensors I tested stated 3.3V as lower boundary. I have some with lower boundary and some with 5V. Unfortunately, sometimes I mix these modules ...

GoForSmoke:
One function of the forum is to give people a place to bring up ideas for discussion mainly asking for help of some kind.
Another function is to leave a record that others may read to find solutions or just understand the subject better.

I agree.

GoForSmoke:
JN had no idea about your particular hardware since you never brought it up while asking for help so the least you can do is not play gotcha-trap about it while he can kick himself for not demanding a complete circuit first.

I'm sorry but are you barking up the wrong tree here? I (terraduino) asked for advice in this thread. @PeterPan321 came along to give some advice he thought could be helpful. Although I did not ask for this specifically, I appreciate that someone shares his or her experience.
As you can see, I did not ask for advice in regards to ultra low power projects but I really appreciate @Jigga-Ninja 's comment because I definitely can learn from that--even if I have no need for that ATM. :slight_smile:

GoForSmoke:
If you want to discuss a matter in private then it is better to use private rooms (PM).

Good advice. In this spirit, would a PM to @PeterPan321 not have been the better choice?

Peace & best

terraduino:
It does not,not even indirectly? I'm really not into it and I thought SPI clock depends on uC clock. Thankfor bringing this up.

Yes, the SPI clock does depend on your controllers clock frequency, though you do have some coarse control with the prescaler. I'm saying that the transceiver won't can about what the SPI frequency is, as long as it's within the chip's limit (10 MHz).

My ATTiny13a are clocked 4.8 MHz and work stable and reliable with that. Will try with 1.2 MHz next :slight_smile:
True, but most sensors I tested stated 3.3V as lower boundary. I have some with lower boundary and some with 5V. Unfortunately, sometimes I mix these modules ...

Mixing power requirements complicates things significantly.

I'm sorry but are you barking up the wrong tree here? I (terraduino) asked for advice in this thread. @PeterPan321 came along to give some advice he thought could be helpful. Although I did not ask for this specifically, I appreciate that someone shares his or her experience.
As you can see, I did not ask for advice in regards to ultra low power projects but I really appreciate @Jigga-Ninja 's comment because I definitely can learn from that--even if I have no need for that ATM. :slight_smile:
Good advice. In this spirit, would a PM to @PeterPan321 not have been the better choice?

You want to run a bank of sensors for a year. How is that not a low power project?

If weight, size, and cost are not a constraint, you can always throw more battery at the problem. With 3,000 mAh of capacity, you can afford about 300 uA of average current usage for it to last one year. Double that, and you can last 2 years off the same battery or last 1 year with double the current draw. It's that simple. But how do you know how much battery your project will need?

Whenever you are dealing with a finite consumable resource (whether battery capacity or money), you need a budget for it. It doesn't matter if you're running off of a coin cell or a car battery.

PeterPan321:
Also in this case, my "interim" solution was found useful to a lot of my DIY customers who have plenty of alternate ways of safely charging their cells, but did not have a way of protecting their circuit in the event it was accidentally left on.

If you have 'customers' is this a commercial product ?

Jiggy-Ninja:
Yes, the SPI clock does depend on your controllers clock frequency, though you do have some coarse control with the prescaler. I'm saying that the transceiver won't can about what the SPI frequency is, as long as it's within the chip's limit (10 MHz).

Thanks for clarifying this.

Jiggy-Ninja:
You want to run a bank of sensors for a year. How is that not a low power project?

You gave the answer yourself already :wink: More batteries, simple as that. Seriously, it's a trade off as you wrote. I'm trying not to waste energy with my sensors. But I don't want to overcomplicate things. There is no clear and hard line I won't cross. But when I feel that 80% of my personal effort, say time and brainpower, leads to 20% output I might call it a day.
That being said, I'm really happy with sleep current of less than 50 uA. Looking at the peak and estimated average current drawn when awake I should be pretty close to the goal, i.e. 333 days depending on the LiIon quality/self-discharge rate. Even with 3 AA NiMH I should get more than 250 days out of it but I have to match the cells perfectly--already learned that lesson.
Despite that I have the impression that we have different definitions of low power. :slight_smile: At lest, I'm not aware that "low power" is a well defined technical term. I would say: I don't aim at running anything of a coin cell for a year. But I know professional can do that and, in general, produce much more efficient projects.

Thanks again & best

terraduino:
Sorry, I don't understand what you mean.

Assuming the MOSFET is correct now, the left circuit does not work?

The left one will work. The right one will not (it will supply current all the time).

Smajdalf:
The left one will work. The right one will not (it will supply current all the time).

Agreed.

Been there, tried that, soon worked out why it does not switch 'off'

Thanks to all & best

srnet:
Agreed.

Been there, tried that, soon worked out why it does not switch 'off'

The port connects to GND when the ATmega is off? Or am I missing something else?
I expect the port to be in high-impedance input mode, in which case R6 would switch off the MOSFET.

wvmarle:
The port connects to GND when the ATmega is off? Or am I missing something else?
I expect the port to be in high-impedance input mode, in which case R6 would switch off the MOSFET.

There are protection diodes on all pins both to Vcc and GND. So "high impedance" means high impedance as long as signal is between GND-0.3 V and Vcc +0.3V. If ATMega have power cut it means GND+/-0.3V

Right... now I get it, thanks.