Share My Creation Snippets were collected into a ... torch


Using these code snippets - i could develop an original torch testing board, actually, a headlamp project.
Just for fun.

The idea is that a LED torch should have just a single setting - the needed qty of working hours that are guaranteed for user, on the current available battery capacity.
So, any time you need just to decide how long you plan to use a torch: 3 hours of work in a dark floor, 7 hours of night fishing, or 48 hours if lost in a cave... With a weak light, but working for sure torch. And any time you can re-change the needed hours on the rest battery capacity.

Another idea is that any Li-battery can be used due to ... ampermeters will help to measure the real battery capacity and the real current consumption of the LED.
And basing on the needed Hours, currents, and counting the time - we can calculate the needed PWM parameters to control the LED consumption to get the maximal luminous flux during the time.

Today charging current, LED current are measured, OLED-display can show them, single button can switch it on or off, and setup the Hours by long pressing or pressing from a switched off state (deepsleep). Button and plugged USB charging cable are waking the esp32-c3 MCU up.
MCU calculates all (the needed current, battery capacity...) and makes PWM control of the LED driver that is a light dimmer.

It looks like i'm going to a realization :)

3.jpg
1.jpg
2.jpg
 
Last edited:

thetrueman

Active Member
Hello peacmaker,
Nice to see your efforts on the forum to keep us going on.
Thanks so much for sharing a product prototype and we would like to see circuit diagram/block to understand how it works hardwarely. :)
 

peacemaker

Expert
Licensed User
Longtime User
block to understand how it works hardwarely
Functionally it is so:
6.jpg

Now it's charging after full battery discharge by the LED that was hot as 56 degrees at 0.7A current.
7.jpg
USB power counter shows the full consumed current, including the TP4056 charging module (that is linear and with low efficiency), but my MCU counts smaller due to the ampermeter1 is at the battery directly.
 

thetrueman

Active Member
wow thank you very much for more info... if you post additional info then please also mention the modules names denoted in the circuit diagram as M0, M1... Thanks.
 
Top