Advanced AVR 3.0 Core - Light Guard 1.0 - 3D-printed PIR LED light with built-in Charger - Sleep

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



Duration: 2:20
23 views
1


83uA in power down mode. There are actually a LDO 3.0V power supply with exceptional low quiescent current and another PIR chip on board, so the actual current the MCU is using tiny. Consuming only 2.2mA powering 2 high power 1 watt LEDs + the MCU + the LDO + another PIR chip + the PIR sensor is pretty good even thought the LEDs are in the lowest brightness level. There are 4 brightness levels for this LED light guard project. It's heatsink free cool and cold to touch. The 2x 1 watt power LEDs are actually very bright if powered full power, enough to light up a huge room. Even with 30mA of current, this baby is bright even for a small room, definitely enough for workstation or as a desktop lamp. It may be dumb to power 2x 1 watt power LEDs at 30mA maximum but doing so is very efficient and heatsink free, and the LEDs should last forever.

// Light Guard 1.0 - 3D-printed PIR LED light with built-in Charger
// B0, B1 - 2 power LED
// B2 -- Small signal LED
// B3 -- PIR (PCINT3) --- Not used!!
// B4 -- Button (PCINT4)

2.2mA is good enough as a reading light source in the close distance. If powered by a 2000mAh battery, it can continuously operate for 1000 hours or about 44 days and nights.

30mA is enough as light source for camping or poor people in fourth world. A 2000mAh battery could provide them with 2000/30/6=11 nights of light assuming being used 6 hours of continuously at night time. Of course with a small solar planel, they will not be fear of the dark anymore.

Note 1: Each LED has its own PWM pin and its own mosfet, so in case one LED failed, other LED will still be fine.

Note 2: These 1 watt LED has a 300mA rating, so 15mA is about 15/300=.05 or 5% power. This is an extremely efficient LED light. All the current goes to the LED. A good LED controller has an efficiency of about 90% and dollar store LED lamps use resistors as current limiting method.

Note 3: Minor problem fixed: During powering up, the LED could flash very brightness briefly. Resetting TCNT0 during waking up solved this problem.

Note 4: BOD is nice. With this the battery voltage can be sorted of monitored, but it's not as precise. Adding a battery voltage checking routine using ADC instead. If the battery voltage is below 3.0v, then the indicator LED will be blinking and the power LED won't be turning ON. How this can be done is actually very complicated: Since the CPU is halted more of the time. There is no way to keep track of time, and so ADC can't be monitored unless there is a timer switched ON. This can be done so with watchdog, so now watchdog is doing yet another job. Here the atiny13 actually doesn't have this as an option, so to read the battery voltage, an ADC pin needs to be connected to VCC. A 3.6v LED can't really possibly drain a 3.6v battery, so this battery level monitor is omitted for this project. The 2.7v BOD will be used as a safety guard for the battery.

Note 5: Sleep is deceptively simple, but it's also deceptively complex. Extra care is needed to make sure that the MCU can wake up from sleep mode under any foreseeable situations and any unforeseen cases.




Other Videos By Flyandance


2023-02-07My Coffee ritual 2.0 - Simple Minimalistic - Dry milk + sugar
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