Tag Archives: IoT device


ESP8266 controls an AC outlet for lamp

Gary shares his ESP8266 controlled on/off switch for a lamp.

The first step is to find a case to house the parts in. I had an old TP-link router case that I used. It already had a two prong spring out 110v connections but any box will work. When planning your boxes figure out how your going to get the AC in and out of the box. A stop at your local bigbox hardware store should give you lots of idea. At a minimum a deepwall outlet/switch box will work but use your imagination. My project only uses 2 wire as thats what the case supported but if your planning on switching anything other than simple lights use a 3 wire system and include the ground.

If your not sure about what wires goes where take a look online on how you would add a simple manual switch to a circuit and just replace the switch with your device.

On/Off AC outlet switch using ESP8266

On/Off AC outlet switch using ESP8266

IoT enabled lawn mower

Michel from Quebec, Canada recently bought a EGO brand battery powered lawn mower to which he added an ESP8266 module along with a PIC MCU and a couple of hall sensors to make it an IoT-enabled mowing device that is now capable of sending tweets during its mowing session.

Tweeting lawn mower

IoT enabled lawn mower

To make sure I would not void my mower’s warranty I’ve used 2 Hall Effect sensors and a few magnets: one on the bail switch, five on a wheel. Three revolution of a rear wheel represent a distance of 245cm (~96½”). There are 10 spokes on the back of the wheel. With five magnets this gives me a resolution of 16.33cm (6.43″). The display I’m using is a Digole 160×128 True Color TFT LCD. I like Digole’s displays because they have a backpack with a complete graphic engine and 7 preloaded fonts. The kit run on 2 AAA batteries. The ESP8266 is initialized on power-up to get the actual time on my Windows Home Server and placed to sleep to minimize the power consumption. When it’s time to publish a hard reset is done. At the end of transmission the ESP8266 is put to sleep again.