1
\$\begingroup\$

I want to blink 3 different coloured LED's with different timing repetitions.

Red - every 2 minutes. Green - every 25 minutes. Blue - every 2 hours.

Components in the circuit:-

  1. 3 different coloured LED's
  2. Small vibration motor (heptic alert)
  3. Small battery 150-300 mAh.
  4. micro-usb to charge the battery

As I want to maximise the battery life I am confused which IC's or MCU's to use for this application. The vibration motor will function with all 3 LED's. To find a balance with cost and battery consumption is really difficult.

The timer IC I found with very low power consumption is TPL5010. But I will have to use 3 of these to control 3 LED's. If I use a cheap MCU like ATTINY9 it doesn't have a RTC for time keeping. To achieve lower power consumption the LED's can be turned on and off with quick intervals but is an MCU necessary for this?

What is the best way to achieve my application? Thank you!

\$\endgroup\$
4
  • 3
    \$\begingroup\$ How accurate the time needs to be? How much current do the LEDs and motor consume? How long the LEDs or motor will be on when they are on? Figure out those values and then determine how much does the MCU consumption affects the battery life. Make sure the MCU sleep modes are available and use them. \$\endgroup\$
    – Justme
    Commented Jun 22, 2021 at 16:40
  • \$\begingroup\$ Use HCMOS logic to gate the outputs of one or more HC4060, 4040 or 4024 low power ripple counters. That TPL5010 is a neat device though. \$\endgroup\$
    – Neil_UK
    Commented Jun 22, 2021 at 16:48
  • 2
    \$\begingroup\$ If you just want delays, without any particular reference to time-of-day, you can program the necessary timers and counters into any MCU - no need for an RTC. \$\endgroup\$ Commented Jun 22, 2021 at 17:26
  • \$\begingroup\$ @PeterBennett So the cheapest MCU ATtiny9 looks a good option for me. As I need to turn LED's on and off for lower battery consumption looks like a MCU is necessary. \$\endgroup\$
    – Arahasya
    Commented Jun 22, 2021 at 18:03

2 Answers 2

1
\$\begingroup\$

You don't need that timer IC at all, nor an RTC. Modern microcontrollers have low-power timers, which you can simply program to wake you up in a few seconds, or a minute, or two. There's no advantage to not implementing this functionality on a microcontroller; you just program your microcontroller to set a timer to wake in two minutes, change the LED state, program the timer to wake in two minutes (or 1 minute, should this be an odd multiple of 24th minute, and you need to activate the 25 minute LED). Every time you wake up, you check which LED's state to change.

The total parts cost of this is probably 3 LEDs, a sufficiently low voltage source (battery) so that you don't need a series resistor for these LEDs, a microcontroller, and a decoupling capacitor; if your timing needs to be exact, a crystal oscillator. No other approach will be as precise, cheap or easy.

As long as they are on long enough that you can see the LEDs light up, the total power consumption (over a day) of the microcontroller will almost certainly be lower than that of the LEDs, significantly so. An LED takes ~ 10 mA, a modern MCU in low-power timer mode ~ 50 µA.

\$\endgroup\$
3
  • \$\begingroup\$ thanks for your precise answer. Just wanted to make sure a MCU is necessary or there are any existing IC's which can do this application. I intend to reduce LED current with dimming. \$\endgroup\$
    – Arahasya
    Commented Jun 23, 2021 at 4:46
  • \$\begingroup\$ "dimming" here hopefully means "quickly switching on and off"? Because "dimming" with a variable resistor burns your battery's energy in that resistor. But if it means "quickly turning it on and off", then it does not reduce the LED current while on – it just reduces the average current by reducing the amount of "on-time". \$\endgroup\$ Commented Jun 23, 2021 at 7:53
  • \$\begingroup\$ yes I meant quickly switching it on and off. Yes I have read it can drastically reduce average current. Another challenge is to accurately calculate current consumption \$\endgroup\$
    – Arahasya
    Commented Jun 23, 2021 at 8:17
1
\$\begingroup\$

Current consumption in a micro controller can be dramatically reduced by using a lower clock speed.

For example, here is the "Active Supply Current" for the Attiny9 using a 3.3V supply at various clock speeds:

  • 12 MHz - 1.5 mA
  • 1 Mhz - 0.31 mA
  • 32 Khz - 0.013 mA

(From: https://ww1.microchip.com/downloads/en/DeviceDoc/ATtiny4-5-9-10-Data-Sheet-DS40002060A.pdf pp. 131-133)

And you can save more by sleeping.

A 32 KHz external crystal is enough for accurate time-keeping -- RTC chips use them for their timebase.

So use a lower clock speed if you're concerned about power usage.

\$\endgroup\$
2
  • \$\begingroup\$ Thanks a lot! Should I add another chip to reduce voltage of Lipo battery from 3.3 to 1.8 or just reduce the clock and keep the voltage? \$\endgroup\$
    – Arahasya
    Commented Jun 23, 2021 at 4:48
  • 1
    \$\begingroup\$ I would just keep the voltage at the lipo battery voltage -- you'll need that anyway to power the LEDs and if you go to 1.8V you'll need output transistors for the LEDs. Also, a switching power supply to convert the lipo battery voltage to 1.8 is very inefficient at low currents. There shouldn't be any need to even use a voltage regulator -- just use the battery voltage as Vcc. \$\endgroup\$
    – ErikR
    Commented Jun 23, 2021 at 4:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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