0
\$\begingroup\$

I want to make a small "visual alarm" device that turns on a LED every day at a time (e.g. 17:00) and turns the LED off on button press or (if no button was pressed) at a later time (e.g. 22:00).

I have made something like that on a Raspberry Pi 2. But I now want it much smaller and powered by a small battery (one AAA or one CR2032). Even the Pi Zero is too large for the use case.

What component is a good fit for this task? (Microcontroller? RTC? I do not know what the correct category term is.)

My longer term goal is to make several of these small devices and place at different locations as visual cue reminders to perform a daily task. Like a spatially distributed daily checkbox list.

Required: As already noted, must be able to turn on/off LED based on time and button press. Time variation +/- 15 minutes accumulated over a week is ok, if I can fairly quickly reset back to the correct time manually once per week.

Also relevant:
- low cost (at most half the price of a raspberry pi zero)
- at least 1 week battery with one AAA battery

Not needed: wireless connection, quick way to change on/off times, bells and whistles.

Also relevant: I'm not experienced with microelectronics beyond some pretty basic Raspberry Pi use, so components that require advanced skills to program and/or advanced tools to work with are not a good fit.

Note: I have tried to research this but got overwhelmed by a lot of component terms (like RTC ICs) and possible dependencies on other components.

Edit: The use case is at evening in not very brightly lit rooms so even the kind of tiny power notification LEDs some laptops/smartphones have would probably be enough.

\$\endgroup\$
  • 2
    \$\begingroup\$ The TI MSP430 is probably one of the lowest powered devices for timing requirements, like this. But it's not the smallest device. Microchip makes some SOT23-6 PIC10 devices (PIC10LF322, for example.) The MSP430 supports watch crystals, which come in varying inherent accuracies and for which you may need to do some tweeking (not hard) to get them quite accurate over extended times. However, I'd recommend a CR2032 or similar as the battery supply. There are only very few MCUs that will operate at the range from 1.2 V to 1.5 V. You'd need a voltage boost chip for most MCUs. \$\endgroup\$ – jonk May 5 at 21:51
  • 1
    \$\begingroup\$ How do you plan on setting the time and alarm times? \$\endgroup\$ – Mattman944 May 5 at 21:54
  • \$\begingroup\$ @jonk they are actually not that uncommon, but it's hard to drive a (visible light) LED with 1.5 V directly! \$\endgroup\$ – Marcus Müller May 5 at 22:03
  • \$\begingroup\$ (@jonk had a jewlery project that sadly never saw the light of day, and found quite a few < 1.5V operational µCs with RTC) \$\endgroup\$ – Marcus Müller May 5 at 22:03
  • \$\begingroup\$ @Mattman944 the times will be fixed for each device. So I will program/flash the fixed on/off time via whatever method the particular MCU uses. \$\endgroup\$ – rewan May 5 at 22:14
1
\$\begingroup\$

The usual approach here is

  • Use a microcontroller with integrated RTC
  • Use a lithium coin cell, e.g. the CR2032, they have an incredible storage life, and you really don't need much power
  • make sure to pulse the LED, which gives much perceived brightness per energy used

To that end, something like an ATMEL SAMD10 should have about 10 µA of standby current while still keeping the RTC on, and can run directly off the battery.

How to program that: good question; your 15min off per week is a pretty relaxed constrain (because: 15min/(60min/hr·24hr/d·7d)= 6.67% tolerance), so that reprogramming could be pretty rare. If you can just press a button that means "remind me exactly now, every 24hrs", that would probably be easiest to code :)

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ I'm in Europe and so far only find ATMEL SAMD10 with $20 shipping cost for 1 unit. Would e.g. MKE04Z8VTG4 (also an ARM Cortex-M0+ MCU) work similarly? Data sheet says RTC but there is so much info there that I don't grasp how comparable they are. nxp.com/docs/en/data-sheet/MKE04P24M48SF0.pdf \$\endgroup\$ – rewan May 6 at 12:11
  • \$\begingroup\$ If you can just press a button that means "remind me exactly now, every 24hrs" No, LED must turn on at same time (e.g. 17:00) daily independent of LED off time. Can the MCU do this logic? On power on: assume time 16:59:50 + start keeping time. At 17:00: do regular power mode + turn on LED + start button monitoring. At 22:00 or button press event: turn off LED + stop button monitoring + do low power mode. I could then once a week (or more seldom if time drift is small) manually pull and reinsert battery at 17:00 to resync the device. \$\endgroup\$ – rewan May 6 at 12:16
  • \$\begingroup\$ no I meant you give the device a dedicated button that means "in 24h and every 24h after that, turn on the LED"? Would that make sense? \$\endgroup\$ – Marcus Müller May 6 at 12:24
  • \$\begingroup\$ (an MCU can implement any algorithm: it's turing complete) \$\endgroup\$ – Marcus Müller May 6 at 12:25
  • \$\begingroup\$ Ok, I understand now. But I do not want an extra button. Prefer: As soon as device gets battery power turn on LED. Turn off 5h later or on button press. Repeat pattern every 24h. Or is what you suggest simpler to do? If with extra button you mean a power reset button then our two ideas are the same I guess. \$\endgroup\$ – rewan May 6 at 12:37
0
\$\begingroup\$

Pain will be the single AAA, 2 in series makes it much easier, due to not many chips that can go as low as 1V on supply voltage,

How I'm thinking you will have it connected:

RTC chip with an alarm function built in, connected to a low power micro, e.g. an attiny,

the RTC alarm output is setup with the flag mode instead of the short pulse, this way it has to be cleared by the micro before it will set that pin low, The led is switched by this pin,

You have 2 or more buttons on the device to set the time and to allow clearing the flag, these should be connected to inputs that can wake the micro from power-down,

If you still need 1 battery, at this power level, a bucket brigade converter may be one of the more efficient.

Edit: If you want to make it fancier, you could use a cheap E-Ink display that the micro updates when you change your setting time so you can at a glance tell if its set right, and have almost no current draw while idle

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Don't use an attiny an RTC chip. You can buy plenty of microcontrollers that integrate an RTC, and work with < 1.5V, and use less power than an attiny. \$\endgroup\$ – Marcus Müller May 5 at 22:06
  • \$\begingroup\$ (you're still very right about the power supply, though: a LED usually won't turn on very much with 1.5 V, so a step-up converter, like a really simple diode voltage multiplier fed by GPIO pins, might be a good approach) \$\endgroup\$ – Marcus Müller May 5 at 22:08
  • \$\begingroup\$ In my past research the integrated RTC chips with alarm mode active used less power than the internal RTC circuit in a number of similar micro controllers, leaving this combination as the longer battery life solultion. \$\endgroup\$ – Reroute May 5 at 22:08
  • \$\begingroup\$ if you're using AAAs, you can run a typical Cortex-M0 for years in sleep mode, anyway: the self-discharge of alkaline batteries is worse than the current draw. The attiny really isn't very much an efficient device, by modern standards. \$\endgroup\$ – Marcus Müller May 5 at 22:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.