my daughter owns a mood light which consists of a wooden enclosure in the form of a cloud, seven LEDs and an on/off-switch. The light is designed to be powered from 3 AA cells (1,5V each) and I'm using 3 AA rechargeable cells (1,2V each). It draws 114 mA at 4,5V supply voltage. I'd like to use this light when I put her to bed or while she's asleep. Unfortunately, the light is too bright for that. That's why I'd like to add a dimmer function.
I've written some code for an ATtiny25/45/85 (currently using an ATtiny45) which works very well on my STK500. The ATtiny switches an LED on and off when the push button is pressed. By holding the button down, the user is able to change the brightness of the light. It stores the current brightness and returns to that when the light gets switched off/on via the push button (if nobody turns it off completely using the on/off-switch).
Regarding the power supply, I thought about powering the ATtiny directly from the batteries. To make sure that "PWM value X = Y brightness level of LEDs" is stable, I thought about using a Stepup converter to supply the LEDs with around 5V, no matter what the charging level of the batteries is. My first idea was to use one of those DC-DC converter modules from China to save me the time and work to do a PCB myself (a relatively simple stripboard would be enough). Unfortunately, I don't have a suitable Stepup converter module at hand. I've looked through Aliexpress and found two possible candidates:
- 600mA DC-DC Mini Step Up Power Module 1-5V To 5V Step-up Boost Converter
- 5PCS DC DC 1.8V 2.5V 3V 3.3V 3.7V To 5V Step Up Power Supply Voltage Boost Converter Board Module Regulator 18650 Li-on Batery
Both are lacking an enable-Pin. To switch them off, I'd have to cut the supply voltage to the Stepup module. I'm not sure if my current idea using a transistor would work because of the missing voltage differences between emitter-collector / base-emitter. I'm although not sure if I should really use one of those Chinese modules if I'd like to reduce the power loss as much as possible.
Regarding the enable-PIN, I've found some interesting information here: https://www.ti.com/lit/an/slyt73... Because I'm only operating some LEDs, I don't think that the handling of the enable-Pin is very critical in my case.
While I'm writing this, I remember, that I've some Stepup-(down)-converters laying around which could be used for my project. I've to design a PCB but I can rely on a datasheet (and I already have them here, waiting to get used for something):
- MAX619EPA (DIP)
- MAX756EPA (DIP)
- LT1301CN8 (DIP)
- LT1302CN8 (DIP)
- LT1302CN8-5 (DIP)
- MAX1674EUA+ (µMAX)
- MAX756CSA+ (SO8-1)
- MAX756ESA+ (SO8-1)
- Would my idea to cut the supply voltage to the Stepup module work?
- Should I use a premade Stepup module when power saving is important?
- Do you've recommendations for a suitable module which works great in combination with a small amount of AA / AAA batteries?
- Is it a good idea to use the Stepup converter only for the LEDs or am I about to get in trouble because the ATtiny is powered from unregulated batteries, while the LEDs are not?
- Any other thoughts?
I've attached a schematic of what the circuit would look like.
Thank you very much for your help!