In this tutorial we will show how to build LED dimmer with ESP8266, Arduino and EasyIoT server.
Materials
-LED strip
5M DC12V White RGB 300 SMD LED Flexible Strip Light | |
$4.68 | |
$2.80 |
5M DC24V White RGB 300 SMD LED Flexible Strip Light | |
$5.42 | |
$4.77 |
-LED 12V power supply
DC 12V Regulated Transformer Power Supply For LED Strip Light | |
$5.99 | |
$4.39 |
-Arduino
3.3V 8Mhz Arduino Pro Mini | |
$2.05 | |
$1.78 |
-N-Channel mosfet (IRLZ44N)
N-Channel MOSFET (IRLZ44N) | |
$0.99 | |
$0.18 |
-ESP8266 module
ESP8266 ESP-01 Serial WIFI Wireless Transceiver Module | |
$2.11 | |
$17.00 |
ESP8266 ESP-03 Serial WIFI Wireless Transceiver Module | |
$2.07 | |
$2.15 |
ESP8266 ESP-12 Serial WIFI Wireless Transceiver Module | |
$2.06 | |
$1.75 |
ESP8266 ESP-05 Serial WIFI Wireless Transceiver Module | |
$1.88 |
ESP8266 ESP-07 Serial WIFI Wireless Transceiver Module | |
$2.18 | |
$1.88 |
-EasyIoT server (Raspbery Pi or Windows)
RASPBERRY PI 3 - Model B. 1GB RAM | |
$41.99 | |
$39.96 |
See buying guide at the end of tutorial.
Connections
Connect Ardino and ESP8266. Use ESP8266 and Arduino connetion guide to connect. Then connect Arduino to 12V LED power supply (GND to GND and 12V VCC to VCC). Next we connect LED strip. We use 30V N-Channel MOSFET to amplify current. In our example we use Arduino PIN 13 for PWM output. Connection scheme is shown below:
Program for Arduino is available on GitHub.
Then we add node to EasyIoT server.
Switch on Arduino node.
If node is successfully added we see node adders (no timeout message).
Then we add node to one of groups.
Select our new node (N8S0).
And name it.
This is dimmer control in front end.
See more tutorials at http://iot-playground.com/build
Buying guide
To support this site and EasyIoT framework development please buy in our store.
Comments
please help...
Quote: I know this is an old thread but it seems like the EEPROM libraries for 8266 aren't setup for arduino. Any ideas or knowledge on this?
FYI, The reason I think it's a library issue related to ESP8266 is because I tried compiling as a mega2560 board and that compiled fine.
Thanks!
Under Arduino libraries file Esp8266EasyIoTConfig.h
How can I know? Read datasheets - you have LED strip current, MOSFET current and power supply current and some safety factor. And use multiplier to measure current. Obviously LED strip current must be less than MOSFET current and power supply current.
file located in libary folder in EaseIOT config.cpp (not 100% sure about file name)
AP username and password settings are in Esp8266EasyIoTConfig.h file in Arduino library folder.
You do not connect ESP to RPi. ESP is only on Arduino side.
this is a nice project. But I have a problem to use the above code. Compiling and uploading works for me. But the I don't understand the serial output:
EasyIoTEsp LED dimmer example init
nodeid:-1
hwReset
E_START
E_CWMODE
Send cmd:AT+CWMODE=1
AT+CWMODE=1
OK
Send cmd:AT+CWJAP="XXXXXXXX","XXXXXXXX"
AT+®)AõÂ ","XXXXXXXX"
Request Node id
+CWJAP:3
FAIL
Response error
Where is the file i have to put my ssid and pw? Or will the esp be a stand alone router?
I also do not understand how the EasyIoT server can find the esp-module? Where do I have to insert the ip adress of the esp?
By the way, I don't have a esp connected to the raspberry pi where the server runs. I want to build several standalone nodes with esp's connected to my wlan. This is the way, it should work, right?
THX
Jens
RSS feed for comments to this post