Only Power circuit when switch is depressed

BenG

May 3, 2017
4
Joined
May 3, 2017
Messages
4
I'm having a bit of a brain fog here (and I'm a software guy by trade - this is just a home brew project).

I've got a simple remote control unit (circuit diagram below). Basically; there's two switches, pressing each one sends a message over the air. It's powered by a 9V PP3 battery, regulated down to 5V. I need the remote control to last for serveral hours and even turnign the radio module off when it's not needed. I'm not gettign the battery life I want/need. The uC is an Arduino Nana and the switches I'm using are https://uk.rs-online.com/web/p/push-button-switches/9131706

Draft-Power-Orig.jpg


So in my next revision of the board, I only want the system/circuit to be powered when one of the buttons is being held. So my thought was I'd route the battery connection via each switch then somwhow workout which of the switches was being depressed. Sadly I've not got very far as my mind has gone blank on the logic for this (below is as far as I've got)
edit.jpg


I'm sure there ust be a simple way of achieving this (and I may even realise over a G+T tonight). But at the moment my mind is blank.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
14,308
Joined
Nov 17, 2011
Messages
14,308
A DPDT switch may work. The issue is whether the arduino and the radio chip "wake up" fast enough to send the command before you release the button.
A better option may be to put the arduino and the radio into sleep mode when not in use. Configure the arduino such that an interrupt from an activated button "wakes up" the arduino. The sequence of events to handle in software would be along these lines:
  • After waking up, the arduino wakes up the radio
  • Arduino sends a command
  • Arduino puts radio to sleep
  • Arduino puts itself to sleep
You should also use a very low power voltage regulator (your image is too small to identify which one you're using).
 

Bluejets

Oct 5, 2014
7,374
Joined
Oct 5, 2014
Messages
7,374
I've got a simple remote control unit (circuit diagram below). Basically; there's two switches, pressing each one sends a message over the air. It's powered by a 9V PP3 battery, regulated down to 5V.

Using these with Arduino for all but the lowest power drain projects is asking for trouble.
Use some decent AA cells at least during initial project tests.
You can always revert back to the PP3 if you really must once you determine it is of sufficient capacity ( which is always questionable) especially when you quote "want it to last for several hours".
 
Top