correct state if power was lost and restored while lights
were either on or off. The X- 10 control was added after
everything else was functioning because it seemed a
shame not to take advantage of the many X- 10 modules
that I presently own. Refer to Figure 7.
I selected the Arduino standard serial port to
communicate to the ESP8266 module. This kept the
Arduino code cleaner because only one serial bus
communication channel was needed, and it avoided the
potential pitfalls that exist with the Software Serial
Library. The only limitation of this approach is that the
ESP8266 must be unplugged or have its serial port
disconnected during any reprogramming effort on the
Uno. Once the timer is up and running, I anticipate a
few cases where I will reprogram the Arduino.
If you choose to use my serial methodology but
later add diagnostic [Serial.write()] commands, be sure to
comment out those diagnostic messages before
connecting the ESP8266 serial bus. Any time an upper
or lower case letter (a through j) appears on the serial
port, it will cause the associated Wi-Fi module to
respond. The ESP8266 draws more current (up to 300
mA) than the Arduino 3. 3 volt regulator can supply.
Therefore, I added a DC-to-DC converter to power the
ESP8266 directly from my AC-to-DC adapter.
The Arduino provides a direct pin connection to the
9 VDC input (Vin header pin), so no cutting and splicing
of the adapter power supply is required. There are many
DC-DC converters on the market. Be sure to choose
one that can accept your maximum DC input voltage
with some operational margin. Also, if you choose a
variable output DC-DC converter, be sure to adjust it to
3. 3 VDC before connecting the ESP8266 module.
The schematic (Figure 8) shows all component
wiring required for this project. I incorporated the DC-DC converter and all ESP8266 support components on
a small breadboard with an eight-pin header to plug in
the ESP8266-01. R5 and R6 are required because the
ESP8266 cannot accept + 5 VDC that could be supplied
on the serial transmit pin from the Arduino. The serial
receive pin on the Arduino will accept the 3. 3 VDC
signal from the ESP8266 transmit pin, however.
My software does not require data to be transmitted
28 August 2017
■ FIGURE 7. ESP8266-01 pinout.
GitHub.com — Locations for add-on libraries that must be
Marco Schwartz website
3D printed enclosure
X- 10 CM17A Firecracker interface
Location for Arduino.cc libraries
Installation of ESP8266 boards into Arduino IDE