Interval Training Assistant wemos d1 mini esp8266 potentiometer piezo buzzer button

Interval Training Assistant using ESP8266

My wife does interval training exercises in the backyard or the basement. I joined her a couple of times and noticed that she struggled to time her “on” and “off” intervals using the phone. So I saw a fun project opportunity where I get to use an ESP8266 and some salvaged parts like a buzzer and potentiometers.

Using a couple of beefy pots from an old receiver she can easily adjust the “on” and “off” workout periods in ten second increments.

The button starts and stops/resets the timer.

The ADS1115 ADC was needed because the ESP8266 has only one analog input.

To play something more interesting than just a beep I ended up writing a little library to play arbitrary sequences of notes. You can read more about the buzzkill piezo Lua library in this short blog post.

I also added a power saving mode after 15 minutes of inactivity where the display is put into a low power mode and is turned off. However I was disappointed to find out that it only saved a few mAs or a couple of percent. I kept it in there just to, maybe, increase display’s longevity and just because I already went through the trouble of implementing the feature.

The video of it in action, components used, code and schematics are all posted below. Please let me know if you have any comments, questions, suggestions or corrections.

Video

Schematic

wemos esp8266 potentiometer piezo buzzer button ads1115

Code

Lua code can be found in init.lua: https://github.com/alexchumak/interval-workout-timer-lua

Components

  • Wemos D1 Mini, an ESP8266 dev board
  • ADS1115, a 4-channel, 16-bit ADC
  • OLED display, 0.96″ 128X64 I2C SSD1306
  • Piezo buzzer
  • Potentiometers
  • Button

In-between Picture

breadboard

Posted

in

by

Comments

3 responses to “Interval Training Assistant using ESP8266”

  1. Bob Wareham Avatar
    Bob Wareham

    Hi Alex thank you for sharing your project it looks interesting so I am going to copy your design please can you tell me the value of the two pots you have used to adjust up and downtime I don’t see any code so did you use Lua code for the project, please many thanks, Bob in the UK

    1. Alex Avatar
      Alex

      Hi Bob, my bad, totally missed including pot values… And now i don’t remember for sure but believe they’re 10K.

      Yes, I used Lua for this project and you can find the code on GitHub page: https://github.com/alexchumak/interval-workout-timer-lua

      Thanks for commenting.

      1. Bob Wareham Avatar
        Bob Wareham

        Hi, Thanks for the reply after says I could not find the code I noticed the link so thanks for that and I will try 10k pots I have never used Lua so how is the best way to programme the Wemose D1 mini as I use Arduino at the moment?
        Thanks, Bob

Leave a Reply

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