Barry Wise
Published © GPL3+

ATTiny85 LED Flickering Candle for Jack O' Lantern

A simple circuit to blink 6 LEDs (3 pairs in parallel) to simulate a flickering candle effect for use in a Halloween Jack O' Lantern pumpkin

EasyShowcase (no instructions)2 hours1,490
ATTiny85 LED Flickering Candle for Jack O' Lantern

Things used in this project

Hardware components

ATtiny85
Microchip ATtiny85
×1
Resistor 100 ohm
Resistor 100 ohm
×3
5 mm LED: Red
5 mm LED: Red
×3
5 mm LED: Yellow
5 mm LED: Yellow
×3
AA Batteries
AA Batteries
×3

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Schematic

Gsvtjk9cvdwrdkwxt7nj

Photo of circuit

Ktz2ukhghrllpfsacrbd

Front view of circuit

Lgf20icxgyikb7bth4ln

Back view of soldered connections

Jch4scxy6oanmxmynaji

Jack Skellington Pumpkin Carving Template

In case anyone wants to carve the same pattern, this template was easy to follow
Oiolstqfvak09mgmhyz6

Code

LED Flicking candle flame effect to PIMP DAT PUMPKIN

Arduino
// LED Flicking candle flame effect to PIMP DAT PUMPKIN

/*
 Halloween 2016 Barry Wise
 
  Borrowed and enhanced code from:
      http://www.instructables.com/id/Realistic-Fire-Effect-with-Arduino-and-LEDs
  
  Made ATTINY85 shield for Arduino like this:
      https://www.youtube.com/watch?v=9LjfkjwMqXI
  
  How to use Arduino as ISP for programming via said shield:
      http://www.kobakant.at/DIY/?p=3742

*/

int ledPin1 = 0;
int ledPin2 = 1;
int ledPin3 = 2;

void setup() {

  pinMode(ledPin1, OUTPUT);
  pinMode(ledPin2, OUTPUT);
  pinMode(ledPin3, OUTPUT);
  
}

void loop() {

  // analogWrite(ledPin1, random(50)+200);
  // analogWrite(ledPin2, random(80)+170);
  analogWrite(ledPin1, random(250));
  analogWrite(ledPin2, random(250));
  

  digitalWrite(ledPin3, HIGH);   
  
  delay(random(200));

  digitalWrite(ledPin3, LOW);   


}

Credits

Barry Wise

Barry Wise

1 project • 0 followers
Programmer

Comments