So I have a project where I am designing battery powered spotlights (not a work light, those gooseneck lamps you can freely position to wherever you want) using cheap single-cell power banks, wireless charging docks and generic gooseneck ceiling lamp fitting.
Because I cannot use Xiaomi power banks (which are high capacity, automatically switched, has charge-while-using function and so on) because I have to keep the weight, size and cost to the minimum (while not making the entire contraption fly into stratosphere), I have to switch the power banks almost manually. (some power banks DO switch on when there's load, by the way)
Since I am groundless in this field, I am asking you people to help me a little bit.
Planned features:
- Sense light
- Turn off LED when the light level reaches certain level
- Either use fixed PWM (about 30%) or a slowly decreasing PWM (60~20%) to preserve power, probably in 10% step to simplify?
- Enter low-power mode after 5 minutes of LED turning off
- Use wireless charging pads (like Qi branded generic ones?) and a classic-looking stick-and-a-hook type device to charge
- 1W warm-white LED
Pseudo-code (bad code, I know) :
See if room is dark
If room is dark
If power bank is on
Press and hold button for few seconds
Turn on the LED
Else
Press and hold button for few seconds
Turn on the LED
Else
Turn off the LED
If power bank is on
Press and hold button for few seconds
Else
Return