All posts

dev-log

Refining the Concept

In our last dev log we described the why and how of our first test device. That iteration was mainly focused on getting a prototype that would be useful to evaluate the operation and experience of living with the Detox Box concept.

This was a good start, but we wanted a prototype we could use for months and experience the long-term effects, benefits and consequences of this device. I wanted to find out how users might try to subvert the box operation, or force an early open or any other real life issues that might arise.

We accepted a number of limitations for the sake of development expediency. It was time to solve that!

Rethinking Requirements for a Real Product

Overall the basic requirements of the first Detox Box prototype were enough to improve my habits. However it was time to think beyond just my own circumstances, it was time to imagine how customers would interact with the device and iteratively improve the interaction.

The device needed to have a processor with persistent storage so information about scheduled unlock time or other device state could be saved and survive a reboot.

Secondly we wanted to develop a web interface so users could interact with the device directly. This would let them pick and customize their open / close scheduling etc., or change the timezone / daylight savings time. Some mode ideas we wanted to try were a weekly & daily schedules, as well as a timer mode for phones, and a "time capsule" mode where it would open on a certain date and time.

Lastly, from the hardware & mechanical design perspective these consisted of a flimsy opening mechanism, as well as misalignment issues that exacerbated the lid not closing correctly every time. We also needed a larger box so multiple items could fit in.

Making an Approach

Because I used more time on the electronics than I had wished on the previous prototype, I made a choice to use an Arduino nano compatible board with an RP2040 chip. This nifty little device has WiFi, Bluetooth and a persistent storage layer. It also has the same pinouts as the original arduino nano so it can be used directly with the same board design.

There were a few changes that needed to be made on board due to the lower logic level of 3.3V but this was a pretty easy change as I just needed a switching transistor with a lower gate voltage level. This board also had the ability to be programmed with a microcontroller implementation of python, I thought this would speed up the development but there were some issues. More on that later.

Lastly I needed a larger servo, and a mount that would allow flexible alignment due to the loose tolerances in the cheap amazon box we used. This I could make on my new CNC machine, the amazing and wonderful Carvera, which would improve strength and precision with its 0.01mm tolerance.

The CNC-machined servo mount This servo mount would allow horizontal slide-on translation while preserving vertical alignment, perfect for solving the lid closing alignment problem that vexed us in our previous build. Making these was a learning process but an important one. Not entirely embarrassed to say I ended up making a few.

With the hardware & electronics configured for an easy upgrade in the larger box, it was time to really dig into the firmware and use the device. This is what the prototype looked like at this stage, still an ugly mess, but it was functional.

The second coming

Getting It Right with Firmware

With the box hardware configured, the firmware was the last obstacle, and it would evolve over months of use.

A weekend of hacking got me something usable that would allow me to test a daily schedule. Now with an internet connection I could get UTC time from the internet and back track based on user location. The WiFi connection also allowed me to build and host a small website from the device that allowed the user to set their daily open time initially.

So for a few weeks of testing I would live with a 10pm daily open time, but eventually I realized that I wanted to enjoy my Friday evenings and the weekend more so I developed the weekly schedule mode. This would set the open time and if the day was enabled (disabled days were discipline free).

After a few minor upgrades to the microcontroller code, I was using the weekly schedule mode. 10pm weekday open times were still the default, but Friday the box opened at 8pm, and Saturday / Sunday were at 5pm. This worked great for months. I got more done on my client's work, as well as this side project.

There were occasional failures with the firmware which would open, or could be opened from the web-ui when the device was still in "Dev Mode". I was also able to see machine state from the web-ui. These interactive interfaces are extremely helpful in improving iteration and debugging speed.

As I was gaining confidence in the machine and it became more reliable I wanted to try taking weeks or months long breaks from my distractions of choice. The "time capsule" or "date" mode was the most ambitious in terms of commitment and the box reliability required.

I also wanted to test a simple duration "timer" mode for short term phone use. This would let you put your phone or other distraction down for an hour or any duration.

A few more lines of code and all four modes were ready to go.

Your Box, Your Rules

Months of work behind me, and here it was. A real immovable, unswayable device upon my own desk.

The previous prototype revealed to me that because there is no fear of "loss" of the activity, putting away your distraction feels effortless.

Further, beyond the first day there was no great compulsion to break in. It was seemingly a subconsciously settled matter.

For the daily & weekly modes, this felt about the same as the first prototype's experience albeit way more reliable. Every day was better because I had already made a choice to ignore my distractions for certain parts of the day.

The interesting effects, the stress test, if you will, was Timecapsule mode. What made the transition to months-long gaps of use was to gradually increase the open date from a few days to a week, then gradually up to a month of detox.

Admittedly the first few days of timecapsule mode were painful when set for relatively long transitions beyond a few days. However after those first two to three days "the reach" completely subsided. In the end I was enjoying a few months of detox almost effortlessly with the distractions right under my nose.

This test proved that I was on to something, the hidden habits we have can be abated or destroyed through a subtle manipulation in framing the actions for the brain.

A simple demo of the web ui

← Back to all posts