15 Seconds to understand the concept!

What I want is:

  • A Tiny Touch-Button
  • I can just stick on a wall or desk, without additional wiring, so its battery driven
  • Can be enabled with a simple-touch, so it needs to wake-up from sleep
  • Connects to WiFi and is very flexible, so it needs to have an ESP8266
  • !!!!! The final solution will have a small battery having the same size as the button — of course 🙂 !!!!

Why this was a little challenge?

Well…I already got the display running, check out this Post. But it consumes a lot of power when used, so it needs to SLEEP, when nobody is using the display. Now it can stick on a wall, it just waits. Once you need it, you touch the display, it wakes up and it is there – after some time it will fail again into deep sleep. It should last there for some month.

It is easy to put the ESP8266 into deep sleep – -but how to wake it up?

Unfortunately I didn’t find a logic in the display, that would support a “wake-up” signal for the ESP8266. So the approach is to have the ESP8266 always sleeping and use a PIC Low Power Microcontroller to regularly give short time power to the display to check its touch controller. If not touch is reported, the PIC switches off the power and goes back to sleep. If a touch was detected, the PIC will wake-up the ESP8266, give power to the display and enable the backlight. All is back running.

Why so complicated?

That is a good question, my initial idea was to use the ESP8266 to regularly wake-up and check the display. Unfortunately the ESP8266 is not able to keep status of its IO (digital IN/OUT) during deep sleep (took me quite some time to find this out), so when in deep sleep -it would leak power to the display (actually even to disable the backlight was not possible)…and *no power saving*.

You can the the little PIC here, its connected to a transistor that is “grounding” the display to close the power loop. Once this is done, it will pull-down the backlight (so it keeps disabled) and it will check the “touch IRQ” pin of the display. Only when detecting a touch it will pull down the RST to ground, so the ESP8266 is waking up. The nice thing of a PIC, it keeps the IO status during sleep, it doesnt need any other hardware to run and it can be programmed easily. Maybe I do another post about it later.

Finally I realized that this will be a bit of wiring, so I did my 2nd PCB using Fritzing to layout the PCB and directly ordered it via Aisler, a German company for quick prototyping. I was very positively surprised by the cheap price and the quick delivery. Its so much easier to design the PCB then doing all the wiring. The the results below.

Categories: Uncategorized


Leave a Reply

Your email address will not be published. Required fields are marked *