An ESP-32 Remote Control–Introduction

A couple of years ago I did an ESP-32 based controller for our landscape lights and fountain. It has a nice web-based interface, if you like the way interfaces looked when HTML was young…


In addition to this web page, you can hit http endpoints directly, so you can control things with either a browser or an HTTP app on your phone. It’s a bit of a pain to dig your phone out and run an app to turn on lights, so I’ve always planned on doing a handheld controller. It’s going to be pretty simple; just a set of buttons and an app that sends requests to the actual controller.

At least, that’s how it started…

My original plan was to use an ESP8266 because it’s smaller and to use some normal momentary pushbuttons:


That would have been fully functional, but I didn’t really like the way the buttons looked and I didn’t like the low-power options very much. I was looking through the ESP-32 technical manual and remembered that the ESP-32 has a touch-sensor subsystem that supports 10 separate inputs. That means I can do a cleaner-looking controller that has metal touch points rather than buttons, and the ESP supports wake on touch, so I can put the controller into deep sleep.

Conceptual design

Here’s a very quick drawing:


Here’s what I’m thinking for the design. There are 5 circuits to control:

  • Fountain pump
  • Bed lights
  • House lights
  • Umbrella lights (strips under umbrella)
  • All lights

In addition, I want to be able to control the brightness of the umbrella lights in 5 steps; 20%, 40%, 60%, 80%, and 100%

Coincidentally that requires 10 different controls, which is exactly how many touch inputs the ESP has, so that worked out well.

The controller will be remote-control-shaped, with batteries (tentatively 2 AA alkalines) near the bottom, the ESP in the middle, and an array of touch points at the top.

Sleep battery calculations

There is an assertion that the ESP32 in deep sleep only pulls 2.5uA. A typical alkaline AA cell has a capacity of about 2000-3000 mAH, so if we do some math:

Hours = 2000 mAH * 1000 (convert to uAH) / 2.5 = 800,000 H, or 33,000 days. If we could really get that, that would be 91 years on standby.

Let’s do the calculation the other way; if we wanted batteries to last a year, that would give us:

2000 mAH / 365 = 5mAH per day, or 228 uA of constant current. If I can hit something under that, I’ll get a year out of the batteries.

Getting that to work is going to require me to either modify the ESP-32 devkit boards I’m using or switch over to a raw module and separate programmer, but that’s a matter for another post/video

So, what do you think ?