LED Candles with PIC 12F683

* Update v2.01 of 28/12/2010 *

ATTENTION: Who created this or other projects on this web site, please can send me on my email photos of his accomplishments? I would like to put it here on-line so that they are visible and can serve as a starting point for new ideas, different realizations or changes, following in this way the spirit of this site which is in favor of disclosure and knowledge of electronics free of charge.
Also, if you, while sending photos of your prototypes, authorize me to put on-line together with the photos at least your name and your email, you will be contacted or you can contact another user who made the same project in order to do together of constructive confrontation.
Thank you in advance, Tony

 

Videoon Youtube

Foto realizzazioni utenti

Three projects

After designing various LED electronic candles, I decided to present this project, simple and interesting, which simulates the light of a candle, but without the danger of fire, etc. ...

Operation:

The micro works through the internal oscillator set to 1MHz so that its flow is around the 220/260 microA, the LED is controlled via PWM output pin 5 with the operating frequency set to 10KHz.

If you insert the jumper 1, when the LED candle is in a bright room, it turns off automatically, and when the brightness drops below the preset threshold, automatically turns on. 1 If the jumper is removed. the led candle always works until the batteries run out.

To change the threshold of light / dark, adjust the resistance R3, currently 220K. is possible to put a resistor R3 as for example from 33K in series with a trimmer by 180K/220K in order to adjust so end the intervention threshold.

In the micro, there are several functions that manage the PWM with different thresholds of delay and more precisely in steps of 2ms to 10ms, to make the increases and decreases in the brightness as real as possible.

By observing the flame of a burning candle, a flame looks almost regular, with slight increases and decreases in brightness, never fade, and periodically, the flame is tottering sometimes faster sometimes slower. All these effects were included in the software.

V2.01 update of 28/12/2010: Improvement of the effect of a single candle and elongation cycle at about 13minuti of continuous effects and not repeated damage to the flame realism better understood the flame that random wobbles like when someone passes close to the flame a lit candle ...

The Led

As LED was chosen leds and more exactly the Agilent HLMP-EL31-SV000, you can find it from large distributors such Farnell - RS Componentes etc ... true is that you can use any other LEDs with similar characteristics.

To get the effect of scattered light, the light was "encapsulated" in a piece of heat shrink tubing transparent 5mm.

 
 

Electric diagram

 

Prototype single candle led
 

Prototype single candle led
 

Particular
 

Led with heat shrink tubing

Laboratory tests

Laboratory tests

Laboratory tests

Version with 2 or 3 LEDs. This version is useful when more light is needed by the LEDs, and the LEDs being in parallel simultaneously illuminate all

Wiring Diagram version 2 or 3 leds

Prototype version with 2 or 3 led in parallel

Detail of the prototype

Detail of the LEDs

Detail of the LEDs

 

Version with 2 or 3 independent LEDs, as if they were separate candles, because each LED is controlled by a PIC12F683. The software inside the PIC is different in the sense that, looking at the electric, the first PIC Master said, manages the photocell and J1 pin 2 and generates a signal to enable the micro Slave U2/U3. The routine generation of flame within the three micro are all different, so as to make the effect of autonomous candles. And 'possible modfiy this circuit diagram, and cross it with the previous one with the end to mount the BC337 and manage multiple LEDs for each micro. with this project, the maximum number of micro cascadable is 10.

Wiring Diagram

Prototype with three micro

Particular led

Particular led

 


Data sheet LED Agilent HLMP-EL31-SV000 Agilent LED.pdf (361k)


Data sheet BC337 BC337.pdf (125k)

Files Update. HEX 28/12/2010 ver 1.2


The file contains the CandelaA HEX for PIC12F683 in single or planning the first micro project with three micro ie the master. CandelaB and CandelaC NOT work in master mode but in slave mode. (See diagram above project with three micro)


CandelaA v2.01.rar file contains the. HEX file to load into the micro CandelaA v2.01.rar (1k)

CandelaB v2.01.rar file contains the. HEX file to load into the micro CandelaB v2.01.rar (1k)

CandelaC v2.01.rar file contains the. HEX file to load into the micro CandelaC v2.01.rar (1k)




The files. HEX and the content of these pages was released for teaching applications WITHOUT end of I make money from. For any other type of application it be able to contact me via email.


© Copyright tony@microt.it