How to disconnect sensor Vcc line during sleeping period to save battery power?

Hi, please help me get through this power leaking problem on sleeping mode. I want it to go to sleep at at micro Amp level. Then wake up periodicity (1s) to do the sensor scanning at normal current consumption.

The system includes:
A Sharp GP2Y0D810
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 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 tried with the transistor but did not work out see attached image or link.

Can any one tell me how to put the IR proximate sensor to sleep (at micro amp level) to save battery life ?

Appreciate your help !
Thanks
A.H.

Have you considered following the advice in the link you posted- relevant extract below?

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.

Alternatively you can try wiring the Vcc of the sensor to a digital output pin and controlling it from there.

Thanks for your feed back !

I tried to connect directly to arduino I/O pin and control from there. However, the sensor did not scan at all.

You made a very good point on Enable pin. I will try it out. According to my pointing on the attached image, Do you think it is a right place to cut the trace?

Thanks,
A.H.

Check for "optocouples" or "mosfet solid state relay", they are small devices that act like a switch and can be controlled by a digital output from arduino. They can have very low on resistance, suitable for battery powered.

I used this on one of my projects: VO1400AEFTR MOSFET Relay, 60 V, 100 mA, 5 ohm, SPST-NO

Just connect a 440 ohm series resistor from digital pin (assuming 5V pin) from one side, and the other side connect power and the device you want to control.

just small comment post you images using some web based sharing like http://postimage.org/
nobody wants to download files

and read this:
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.

cut the connection>solder wire to control Vcc ON/OFF switch> use arduino pin to connect it on/off

good luck!

Hi all,

I was able to power off the sharp sensor after cutting the trace and connect Enable pin to arduino pin. Just like what I pointed out on the image. It works for me.

Thanks all !
You made my day.
A.H.

rw950431:
Alternatively you can try wiring the Vcc of the sensor to a digital output pin and controlling it from there.

Not a great idea. You'll yank large currents through the Arduino pin charging the decoupling
capacitors on the module.

The standard method is to power the sensor through a p-MOSFET or power switch IC, or even
a PNP as high side switch.

good point MarkT

arduno_dude its good to change you initial post to RESOLVED

Cool,

Sure, I'll explore the experiment on using P Mosfet. Great suggestion !

Another thing:
I wonder if I can use P Mosfet to disconnect the Vcc line of the Servo motor ? I'm sure we can do it on a standard 2 wires motor. However, a servo has a 3 wires output. I don't know if if conflicts internally with the signal wire.
My servo has 1A at peak.

Thanks
A.H.

Tatikas:
just small comment post you images using some web based sharing like http://postimage.org/
nobody wants to download files

Even better, after attaching an image to a reply, “post” the reply, then copy the image URL from below the reply. Next, edit the reply and paste the URL into image tags using the “Insert an image” button. This way, the image is hosted on the Arduino forums rather than an external site.

9bd1dca47f8cdb4cacef05b3797395d24a39b59e.jpg


7a8d7792429f299ba4f7d2f678e928939a0a3bf4.jpg

Nice tip OldSteve- but one wonders why this doesnt happen automatically..

rw950431:
Nice tip OldSteve- but one wonders why this doesnt happen automatically..

Yeah, it would be nice, wouldn't it? I was quite surprised when I first noticed that "Insert an image" only catered to images that are already hosted somewhere.