Naoki Yokoyama
About MeCVResearchGitHubGoogle Scholar

The Habit-Forming Device

Pavlok is a device that helps users form good habits and break bad habits. It uses various stimuli, such as vibration, beeps, LEDs and electric shocks to train the user to reward/warn/punish the user on their actions.
As an intern, I did a variety of things ranging from debugging board revisions, embedded programming, mechanical design, and even backend coding for the API, which was done in Ruby on Rails.
Using Ruby on Rails, I allowed the user to setup times at which they can automatically receive a particular stimulus, using just a web browser and their account credentials. This app utilized the Facebook Graph API and the Parse database API for storing the accounts' info

Embedded Programming

At Pavlok, I programmed various aspects of the main script, as well as the code for the shocking business cards (actually PCBs) my boss would hand out. I learned BlueGiga (coding language for the BLE chip we were using) and used it interface the microcontroller with the various I2C sensors on-board, setting up interrupts to inform the Pavlok when a certain action occurred. I also worked on other features, such as making sure the chip would sleep when it should, checking the strength of the shock being charged, and making the device discoverable only when the button was held down, among other things.
I also integrated ANCS (Apple Notification Center Service) into the code so that the Pavlok would receive all the notifications the phone got, which is a very useful feature for wearable devices.

Mechanical Design



When we first started out, we handed out Pavloks in 3D printed cases to trial customers. I customized the case design with SolidWorks in order to make the case as nice as possible. Then, I used packing tape and a 3D printing trick (mouse-ears) in order to make the case glossy while also preventing warping. Using a laser cutter, I cut mini lightning-bolts which were embedded in the case during the 3D printing process.