Electronics > Beginners
How do IR remotes wake up on key press?
Peabody:
I'm working on an Arduino-based IR remote code generator that will work like a standard remote, using keypress entry on a 4x3 matrix keypad. And I want the battery to last a long time. I always assumed that remotes were truly OFF, and drawing no current at all, until a key is pressed. But I'm having trouble coming up with a way to do that, so maybe my assumption is wrong. Does anyone here have experience designing remotes?
If the processor has to ON, but asleep, until a key is pressed, then with Arduinos in particular I would be concerned about how deep the sleep could be and still wake up fast enough to process the keypress, particularly if the oscillator is off during sleep.
agehall:
Check the data sheet for whatever MCU you are looking to use. I would not expect the wake up time to be a huge problem for a remote control application. Things move so slowly in the world of user interactions anyway that whatever time it takes the MCU to wake up, it is probably nothing compared to the speed with which the user presses the buttons.
Ian.M:
A 455KHz resonator can start and become stable in 1000 cycles. That's under 2.2ms, which is negligible in human button press terms. If you use the stock Arduino ceramic resonator, it may take a few more cycles, but at 16MHz the delay is truly negligible. Other wakeup or reset delays should be insignificant.
Use a bare AVR so you don't have all sorts of stuff on the rest of the board leaching off your Vcc rail, and put it in power-down sleep mode waiting for a pin change interrupt to wake it up on any keypress on any of the key matrix lines (e.g monitoring all the rows as inputs with internal weak pullup with all columns set to output '0' immediately before going to sleep), and, assuming you don't need any sort of timed wakeup, an ATmega328P can draw less than a uA, so 3x A76/LR44 alkaline button cells (for Vcc=4.5V dropping to 2.7V at EOL, so use INTOSC or an 8MHz resonator) will basically last as long as their shelf life if the remote is rarely used.
In practice board surface leakage current through accumulated spooge under the contact mat will probably dominate. 3x AAA batteries would be a better choice if you can afford the weight and volume, as their larger capacity can tolerate a much higher quiescent current without impacting the usable lifespan.
golden_labels:
LR6 (Alkaline AA) at 5mA discharge rate work for 600–800h(1). On log-log scale the current/service hours curve is approximately linear, so I guess they may hold for over 4kh with a µC running in sleep mode. And that is half a year. 3Ah, low self-discharge rechargeables are also available and they will easily live that long too.
But even if my guess above is wrong, there are switches that are drawing no current when turned off (the default) and are activated by being pulled down/up. Then they conduct until they receive a turn-off signal. This way you may enable the controller whenever a key is pressed. There are existing parts to perform that task, but you may build one yourself. As it happens, Dave even made video on that topic (the first part is of interest to you):
Pulling down/up from multiple buttons may be achieved with a simple diode logic OR gate. Turning it off from Arduino may be a bigger problem, because you must keep the disable signal on while the µC itself is already being turned off. For this reason I would stick to just keeping the controller in the sleep mode if that suffices. Otherwise the cost of parts needed for the circuit may exceed the cost of using the solution based on keeping the controller in the sleep mode. Not to mention all the pain of implementing it and space wasted.
____
(1) Based on the datasheet for Duracell Coppertop, as an example of consumer AA batteries.
mikerj:
Many micros can be configured to wake up from sleep by a change in port pin state. Use these pins for your key scanning.
Navigation
[0] Message Index
[#] Next page
Go to full version