Indoor Fireplace - LED & Piezo
by Markus Opitz in Circuits > LEDs
460 Views, 8 Favorites, 0 Comments
Indoor Fireplace - LED & Piezo
A cosy fire is something very nice. Outside. Indoors it's often too dangerous, not every home has a fireplace or a stove with a viewing window. and candles: well ... not the same.
Just colour LEDs don't work either, there has to be some movement around the fire.
That's why I combine LED strips, controlled by an Arduino, with an evaporator that simulates the flames and also serves as a humidifier.
Of course you can also use rainbow colours instead of fire colours, depending on your mood.
Supplies
- Arduino Nano (or ESP8266, ESP32, Attiny85)
- LED Strip, min. 18 lights
- Ultrasonic USB Humidifier with Circuit Board
- 3D printer, colour filament, transparent filament (Step 8 describes an alternative to 3D printing)
- Cable, soldering station
Prepare 3D Parts
Print out the pieces 1 and 2 in a color of your choice, print the transparent ring.
Glue in transparent ring into outer ring
(Step 8 offers an alternative to 3D printing)
Circuit
The humidifier receives its power from the 5V/GND of the Arduino. The two large contacts on the bottom of the circuit board must be connected with solder so that it starts automatically and no button has to be pressed.
Prepare LED Strip
Measure the strip (here 18 lights), cut it and solder the cable to the three connections and fix with shrink tubing. Insert the strip into the space between the transparent shrink, lead the cables into the circuit box. Solder the cables to GND / 5V / D5 on the Arduino accordingly.
Prepare the Humidifier
At the humidifier's PCB solder the two contacts on the base side together (the device then works without the switch having to be pressed)
Solder the power supply cable. GND to a free GND of the Arduino, the 5V connection is soldered to the 5V of the Arduino.
The piezo disk is placed in the supplied holder and the foam piece is shortened accordingly with scissors. The humidifier can now be inserted into the frame and the connection plugged into the circuit board.
Place It
Now you have to place everything in the circuit box: The USB connection of the Arduino is fed through the corresponding hole, the two circuit boards and the cables are pressed into the box. If everything works as desired after a test run, don't forget to seal everything with hot glue.
Software
Depending on your preferences, you can either simulate a fireplace or run rainbow colours.
You can find out how to program an Arduino Nano here and here.
Download the program file "IndoorFireplace.ino" and upload it to the Arduino. The humidifier should start working immediately and you can already see the result. Of course, you must first place a cup of water under the device.
// Indoor Fireplace and Rainbow
// Markus Opitz 2024, Instructables
#include <FastLED.h>
#define LED_PIN 5
#define NUM_LEDS 18
CRGB leds[NUM_LEDS];
int red1, red2, green1, green2, blue;
int brightness = 10;
int counter = 0;
void setup() {
FastLED.addLeds<WS2812, LED_PIN, GRB>(leds, NUM_LEDS);
FastLED.setBrightness(brightness);
}
void loop() {
fire(); //imitating fire
//rainbow(); //rainbow colors
}
void fire() {
red1 = random(180, 230); green1 = random(50, 90);
for (int i=0; i<50; i+=2) { // every 3rd red //half of LEDs are just red
leds[i] = CRGB(220, 0, 0);
FastLED.setBrightness(random(100, 210));
}
for (int i=1; i<50; i+=2) { // every 3rd red //half of LEDs imitate fire
FastLED.setBrightness(random(100, 210));
leds[i] = CRGB(red1+25, green1-20, 0);
}
FastLED.show();
delay(random(220,420));
}
void rainbow() {
for (int i = 0; i < NUM_LEDS; ++i) {
leds[i] = CHSV(counter + (i * 10), 255, 255);
}
EVERY_N_MILLISECONDS(15){ //speed of change
counter++;
}
FastLED.show();
}
Downloads
Change the Flame
If the jet of water droplets (our flames) shoots upwards too much, you can place the barrier rod on top or stick it on. It ensures that the cloud is swirled and the light from the LEDs is refracted differently.
Have a nice cosy evening!
3D Print Alternative
Instead of the 3D parts, it would be possible to make the parts from cardboard, preferably varnished, with a piece of rigid plastic film as a transparent part. Wood would also be an option.