Originally posted in http://bit.ly/2PgF898Introduction
In this project we are going to make a web server in ESP32 with interactive web page to controls the color and brightness of an 12 volt RGB LED strip.
VideoWorking TheoryA five-meter 12 volt RGB LED strip has been connected to an ESP32 NodeMCU board because the NodeMCU board cannot directly drive the LED strip we have used a NPN transistor(TIP120) to drive the LED strip from the NodeMCU. The transistors are connected to the PWM supported pins of the ESP32 development board each for red, green and blue lines of the LED strip.
In the coding part we have created a web server with a small and light weight web page which will load in the browser when we typed the IP address of our ESP32. The web page contains some buttons to turn on/off each colors and there are also buttons for mixing the red, green, blue colors to make any color combination.
Circuit- Connect the R, G & B terminal of the LED strip to the collector of the transistor as shown.
- Through a 10Kohm resistance connect the base of the transistors to the D25, D26 & D27 pins of the ESP32 NodeMCU.
- All the grounds has to be connected together as shown, ground of ESP32, ground of transistors and ground of the 12v power supply used for the RGB LED strip.
- You can power the NodeMCU board either through the usb cable or through the VIN terminal.
- Easy for beginners to understand the concept and code.
- Only HTML and CSS used for webpage.
- Webpage refresh every-time a button is pressed.
- Implementing java script for the web page to avoid full reload of the page when the buttons are clicked.
- Storing the code for web page in PROGRAME memory instead of flash memory.
- Soft coded WiFi credentials with WiFi manager.
- Access point when no WiFi network is found.
- So, subscribe to our mailing list to not to miss the update
Support my work by subscribing to my channel http://bit.ly/2L7VLn3
Comments