Introduction: Forbidden Watchtower + WiFi Controlled RGB LED
Once you feel you have tweaked your 3D printer to produce decent quality prints, you start looking for some cool models on www.thingiverse.com. I found The Forbidden Tower by kijai and thought it would an awesome test for my printer(Anet A8).
The print came out great (not perfect) but I was happy ...
Until I saw the creator included a model that was hollowed out so you can add a light inside it!
So the only natural thing to do was connect an RGB LED to a Node MCU ESP8266 and control the colours over the WiFi! :D
Step 1: Step 1: Print the Forbidden Tower
I have an Anet A8 and here are the settings I used:
- Layer height - 0.2mm
- Rafts - Yes - 8mm
- Infill - 15%
- Supports - No
- Filament - CCTree Silver PLA 1.75mm
- Print temperature:
- Extruder: 200 degrees
- Heated Bed: 60 degrees
Step 2: Step 2: Parts Required
Step 3: Step 3: Tools
Tools I used:
- Soldering iron
- Helping hands
- Solder wire
- Electrical wire - doesn't have to be high gauge
Step 4: Step 4: Deciding Which Components to Use
I originally wanted to use the ESP8266-12E module without the breakout board.
However if I went this route, I would have needed:
- A separate 5v to 3.3v step-down converter
- A a USB-serial converter something like the FTDI module or the CP2012
- Solder the ESP8266 12E chip to it's own breakout board
Please see the image that illustrates how these components would be connected. This was taken from this page. Credit goes to them :)
The reason I wanted to go this route was to save on space, since the inside of the tower was not very large.
But when you add up all the extra components you'll need excluding the ESP8266 module, it turned out to be taking up more space.
Therefore, I went with the Node MCU 8266 module :)
This has the following built-in:
- USB-Serial converter for easy communication with a computer
- 3.3v regulator
- ESP8266 12E with breakout pins
The only thing I needed was:
- The Node MCU ESP8266 module
- W2812 LED
- Some electrical wire I salvaged from a old ATX power supply
Step 5: Step 5: Software and Libraries
I used the Arduino IDE on Mac OS.
This will save you a lot of time!
You will need to get the following drivers from:
The following is from the above GitHub page, credit goes to russp81:
"FastLED 3.1.3 library: https://github.com/FastLED/FastLED
McLighting library: https://github.com/toblum/McLighting jscolor Color Picker: https://github.com/toblum/McLighting FastLED Palette Knife: https://github.com/toblum/McLighting
If you aren't familiar with how to setup your ESP8266, see the readme on McLighting's git. It's well written and should get you up and running.
In short you will:
- Configure the Arduino IDE to communicate with the ESP8266
- Upload the sketch (from this repo) The sketch is setup for a 240 pixel WS2812B GRB LED Strip.(change the applicable options in "definitions.h" to your desire)
- On first launch, the ESP8266 will advertise it's own WiFi network for you to connect to, once you connect to it, launch your browser and the web interface is self explanatory. (If the interface doesn't load, type in "192.168.4.1" into your browser and hit go)
- Once the ESP is on your wifi network, you can then upload the required files for the web interface by typing the in IP address of the ESP followed by "/edit" (i.e. 192.168.1.20/edit). Then upload the files from the folder labeled "upload these" from this repo.
- Once you have finished uploading, type in the IP of the ESP into your browser and you should be up and running!"
Credit goes to Soumojit for his Instructable which helped a lot:
Step 6: Step 6: Wiring
This is very simple since I only use one WS2812 LED chip and the Node MCU.
All you have to do is:
- Connect the WS2812 Data In to D1 on the Node MCU
- WS2812 Vin+ to Vin on the Node MCU (this should be 5v coming in via USB)
WS2812 VCC/Vin- to GND on the Node MCU
You can use any micro USB power source (cell phone charger, computer or even a power bank)
That's it! :)
Step 7: Step 7: Done!
I hope this was useful and please feel free to contact me if you need any help :)