IoT Controlled AC Outlets

/media/uploads/deronmai/20160317_212846264_ios.jpg Picture of entire project, showing mbed, ESP-8266, DHT-11, and Outlet box with 4-Channel Relay Board and Current Sensor

Description

Using the mbed, a DHT11 Temperature sensor, an ESP-8266 Wi-Fi Module, a 4 channel relay board, and an AC/DC current sensor, we assembled a device to accomplish the following:

  1. Control Outlets' ON/OFF functionality via a web interface.
  2. View current ON/OFF status of each relay.
  3. Enable thermostat control of a single outlet to enable AC Units and Space heaters to be selectively activated depending on room temperature and set temperature.
  4. Measure and display current draw and power usage for at least one outlet (Outlet 1 in our case).

Group Members: Alex Davidson and Deron Mai

Hookup Guide

For this device to work, the ESP-8266 Wi-Fi Module, DHT11, Relays, and Current Sensor will need to be properly connected to the mbed:

ESP-8266 Wi-Fi Module

mbedESP-82663.3V Power Supply330uF Cap.
GNDGNDGND(-)
VccV+(+)
p26RESET
p28(TX)RX
p27(RX)TX
VoutCH-PD

Note: Vcc connection for ESP-8266 must be powered by an external supply. The mbed's internal 3.3V supply cannot provide the power necessary for Wi-Fi Transmissions. Also a 330uF decoupling capacitor should be connected across the Vcc and GND lines of the Wi-Fi module to prevent sudden voltage drops.

DHT-11 Temperature Sensor

mbedDHT-11
GNDGND (-)
p21Signal
VuVcc (+)

Note: p21 or Signal line must have a 4.7k-5.1k pull-up resistor connected to 5V.

4-Channel Relay Board

mbedRelay Board5V Power Supply
GNDGNDGND
VccV+
p22IN1
p23IN2
p24IN3
p25IN4

Note: Each relay will be also connected to AC Power Cable (HOT) and each Outlet (HOT) terminal. Note: An external 5V power supply is recommended to support the current draw from the relay board although the mbed's Vu(5V) pin may work.

AC/DC Current Sensor

mbedCurrrent Sensor
GNDGND (-)
p20Signal
VuVcc (+)

Note: The AC/DC Current Sensor must be connected in series with Relay 1 AC (-) and Outlet 1 (HOT) terminal. This will allow the current sensor to measure how much current is flowing through Outlet 1.

Images

Screenshot of Webserver page run by ESP-8266. Shown are controls for each outlet and measurements for 3.3V Power Supply, and Output1 current. /media/uploads/deronmai/screenshot.png

Video of Device in Action

Code & Libraries

Import programECE4180_Lab4_ESP8266_IoT_Outlets

iot init pub


1 comment on IoT Controlled AC Outlets:

22 Nov 2016

hello. Can you help me?

-- ESP8266 Hardware Reset ----

Received temp is: 0.000

RTC time 00:00:00 Fri 01 Jan 66

++++++++++ Resetting ESP ++++++++++ 0 ++++++++++ ESP8266 error, check power/connections ++++++++++

Please log in to post comments.