Arduino + cheap RF module. How to sleep the RF module?

Hello,

I'm fairly new to microcontroller electronics. Currently I'm trying to build a control from motorized shades (sure I could by some but flashing the credit card is only half the fun).

For the wireless transmission my current plan is to use one Ardweeny one each side of the transmission (http://www.makershed.com/ProductDetails.asp?ProductCode=MKSB012) and cheap RX modules, such as this RF link kit (http://www.seeedstudio.com/depot/315mhz-rf-link-kit-p-76.html). I also found a cheap motor driver and even cheaper geared motors (have I already mentioned the whole thing is supposed to be cheap?) The VirtualWire library should allow me to reliably communicate from the remote control (Arduino-based, too) to the controller.

Now my question is, since the receiving controller is powered by batteries, low power consumption is a prime concern. I'm not too worried about the power consumption while the shades are being lifted and lowered because that only happens twice a day. I read that I can put the ATMega168 into sleep mode where it only consumes 1.5uA or so. I figured I could let the ATMega168 wake up every 2 seconds, check for a wireless signals for a few ms and then go back to sleep. However the RF module that I'm planning to use does not have a sleep mode so even if the ATMega168 sleeps, it would still continue to run and consume power.

My question is, is it feasible to cut off the RF module from power, and power it back up when the microcontroller is awake? And how would I do that (what parts)? The specs of the RF Kit don't mention it's power consumption but I would think that using a digital I/O pin is a bad idea (max. 8/16mA). And the same thing actually goes for the motor driver, too.

Thanks a lot for your input, Christoph

Put a n-channel mosfet transistor between the devices ground pin and battery - pin (arduino ground). Before turning the mosfet off, set all ardweeny pins to low. Then turn mosfet off.

Hello CrossRoads,

thanks a lot for your suggestion. So I read up on MOSFETs and they seem to fit the bill. Just to be clear, when you say "set all pins to low" you are talking about all pins EXCEPT the one controlling the MOSFET? Then set the pin for the MOSFET to low?

And two more things if you don't mind :-) From what I could find out, an enhancement type MOSFET would be the correct one (like a normally OFF switch). And finally, is it common practice to put a MOSFET between ground of the device and - of the battery, and not between + of the battery and VCC of the device? Is that so there cannot be any flow through (positive) signal lines coming into the device to ground, essentially consuming power even though the device is turned off?

Thanks a lot for your help,

Christoph

  1. Yes. Turn the MOSFET on first when waking up.

  2. Yes.

  3. N-channel would go between device & ground. P-channel to go between +Power & VCC pin. Problem is you need to drive p-channel high to change to off state, and if +power is like 12v, then the gate needs to go that high too. Where as n-channel can switch current to ground, and typically with lower Rds too, and be less expensive, with just a 4-5V input using a Logic Level part.

Lastly, yes.

Cool! I think I'm getting the hang of it :-)

Thanks, Christoph

Update: I recently read about another, and if it works, easier way to do this. Since the RF modules I’m using only need current in the range of 4mA (I verified this), I should be able to power them using a digital out pin. And what might make it even easier is that the VirtualWire library has a PTT (push to talk) pin. The only problem with the PTT pin might be that the time between when VirtualWire activates the pin and actually sends data might be too short for the TX chip to start up. In that case I’d have to control a separate pin myself.