The candlelight effect is produced by four 5 mm RGB LEDs, which also function as temperature sensors.
The LED candle is designed to operate from a single 3.7 V Li-Ion or Li-Pol battery and includes an onboard USB charger that provides a fixed charging current of 90 mA and a cutoff voltage of 4.2 V. The onboard micro-USB connector also allows the LED candle to be powered directly from a USB source, so a battery is not strictly required for operation.
Setting LEDs “on fire” may sound extreme, but in my experience, they can endure hundreds—if not thousands—of ignitions. Naturally, care should be taken not to expose the LEDs to high temperatures for extended periods, particularly with SMD versions.
Operating the LED candle is simple: light it using a gas lighter or another heat source (or a light source for the small candle), and turn it off by pressing the small red button (for the large candle) or by pinching it with your fingers (for the small candle).
When the USB cable is connected, the battery begins charging. To check the charging status, press the red button—the LEDs will glow red while charging and turn green once the battery is fully charged.
The working principle is straightforward: when the LEDs are off, a very small current is injected into LED1 through a 51 kΩ resistor (R6 or R21). The voltage across the LED is then measured via the LED_VOLT pin, and if it drops for a certain duration, all LEDs switch on and begin to flicker.
The small LED can be turned off by pinching it with your fingers. In fact, you must touch the LED pins directly to extinguish it, as this creates a small leakage current between its anodes. While the LED is flickering, there are brief moments when the TEST pin is driven high, LED is turned off and the voltage on the green LED’s anode is measured through the LED_VOLT2 pin. This voltage depends on the stray resistance between the anodes.


Hi,
I looked at the project files and did not see any software, only schematics. (I'm not too familiar with that microcontroller; I would try to port the code for ATTiny, as this is what I'm using right now). Did you upload it?