Interrupt pin and power consumption

The one I quoted further up though, is already in a nice plastic package and has mounting holes, so it is ready to screw to the door. Saves you having to make that stuff up.

There is more than the capital cost of the parts. A switch that is normally open (ie. NC in your case because of the magnet) will use less current, say 500 nA compared to 5 µA. So, other things being equal, it lasts 10 times as long. Hence you have to replace the battery less often which saves the cost of the batteries, and also the labour of doing the changeover.

True but whose cost is it? Mine or the customers? Playing with lower and lower uA it becomes kind of useless once you get close to the discharge rate of a coin cell. As long as I can get a minimum of 1 year out of a coin cell, that has become the standard minimum of IOT battery replacement.

Here is a reed switch example, only 35+ cents in mass quantity.

I know you gave examples of already made magnetic door strikes but picture a small sensor puck that is the size of a quarter(ish) and can mount to any surface, and all you need to do is put a grain of rice magnet close to it and act as a switch. You just made a small, smart, wireless sensor that you can practically on off any moving object!

Here is a reed switch example, only 35+ cents in mass quantity.

Where?

Strange, I thought I linked it, sorry :(

http://www.digikey.com/product-detail/en/CT10-1540-G1/306-1124-2-ND/388961

SO an update, I connected a 10Mohm Resistor and my current draw is only 3.1-3.2uA when the switch is engaged and 2.7-2.8uA when the switch is removed. I think that is really livable numbers. So far not getting any false positives which is great. :)

Sounds pretty good.

This is testing using the Binary Switch Sleep sketch.

The switch is not active when its in its “open state” so there is no drain. I removed the resistor though and all the jumpers, I am still getting around 2.7-2.8uA is sleep mode without switch.

In sleep mode with the NRF ONLY VCC unplugged I am getting 1.3uA - 1.5uA.

In sleep mode with ALL cables unplugged from NRF I am getting a strange reading and not really sure which one is accurate but here are my numbers:
With uCurrent in uA mode I am getting .4uA -.5uA
With uCurrent in nA mode I am getting 110-120nA

I checked on Gammon site using the reference code, the nA of 110-120nA is accurate and the uA mode is wrong when I go down that low. So in short, I am getting 110-120nA when nRF is unplugged completely.

I wonder why the NRF chip draws so much current of 2.6uA or greater :frowning:

The NRF chip should only use 900 nA in power-down mode. Mind you, it is hard to measure such low currents accurately.

Even if I have a uCurrunt Gold and a Fluke 179 multi meter?

The difference from 2.7uA to 120nA is quite large.

OK, well I just put 3.3V into (one of) my NRF24L01 direct from the power supply (no other wires) assuming it would start off in power-down mode. It is drawing around 800 nA, which is what is advertised. So can you do that? (No other connections).

You really have all the toys dont you? lol I left work now as I leave all my toys at work! I will reply tomorrow on my findings.

[quote author=Nick Gammon link=msg=2361102 date=1439849801] OK, well I just put 3.3V into (one of) my NRF24L01 direct from the power supply (no other wires) assuming it would start off in power-down mode. It is drawing around 800 nA, which is what is advertised. So can you do that? (No other connections). [/quote]

Nick, do you know any external clocks to act as an external interrupt to wake an Arduino out of sleep mode? That way I dont need to use the WDT and consume 6uA+ uA?

I thought you were using the pin change to wake it? Wasn't that the whole idea of the 1 M resistor?

Yes, but if I had a timer option as well that would be better, that way I can wake up check for any updates go back to sleep ect. So as an alternative option, if there was an external timing interrupt out there, that would be great!

I presume that, as Atmel were extremely power conscious with the Atmega328P, that they would have kept watchdog power to the minimum. Now I suppose another manufacturer might make a watchdog that uses even less power, but it might be marginal.

A quick search reveals the STWD100. That apparently uses 13 µA current, so no great savings there.

Or the DS1232 - operating current 500 µA.

Maybe I'm misreading these data sheets, but it seems that Atmel have done a pretty good job.

Bear in mind the current your watchdog uses would have to be added to the sleep current of the Atmega, unless it is completely powered off in the meantime.

What about this one?

Sounds good. How much is it? Looks like it is pretty small. :)

When I am running the BinarySwitchSleepSensor sketch:

Sleep current: 2.7-2.9uA with NRF/Arduino fully connected Sleep current with nRF GND disconnected: 1.7uA Sleep current with nRF VCC and GND disconnected: 294nA Sleep current with nRF VCC/GND/Pin9 disconnected: 281nA Sleep current with nRF VCC/GND/P9/P10 disconnected: 196nA Sleep current with nRF VCC/GND/P9/P10/P11/P12/P13 disconnected: 110-112nA

Sleep mode with ONLY Arduino: 110-112nA NRF plugged into VCC/GND only: 800-900nA

Sleep current with nRF GND disconnected: 1.7uA

I am guessing you are parasitically powering the NRF. Before sleeping make sure you set the connections to it to high-impedance. For example, SPI.end() followed by making sure the SPI (and other two) pins are inputs (or maybe outputs and LOW). For example, a snippet from my code with that gadget:

  bool ok = radio.write (&reading, sizeof reading);
  radio.startListening ();
  radio.powerDown ();
  SPI.end ();
  // set pins to OUTPUT and LOW  
  for (byte i = 9; i <= 13; i++)
    {
    pinMode (i, OUTPUT);    
    digitalWrite (i, LOW); 
    }  // end of for loop
  ADCSRA = 0;  // disable ADC
  power_all_disable();