After sitting for a long period of time we might just need a little motivation to get up and boogie! This wearable accountability tens unit motivates you and your buddies to do just that! ZAP!!

24-Hour Hackathon Competition Project (Awarded 2nd Place)


The Electric Boogie is a wearable device unit that connects wirelessly to a “beacon” placed at the user’s common sitting space (e.g. desk, table, couch, etc.). The user then sticks the provided patches to their arm, plugging the other ends into the device’s TENS unit. This unit is prewired to a microcontroller which communicates with the beacon, and which is able to roughly measure the distance to the beacon. If the user spends too much time next to the beacon, the device will send a continuous electric pulse, which will motivate the user to move away from it in order to stop the electric pulses.

The best part is that each user can have up to 15 other accountability partners that have the same system! The units coordinate via a cloud server, such that, if ANYONE in this group spends too long sitting, EVERYONE will get zapped! This helps provide outside motivation for the user to be active because they will have several people contacting them reminding them that they need to move in order to avoid the zap themselves! It’s a very fun social component of the system, which unites you and your friends against inactivity!

Project Details

For this project, there were multiple specific functions which the project had to perform, so the simplest way to explain it is to step through each of these functions, and discuss the components which made them successful.

First, the unit has to identify when the user has gotten up and moved around. After a brief experiment with some GPS chips we had planned to use (more on that in the next section), we ended up accomplishing this with just two different ESP8266 boards. The first one is part of the main unit, and the second one, which we call the “beacon”, simply passively sits at the user’s desk (or other sitting space), and broadcasts a WiFi network. The main unit is then able to tell how close it is to the desk, simply by checking the strength of the WiFi network! When the signal strength drops below a pre-set (but still user-configurable) threshold, it knows that it’s left the area!

Second, once the unit detects that the user has spent too long next to the beacon, it needs to deliver the electric shock which is central to our application. In order to accomplish this, we have a power relay which is controlled by our microcontroller, which governs the connection between the shock pads on the users’ arms, and the TENS unit which delivers the shock. The TENS unit is left on constantly, such that any time the microcontroller closes the connection, a shock is delivered. When the microcontroller opens the connection, the pads are still connected to the TENS unit (the connection isn’t fully broken), but the circuit shifts to have a high-Ohm resistor in series with it. We did this so that the user wouldn’t feel anything, but the TENS unit doesn’t think it’s unplugged, as this would cause it to turn off.

Third, the unit needs to communicate to the other units. It does this by connecting to a WiFi network (which the user is able to configure), and then connecting to a Socket.IO server we host on AWS. This server collects data from each unit, and broadcasts that data back to every other unit, such that every unit is synced up, and is aware of the status of every other person in their group – when they’re connected or disconnected, as well as whether they’ve been in one place for too long (in which case everyone will get shocked).

Fourth and finally, the unit needs to be able to communicate to the user about the status of their group. This is accomplished via a web interface, hosted on the unit itself on a tiny web server (made using the ESP8266’s Web Server library), which can be accessed on the user’s phone, tablet, or laptop. This web interface allows users to see who’s in their group, and see when each person triggers the zapping function. Additionally, the unit also acts as a web server (and also broadcasts its own WiFi network) when it’s not been configured for a “real” network, or if it’s unable to connect to it. When this is the case, the user can connect to the unit’s network and access and interface which allows them to set the WiFi credentials (as well as set their name, and the room they’re connecting to)!

Skills/Tools: amazon-web-services, arduino, css, esp, html, javascript, node.js,, ESP8266