Motion Sensor Power On IC

Thread Starter

DC_Kid

Joined Feb 25, 2008
1,242
so, i have a Adafruit Trinket 5v (tiny85). the board in full power down sleep mode still consumes some mA (even with the onboard led's removed). its being used with std AA batts and i need better sleep power control. i think the only way to achieve this is to cut the power completely from the board after a period of time, but it needs to be motion sensor type. motion turns power on, then say 10min w/o motion it turns off the power, then when motion is sensed it turns power back on. and, need the timer to keep resetting to zero when motion is sensed. the motion will be a small Hammond box that has buttons for a baby to push, lights and buzzers, etc.

and using a mechanical power switch is not an option.

any IC that can do this?
 

MrChips

Joined Oct 2, 2009
34,809
The standard approach begins with a proper systems design approach.

Firstly, you select a microcontroller platform that has a low power sleep mode. Modern ultra-low power MCU has sleep mode current consumption below 1μA.

MCU comes out of sleep mode after receiving an interrupt from any kind of stimulus, e.g. motion sensor, button press, timer event, analog input, etc.

Duration of power up before going to sleep is entirely up to the designer and is programmed into the MCU code or can be user adjusted.
 

philba

Joined Aug 17, 2017
959
No matter what you do, you will need some power to be able to detect motion. Adding something external doesn't make sense unless you make it a motion detector too and that's kind of a losing proposition.

Looking at the ATTiny85, if you can clock it at 1 mhz and 5V it will consume a bit less than 1 mA in active mode. at 3.3V is like .5mA. Power consumption is a complex thing but go look at the ATTiny85 datasheet. Starting on P 172 there is a huge amount of information on power consumption. But one thing is clear from 5 minutes of looking at it, slow your micro down and lower it's voltage.

But, I would start with figuring out how frequently you need to check for motion. It's all about the duty-cycle. Let's says you need to check 10 times a second. Let's also say that it takes 10 mS to do the detection cycle. Then you should be able to sleep 90% of the time (900mS out of 1000).
 

LesJones

Joined Jan 8, 2017
4,511
What type of motion sensor are you using ?
If you are using one that just closes contacts when it moves then I can suggest a method. (This is a copy of the method used in the Banggood component tester to power it off after a time.) The only current in the off state is the leakage current of a transistor.

Les.
 

Thread Starter

DC_Kid

Joined Feb 25, 2008
1,242
with just a bod_disable and pwr_down sleep, the Trinket board is ~1.4mA

however, when i write additional code to run a neopixel 16 ring the board uses ~15mA using the same sleep routine, and i dont know why that is, even after i remove everything from the board except for +v & gnd (even if i power it directly via the 5v pin which is aft of the regulator, but i tested w/ and w/o regulator w/ same results).

and yes, i know another IC will use power, but uA vs mA is a big diff for a batt, etc.

i dont have sensor yet, was thinking maybe an accelerometer type IC that can be programmed to fwd bias a npn output of a pin? an IC that uses uA to operate, etc.

i was also looking at passive method, like trigger a scr with one of the other buttons, and then have a RC charge to fwd bias a pnp bjt that would short anode/cathode of scr to turn it off, but have another button (when pressed) raise the cap so that the timer only hits the threshold of pnp bjt when no buttons are pressed.
 

MaxHeadRoom

Joined Jul 18, 2013
30,658
If using a processor with sleep mode as per @MrChips and in need of a sensor that does not require power when using sleep/wake mode a very small reed relay activated by a miniature button magnet on motion could be implemented and mounted in the box.
Max.
 

Thread Starter

DC_Kid

Joined Feb 25, 2008
1,242
hi Max,

having another IC to handle the on/off power to the tiny85 board is ok, as long as the other IC can sit idle in uA area, etc.

the sleep mode of tiny85 happens every ~10sec after a routine runs, thus having the power control IC shutdown after no motion for say 15min, this gives me some time to avoid the ~10s boot time of the tiny85 board. its like playing with the toy and when done it goes on the shelf until next play time, etc.


but, i think i may have found it (maybe)
see https://www.adafruit.com/product/3435?gclid=EAIaIQobChMIkazEhp2H1gIVR2t-Ch3-MgBeEAQYASABEgKFXfD_BwE
 
Last edited:

Thread Starter

DC_Kid

Joined Feb 25, 2008
1,242
i am thinking just a simple RC and fet. when other NO buttons are pushed it charges cap, when idle the cap drains off and fet goes off. simple/crude but works.
 

Thread Starter

DC_Kid

Joined Feb 25, 2008
1,242
i used a simple RC ckt. 1meg and a 220uF cap on a pfet gate. as buttons are pushed the cap drains out fast to gnd, if left alone the cap charges up to turn off fet. then later when a button gets pushed again the fet turns on and it takes just under 10s for the trinket to get past the usb bootstrap. elegant perhaps not, but simple and works.
 
Top