The C25K machine

C25K (or Couch to 5k) is a running program for people who have never run before. The idea is that you start alternating running and walking for short times, and increase the time as the weeks of training passes. The idea is that you’ll be running 5 km by the end of the 9th week.

The image above shows the first 4 weeks. Running is red and walking is yellow.

The first obvious question is: how to control the time? Obvious answers are a smartphone or a wrist-watch, but I don’t have neither. And since I needed to procrastinate before start actually running , I decided to create a device to control the running time: the C25K machine.

‌

The project

The idea is to have a device where you can input the running day, power on, and it will indicate the start/stop running time audibly. It needs to be small and low powered, so it can be easily carried along, and that you can finish all 9 weeks of training with one battery.

A beeper will beep indicating the next action. One beep means run, two beeps means walk, three beeps means warm up/down, and infinite beeps means the training is over.

The first main design decision is how to input the running day. Since I’d be the one using the project, I decided to use a DIP switch, and input the day as a binary number. This way, the first day (W1D1) would be 00000 and the last training day (W9D3) would be 11010.

As for the microcontroller, I needed a very simple one, low powered and with a lot of pins (for inputting all the DIP switch pins). I decided to go with the ATTINY2313.

This is the project that I came up with:

The components used are:

SW1 and IC1, the DIP switch and the MC previously described;

C1 and C2 are capacitors that help stabilize the power;

Q1 is a 1Mhz crystal clock. The MC supports up to 16Mhz, but by using a 1Mhz clock we can reduce the power usage;

SG1 is a simple 3V buzzer, loud enough to be heard over traffic;

G1 is a simple CR2032 battery. I calculated that it can power the circuit for at least 86 hours, so more time that we need.

Since I’m only using 5 switches of the DIP switch for inputting the day, I decided to use the other three as:

one power switch;

one warmup switch, that indicates if the training is going to have a 5 minutes warmup before and after;

one test switch, to test the buzzer.

‌

The prototype

I decided to use a perfboard for the prototype. This is the final result:

I was very pleased with it. It’s pretty small and performed great. I’m now at the middle of the training (week 4), and have used it every day of the training. I was planning on making a wrist holder for it, but I ended making a small plastic enclosure and carrying it on my hand.

If you look carefully, you’ll see two parts missing: C2 (one of the capacitors) and Q1 (the crystal clock). C2 was not part of the original project, but after the buzzer start faltering, and decided to add it, and it completely solved the problem.

As for the crystal clock, my initial decision was to use the ATTINY internal clock. However, the internal clock has proven to be too inaccurate (up to 10%), so I ended up adding an external clock.

And this is the backside of the device, showing my lack of soldering skill :-)

Download here the schematic and the source files

UPDATE: as some viewers noticed, C2 was wrongly in series with the beeper in the schematic. The schematic is now corrected.