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 Light5M DC12V White RGB 300 SMD LED Flexible Strip Light
$4.68
$2.80
5M DC24V White RGB 300 SMD LED Flexible Strip Light5M DC24V White RGB 300 SMD LED Flexible Strip Light
$6.99
$4.77

 

-LED 12V power supply

DC 12V Regulated Transformer Power Supply For LED Strip LightDC 12V Regulated Transformer Power Supply For LED Strip Light
$1.98
$4.39

 

-Arduino

3.3V 8Mhz Arduino Pro Mini3.3V 8Mhz Arduino Pro Mini
$1.87

 

-N-Channel mosfet (IRLZ44N)

N-Channel MOSFET (IRLZ44N)N-Channel MOSFET (IRLZ44N)
$0.99
$0.17

 

-ESP8266 module

ESP8266 ESP-01 Serial WIFI Wireless Transceiver ModuleESP8266 ESP-01 Serial WIFI Wireless Transceiver Module
$2.14
$17.00
ESP8266 ESP-03 Serial WIFI Wireless Transceiver ModuleESP8266 ESP-03 Serial WIFI Wireless Transceiver Module
$2.07
$2.15
ESP8266 ESP-12 Serial WIFI Wireless Transceiver ModuleESP8266 ESP-12 Serial WIFI Wireless Transceiver Module
$2.06
$1.85
ESP8266 ESP-05 Serial WIFI Wireless Transceiver ModuleESP8266 ESP-05 Serial WIFI Wireless Transceiver Module
$1.88
$3.92
ESP8266 ESP-07 Serial WIFI Wireless Transceiver ModuleESP8266 ESP-07 Serial WIFI Wireless Transceiver Module
$2.18

 

-EasyIoT server (Raspbery Pi or Windows)

RASPBERRY PI 3 - Model B. 1GB RAMRASPBERRY PI 3 - Model B. 1GB RAM
$41.99
$39.96

 

See buying guide at the end of tutorial.

LED strip

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:

LED strip connection

 

 

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.

5M DC12V White RGB 300 SMD LED Flexible Strip Light

5M DC24V White RGB 300 SMD LED Flexible Strip Light

24V power supply.

DC 12V Regulated Transformer Power Supply For LED Strip Light

N-Channel MOSFET (IRLZ44N)

55V Single N-Channel HEXFET Power MOSFET in a TO-220AB package

5V 16Mhz Arduino Pro Mini

Small but powerful suitable for most DIY Arduino projects.

3.3V 8Mhz Arduino Pro Mini

3.3V Arduino version. No need for shift leveler when using ESP8266.

ESP8266 ESP-01 Serial WIFI Wireless Transceiver Module

ESP8266 Serial WIFI Wireless Transceiver Module

ESP8266 ESP-03 Serial WIFI Wireless Transceiver Module

ESP8266 serial WIFI model ESP-03

ESP8266 ESP-12 Serial WIFI Wireless Transceiver Module

ESP8266 serial Port WIFI wireless module ESP-12

ESP8266 ESP-05 Serial WIFI Wireless Transceiver Module

ESP8266 ESP-05 Serial WIFI Wireless Transceiver Module

 

 


Comments   

#9 streexz 2017-06-14 17:42
[ask] How to make ESP8266 Cloud REST API LED dimmer??

please help...
+1 #8 Larry 2016-01-18 05:53
I get this error when trying to compile the code:
Quote:
Esp8266EasyIoT.h:28:24: fatal error: avr/eeprom.h: No such file or directory
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!
+2 #7 DarioCdj 2015-02-23 19:57
ok ok, i know that depend also from mosfet, perfect, thanks
+2 #6 Super User 2015-02-23 16:21
Quoting Vasilij:
Where is the file i have to put my ssid and pw?

file located in libary folder in EaseIOT config.cpp (not 100% sure about file name)


Under Arduino libraries file Esp8266EasyIoTConfig.h
#5 Super User 2015-02-23 16:20
Quoting DarioCdj:
Askin again, how many led strips i can control? Is it depends from power supply or from the mosfet? Thanks


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.
#4 DarioCdj 2015-02-23 11:27
Askin again, how many led strips i can control? Is it depends from power supply or from the mosfet? Thanks
#3 Vasilij 2015-02-23 09:51
Where is the file i have to put my ssid and pw?

file located in libary folder in EaseIOT config.cpp (not 100% sure about file name)
#2 Super User 2015-02-23 00:35
Quoting Jens:
Hi,
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



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.
#1 Jens 2015-02-22 21:33
Hi,
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

You have no rights to post comments