Battery powered led challenge about power consumption

Thread Starter

Levent Bekçi

Joined Mar 12, 2022
18
Hello,
While i was waiting development board arrive to me, i am trying to learn PIC and i wonder is it possible to continue PWM output while the microcontroller in sleep mode for PIC10LF322. Because i am trying to get the minimum power consumption.
 

click_here

Joined Sep 22, 2020
548
Hello,
While i was waiting development board arrive to me, i am trying to learn PIC and i wonder is it possible to continue PWM output while the microcontroller in sleep mode for PIC10LF322. Because i am trying to get the minimum power consumption.
Section 18.1.6 of the datasheet states that timer 2 is powered down in sleep mode which the PWM needs

So no, unfortunately
 

Thread Starter

Levent Bekçi

Joined Mar 12, 2022
18
Thanks @click_here i got it.
Another question; I see a code like this for PIC10LF322:

PWM2_Init(50);
PWM2_Start();
PWM2_Set_Duty(255);

As seen above , i can divide a period to 255 portion. This mean is that i can use minimum 1/255 of the full intensity of the led. But i need to dim it more about at least 1/1000. Is it possible?
 

Ian0

Joined Aug 7, 2020
9,817
Thanks @click_here i got it.
Another question; I see a code like this for PIC10LF322:

PWM2_Init(50);
PWM2_Start();
PWM2_Set_Duty(255);

As seen above , i can divide a period to 255 portion. This mean is that i can use minimum 1/255 of the full intensity of the led. But i need to dim it more about at least 1/1000. Is it possible?
Would you still see it if you dim it to 1/1000?
 

Ian0

Joined Aug 7, 2020
9,817
Of course it is possible but this time system will be more inefficient isn't it? The more we increase the resistance, the more inefficient the system will be?
If the LED is driven by a resistor or a constant current source, then 100% duty cycle at 1mA dissipates exactly the same as 10% duty cycle at 10mA.
At very high LED currents the LED efficiency actually reduces.
 

BobTPH

Joined Jun 5, 2013
8,967
You’re running an STM32 at 32KHz? That’s like powering the hydraulics of a bulldozer by bkowing into a tube.

Bob
 

bassbindevil

Joined Jan 23, 2014
828

Thread Starter

Levent Bekçi

Joined Mar 12, 2022
18
You'll find info about drivers for flashlight LEDs at places like the Budget Light Forum, mainly based on ATtiny. But there are also very inexpensive microcontrollers from China:
https://cpldcpu.wordpress.com/2019/08/12/the-terrible-3-cent-mcu/
and here's an actual example of a very low current consumption LED flasher (average consumption of under 1.5 uA at 3V while blinking an LED):
https://cpldcpu.wordpress.com/2021/02/07/ultra-low-power-led-flasher/
This is a very niche information thank you for your help.
 

Thread Starter

Levent Bekçi

Joined Mar 12, 2022
18
if the MCU has an on-chip analog comparator - you could use RC to shorten your pulse to a width - limited by the HW I/O delays at the signal chain? (no PWM required at all)
Sorry but i couldn't understand what you want to say because i am not informed enough. If you can explain maybe i can try.
 

Ya’akov

Joined Jan 27, 2019
9,165
Anyone remember the LM3909?
I sure do. I loved that chip. I put some in flashlights as beacons so you could find them in the dark, back in the days when a good flashlight used two D cells, a PR2 lamp, and was made by Bright Star.

1649327708685.png
A while ago I bought a couple of NOS LM3909s (well, SK10067 replacements) at about $5 each for nostalgia's sake. Now I am seeing them for $12.

1649328180554.png
 
Top