Need guidance about my RGB LED strip controller project
Posted: Sun Nov 15, 2015 4:17 pm
I'd like to get into IoT and play with the ESP8266 and I thought an easy intro would be to make an RGB LED strip controller. I'm much more comfortable with software than hardware and would like feedback on my overall plan.
I found this: http://www.esp8266color.com/hardware/ and plan on buying the following hardware:
- RGB LED strip (already own a 5M one)
- 12V 2A AC adapter (already own one)
- ESP12E with board (http://www.aliexpress.com/item/new-esp8 ... 25397.html)
- 3x IRLZ44NPBF MOSFETs (http://www.aliexpress.com/item/TECHCODE ... 81143.html)
- Power jack (http://www.aliexpress.com/item/20PCS-LO ... 82652.html)
- RGB LED strip connector (will salvage from current controller)
- 6x 10kΩ resistor (already have some)
- 4x switches (already have some)
The project linked above uses the Soulis framework and an Android app but I'd like to write my own software for the ESP so as to expose a RESTful API only and use it with a custom web app.
Here are the endpoints I imagined:
- set the color with POST /color with RGB color HEX code
- get current color with GET /color
- set the color presets with POST /preset1 or /preset2 and a HEX code
- get the color presets with GET /preset1 or /preset2
- turn it on with GET /on
- turn it off with GET /off
- get wifi settings with GET/settings
- set wifi settings with POST /settings (AP, password)
I would also like to have a reset button to restore the default settings on the device and restart it, a button to turn it on/off, and two buttons to change the light to two preset colors.
I'm assuming that I should use a resistor for each switch and connect each switch to a GPIO, triggering the corresponding action when the circuit is closed.
So the circuit for each button would be something like GPIO pin -> switch -> 220Ω resistor -> ground. Is that right?
For the initial state with the default config, I was thinking of making the ESP an AP so that a device can connect to it and POST to the /settings endpoint to set the SSID and password, after which the unit will reset and connect to the wifi.I'd like to avoid hardcoding SSID and password so it's easier to change without reflashing if the controller is in a hard to reach place. Is that the conventional way of doing it?
I plan on using one of these boards: http://www.aliexpress.com/item/5pcs-6x8 ... 18256.html.
A few hardware questions: - What kind of soldering iron tips do I need to be using for smaller things like the ESP12's pins? Right now I have the screwdriver one my Weller WLC100 came with, it looks too large to to do that kind of soldering. - Did I overlook anything?
I know that's a lot of questions, this is all new to me and I'm excited to bridge hardware + software!
I found this: http://www.esp8266color.com/hardware/ and plan on buying the following hardware:
- RGB LED strip (already own a 5M one)
- 12V 2A AC adapter (already own one)
- ESP12E with board (http://www.aliexpress.com/item/new-esp8 ... 25397.html)
- 3x IRLZ44NPBF MOSFETs (http://www.aliexpress.com/item/TECHCODE ... 81143.html)
- Power jack (http://www.aliexpress.com/item/20PCS-LO ... 82652.html)
- RGB LED strip connector (will salvage from current controller)
- 6x 10kΩ resistor (already have some)
- 4x switches (already have some)
The project linked above uses the Soulis framework and an Android app but I'd like to write my own software for the ESP so as to expose a RESTful API only and use it with a custom web app.
Here are the endpoints I imagined:
- set the color with POST /color with RGB color HEX code
- get current color with GET /color
- set the color presets with POST /preset1 or /preset2 and a HEX code
- get the color presets with GET /preset1 or /preset2
- turn it on with GET /on
- turn it off with GET /off
- get wifi settings with GET/settings
- set wifi settings with POST /settings (AP, password)
I would also like to have a reset button to restore the default settings on the device and restart it, a button to turn it on/off, and two buttons to change the light to two preset colors.
I'm assuming that I should use a resistor for each switch and connect each switch to a GPIO, triggering the corresponding action when the circuit is closed.
So the circuit for each button would be something like GPIO pin -> switch -> 220Ω resistor -> ground. Is that right?
For the initial state with the default config, I was thinking of making the ESP an AP so that a device can connect to it and POST to the /settings endpoint to set the SSID and password, after which the unit will reset and connect to the wifi.I'd like to avoid hardcoding SSID and password so it's easier to change without reflashing if the controller is in a hard to reach place. Is that the conventional way of doing it?
I plan on using one of these boards: http://www.aliexpress.com/item/5pcs-6x8 ... 18256.html.
A few hardware questions: - What kind of soldering iron tips do I need to be using for smaller things like the ESP12's pins? Right now I have the screwdriver one my Weller WLC100 came with, it looks too large to to do that kind of soldering. - Did I overlook anything?
I know that's a lot of questions, this is all new to me and I'm excited to bridge hardware + software!