Author Topic: How to disconnect sensor Vcc line during sleeping period to save battery power?  (Read 3869 times)

AustinH

  • NewMember
  • *
  • Posts: 5
Hi, please help me get through this power leaking problem on sleeping mode. I want a system to go to sleep at at micro Amp level. Then wake up periodicity (1s or so) to do the sensor scanning at normal current consumption.

A system includes:
A Sharp GP2Y0D810 sensor                link: https://www.pololu.com/product/1134
Arduino Mini Pro 3.3V
4 AA batteries

I could reduce Arduino Mini Prov 3.3V current to micro Amp level on sleeping mode. However, the Sharp GP2Y0D810 sensor still consume at 5mA regardless when arduino goes to sleep. It's because the Vcc line connects to the Vcc line all time. I did some research and find out that the Vcc line got to be disconnected when sleep in order to save battery power.
I followed the tutorial with the 2N3904 transistors but did not work out see attached image or link: http://lowpowerlab.com/blog/2013/03/01/mailboxnotifier-moteino-based-mail-event-notifier

I wonder can I treat the Sharp GP2Y0D810 as same as the hall effect sensor on above tutorial.
OR How to put the IR proximate sensor to sleep (at micro amp level) to save battery life ?

Appreciate your help !
Thanks
A.H.
« Last Edit: January 07, 2016, 09:55:08 PM by AustinH »

WhiteHare

  • Hero Member
  • *****
  • Posts: 1300
  • Country: us
Why not power it from a GPIO pin so that you can turn it on-off that way?

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Yup, you could just power it from a digital pin while you interact with it.
The thing I've done in the photo is really old and I could totally have just powered the hall from a pin rather than through a NPN, I can't recall if there was any other reason if I did it that way but I can't think of any.

AustinH

  • NewMember
  • *
  • Posts: 5
Thanks for your inputs.

I did try to directly connect the Vin and signal pins of the Sharp GP2Y0D810 sensor to 2 digital pins on Arduino Mini Pro 3.3V.
However, it did not work out even though the Arduino digital pin has max. out put 150mA while sensor just consumes 5mA.
The sensor just could not read.

Any other suggestion?
Do you think the 2n2222 transistor + 10K resister will make it?

Regards
A.H.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
However, it did not work out even though the Arduino digital pin has max. out put 150mA while sensor just consumes 5mA.
Actually atmega pins have an outout of about 20ma tops. Still well in the range of 5ma. You gotta make sure your sensor is indeed 5ma, and that it won't require any initialization or delay before you read it, that is a common thing with many sensors.

So a more accurate sequence would be: pin:HIGH, (delay or init to allow sensor to boot up and respond), read sensor, pin:LOW.

AustinH

  • NewMember
  • *
  • Posts: 5
Hi foxes,

At first, I connected sensor Vcc pin to an Arduino digital pin 12. The sensor was not able to scan when pin 12 goes HIGH. And when pin 12 goes LOW, sensor data become scattered due to power lost.

I ended up doing this and worked for me.

The GP2Y0D805, GP2Y0D810, and GP2Y0D815 have an optional enable input that can be used to put the sensor into low-power mode. The Pololu carrier board connects this input to Vcc so that the sensor is always enabled, but you can solder a wire to the pad labeled “enable” on the back of the PCB if you want control over this input. Note that you will need to cut the trace that connects the enable line to Vcc on the PCB if you want to be able to disable the sensor. This trace is marked on the silkscreen, and there is a caret that indicates where we suggest you make the cut.

Thanks all for your helps !
You made my day.
A.H.

perky

  • Hero Member
  • *****
  • Posts: 873
  • Country: gb
Just to note that IO pins are speced at a certain current (e.g. 20mA) at a guaranteed logic 1 output level, and that's usually 2.4V for a 3.3V device. So in reality you can model the output stage as a resistor pulled to either Vcc or GND. A P-channel FET alone can be used as a top-side switch, or a P-channel with an N-channel if the voltage you're switching is higher than the Vdd of the processor. FDC6420C for example is a pair of P and N channel FETs in a single SOT23-6 package designed specifically for high side swiching.
Mark.