Customizable LED sign

This is a customizable LED sign, which you can connect to AWS IOT to change colors based on a website. This can also serve as a model to for most IOT applications with esp8266.

Features

  1. MQTT connection with AWS IOT
  2. Carries color values over power cycles through virtual EEPROM
  3. Accounts for occasional reboots because of power cycling resiliency
  4. Automatic reconnection to wifi.

Parts List

  1. LED strip (I used this)
  2. Around 120Ohm resistor between LED strip and ESP8266
  3. ESP8266
  4. A micro usb cable

Hardware stuff

  1. Connect the led strip's data cable (green) to pin 2 of the esp8266. Add a resistor, because there is no pullup I can use on ESPs.
  2. Solder the led strip's power cables directly to the power cables of the usb cable
  3. Insert the microusb cable into the esp8266. You may want to use a separate cable for uploading code, and just use this cable during production. This cable also does not have to have data transfer capabilities (so get rid of that cable that you used to try to upload code with and spent 4 hours trying to figure out why your CP210x driver was not working)

AWS stuff

API gateway

I created an API gateway, which then connects through proxy to a lambda function. This is running through my personal website, which is an edge-optimized REST API (so the lag is not too much, like 300ms). I created a separate endpoint for the lambda execution for easier programmatic execution, but you don't have to.

Lambda function

The lambda function then just transfers the payload straight through AWS IOT with an out topic. The topic is called inTopic, because I'm lazy. I included the lambda function code as well in "./aws/" (also I'm trying to use more javascript in my life, so it is a bit badly written). The payload is hex values, because I did not want to send all 6 values separately. The hex values are converted in RGB on the device itself.

IOT Stuff

Set up a generic iot device and download the certs that you automatically generate. Then you can just copy and paste those certs into the main sketch where it says to do so. You may want to do some of your own tests to make sure a connection is established before you start with the actual stuff (there is a sketch to test under "./aws/testconnection.ino").

Hosting yourself

It would also be very easy to host this yourself. I chose AWS, because I had an API gateway running and it would be easy. However, modifying this to send MQTT data over your own server/authenticating with your own server is fairly trivial.

Website stuff

Just change your API gateway endpoint to your own endpoint. Easy stuff. Under "./website/". Mine is literally just two color pickers, but you may want to add some css and stuff to make it look more pretty. I'm really bad with frontend everything.

Generating name values

You are going to want to create a txt file with an approximation of which lights are reserved for the name, and which lights are reserved for the background, then using the script "findout.py", you should be able to get the outputs (This is specified for the led strip I included, you will have to modify it for a different script). An example is included under "name.txt".

Final notes

This was meant to be a really quick project to the code is nice and dirty, as with a lot of the other things I do. Some things to note, are that on initial upload there may be some problems with the color values, because it reads garbage input from the flash. Hopefully it will just default to red and blue though. Also, if someone actually thinks about building this, send me a message, I'd love to help with any questions. This is an example when I was testing.