Fireplace Light Effect
After a long and cold winter day isn't it nice to sit in front of your fireplace in the warmth of your house? Most people don't really have a fireplace, but even the sight or the light of flames can warm you and your cold heart.
If you are looking for this cosy feeling, you are in the right place! I will show you, how you can make your own fireplace light effect with an Arduino board and addressable LED strips. You will have plenty of time to make this project, before winter comes.
I would like to state, that the images do not represent the true colours of the light, maybe because of the white balance of my phone camera. The candle video is the closest to the real colours. As this instructable is in for the rainbow contest, it is important, that these are Orange colours on the pictures.
Supplies
Things you will need:
- Arduino board (I used a nano clone, you can use almost any kind)
- WS2812B addressable RGB LED strip (desired length, mine has 29 LEDs)
- 5V wall adapter (9V is okay either)
- Aluminium LED profile (desired length)
- Pushbutton (normally open)
- Junction box (a small one)
- Wires
- Heatshrink tubing (optional)
Things you will use:
- Soldering iron and solder
- Scalpel or utility knife
- Heatgun or lighter
- Side cutter
- Metal saw or handsaw
Concept
I used an Arduino Nano clone from ebay, you do not have to stick with this type, any Arduino board can be used. You will need a piece of WS2812B addressable RGB LED strip. The controller sends N*16 bits of information to the first LED. The first LED reads the first 16 bits and lets the rest of the information ((N-1)*16 bits) trough. This way we can control the LEDs of the whole strip one by one with only one output of the board. I also use one input for the push-button, so I can easily select patterns.
The device itself is really simple, it can be easily built by a beginner. There are a lot of things even in this simple project, that you can leave out, which makes it even simpler. If you modify the code, you can eliminate the push-button, or if you wouldn't like to use the aluminium profile, that is completely fine. Just tape the strip wherever you want.
Making the Device
First you have to decide the length of your fireplace light row. It can be a meter, a yard, mine is about 50cm. You can cut the LED strip between any LEDs. I had a 52cm long aluminium profile, so only 29 LEDs fit in. If you have decided the length of the strip, cut it. After that you have to cut the aluminium profile. It is advised to cut the profile a little bit longer (about 2cms longer), so there will be some room for the wires and the end pieces. Use the double sided tape on the back of the LED strip to secure it into the profile. Push the plastic profile lid into place. If you don't want to use the profile, you can tape the LED strip into place later.
You will need 3 wires for the LED strip.
- 5V
- GND
- Data In
Solder these 3 wires to the strip. Make sure to solder the input side of the strip (A little triangle shows the direction of data flow).
Cut or drill a hole into the top of the junction box, so your normally open button fits in perfectly. Solder two wires to the button connectors. You can use heat-shrink tubes or electrical tape here.
Cut or drill 2 small holes to the sides of the box, so you can bring in power and the wires from the LEDs. Solder connectors to the wire ends. (Use female headers if you also use a Nano).
Connect the wall adapter wires to GND and VIN. If you use a regulated 5V power supply, you can connect it to 5V instead of VIN. Connect the push-button pins to GND and D4 (you can use other GPIO pins, if you modify the code). Connect the LED strip to GND, 5V and D3 (you can use other GPIO pins, if you modify the code). You might have to use the GND pin on the ISP header if you run out of GND pins. You can secure the controller with hot glue or double sided tape into the box. Or you can leave it as it is (just like I did).
Programming
This step is fairly easy, but you will need the neopixel library from adafruit. You can download it from here with my program code. After the download process you have to move the neopixel library to the Arduino libraries folder. You can move the program code next to your Arduino sketches.
If you don't wish to modify my code, connect your Arduino and you can select the board type and the port in the IDE. Make the necessary modifications if needed and hit upload. The IDE should compile and upload the code to your board and it is ready for action.
You can select the desired LED pattern with the push-button. My code includes a fireplace, a candle and a dying fireplace along with other patterns.
In the candle mode, the central LED pulses and flickers with yellow-orange colour. In the fireplace pattern every LED represents a small flame. Each flame has a maximum and minimum light, the brighter it is, the closer it is to yellow. Dimmer flames will have orange-red colour. In every cycle the flame values are randomly generated from the previous value, but this value can not be too far away from the adjacent ones. The dying fireplace light will be darker and only glow faintly in a more reddish colour after some time
You can set the number of LEDs in my code, or you can fiddle with the values in the beginning of my program code. I tried to make the fire effect quite realistic and I think it worked out pretty well.
The End
Here are 3 videos of the effect. The fireplace, the candle and a time lapse of the dying fireplace.
You are done. You made a nice fireplace light for your home.
It is a nice and simple project that even beginners can create in no time.
Feel free to ask questions about this project in the comments, I am happy to help you with any problems.