Advanced AVR 3.0 Core - Sleep, software and hardware-based power button Double click

Channel:
Subscribers:
585
Published on ● Video Link: https://www.youtube.com/watch?v=tAp9VJhKUrc



Duration: 2:20
5 views
0


How can 1 button and 2 LEDs be classified as advanced? How complicated can it be? This button is used in ways that utilizing hardware level techniques to detect signal edges, to denounce the noises generated by the button, to wake up the MCU from sleep mode and this button is also timed by semi-hardware for having 2 types of triggers: 1 for putting the MCU back to sleep mode and 2 for changing the LED brightness by means of double click.

High code efficient and responsive and precise and glitches free and energy efficient. The MCU is underclocked to 2.4MHz, required only to generate a true 8-bit pwm dimming signal at 888Hz, and once the MCU is Off, it consumes neglectable among of energy. Example Written for battery friendly power switch such as a flashlight. The CPU can be underclocked even lower, but 2.4MHz is faster to program and tinkering with, and at 2.4MHz Idle mode, the power consumes by the MCU is minimal.

Sleep:
The LED is powered by the timer with the MCU in idle mode underclocked essential using tiny amount of current in sub 600uA range. The MCU can generate a PWM signal even with its CPU halted, so this saves only few mA of power, a tiny percentage in comparison to a power LED. In power down mode, the MCU is operating in sub 600nA range. The power ON indicator LED consumes few mA as well, so the power On routine blinks it few times and turns it off to save some power.

In short, double-click to change the setting and single-click to turn the MCU/LED ON/OFF, simple idea, and simple project, written in the highest quality and using the lowest power possible. The code has been fully tested and polished over and over again, a very really good practice.

Note 1: the mini PWM board is not designed with low power in mind, just its 50K POT consumes about 100uA at 5v. One end of the POT can be connected to an I/O pin, so the POT can be disabled using software in power down mode.
Note 2: 146Hz is picked as the PWM frequency to minimize transistor switching power loss. It would be very dumb to power a LED using high frequency PWM signal.
Note 3: 1.4mA measured with a LED powered at 4%; 7.6mA at 48%; 14.4mA at 97%; There is a 1k resistor to the LED; 90uA measured when powered off, so VCC much be 0.00009*50000=4.5v;
Note 4: This is very low power, but to get that ultra-low power. VCC can be step down with a synchronizes buck converter to the lowest voltage, and the CPU clock can be dialed down as slow as required. The tiny13 can be underclocked to as low as 37KHz.




Other Videos By Flyandance


2023-02-03Sleep mode - Advanced AVR 3.0 - Atiny13 watchdog less than 100nA - Peripheral leakage current Button
2023-02-02Definition of good soup - Chicken Turmeric
2023-02-01Sleep mode - Advanced AVR 3.0 - 32kHz Timer2 Asynchronous mode - Atmega8 low power 8-12uA
2023-01-31Sleep mode - Advanced AVR 3.0 - 1 second timer - Atmega8 low power down + watchdog + eeprom MCU
2023-01-30Watchdog - Advanced AVR 3.1 Core - Atmega8 + EEPROM + External RC + Low power timer + MCU underclock
2023-01-26Juno ABC - Advanced Button Core - TTP223 Attiny10 AVR - LED watchdog Sleep PWM Timer
2023-01-23Art of a button - Advanced AVR 3.0 Core - Sleep, watchdog, interrupt
2023-01-08Juno Binary Retro 2.0 Color - Neon Lamp Clock - Nixie tube alternative RTC MCU AVR
2023-01-03Light Guard 1.0 - Final product - 3D Printed Casing PIR MCU LED Sleep Low power AVR Dimmer PWM
2023-01-01Advanced AVR 3.0 Core - Light Guard 1.0 - 3D-printed PIR LED light with built-in Charger - Sleep
2022-12-31Advanced AVR 3.0 Core - Sleep, software and hardware-based power button Double click
2022-12-28Advanced AVR 3.0 Core - Watchdog - Timer Sleep button Power Switch
2022-12-14Fixing a Power supply On a Bionaire BCH9214RE Heater
2022-11-30Juno BCR 2.0 - Part 3 (Final Product) Neon Lamp Clock - Nixie tube alternative RTC MCU AVR DC-DC Kit
2022-11-26Juno BCR 2.0 - Part 3a - Draft 1: 24 Neon Lamp clock - Nixie Tube alternative
2022-11-25Juno BCR 2.0 - Part 2b - Final Library Test - Juno Button Advanced Core 3.0 Interrupt-based
2022-11-22Juno BCR 2.0 - Part 2 - Lib Test - 5 Neon Lamp Brightness level
2022-11-21Juno BCR 2.0 - Part 1b - Advanced load-based feedback loop DC-DC MCU High Voltage
2022-11-20Juno BCR 2.0 - Part 1 - High Voltage Regulation with a MCU
2022-11-18Juno Binary Clock Retro 2.0 - 24+1 Neon Lamp Clock - Hardware test Preview RTC MCU AVR high voltage
2022-11-17Light Guard 1.0 - 3D-Printed Casing - LED PIR lens Diffuser High precision MCU dimmer Power charger