Creating a device from scratch
Ever since i heard about Arduino and all the possibilities that it has to develop a device from scratch got me thinking about it. how would the process be like? how long would it take? how difficult?
So a few weeks ago when a friend tells me that he needs a workout timer to use in his gym and cannot find one cheap enough to be usable I figured that was my chance for me to try to create the kind of device he was hoping for.
first prototype
at first I started thinking about what would be the minimal features that the devide would need to work. I started thinking about features and organize them in “must have”, “good to have”, “not really”
must have features included having at lease 1x1 2x1 and 3x1 intervals and some sort of sound signal to let the trainee know that they should either start or stop working out.
good to have features included different intervals and different resting times.
not really features included configurable/programable time intervals and a full blown keyboard/panel.
eventually I managed to define a set of features and reduce to a minium the buttons needed. finally a single button, a bunch of leds and a buzzer is all the hardware required. The first Idea was to use two buttons to change mode between program and workout. and another to start/stop workout. but I finally decided that using a single button was better and provided a cleaner solution.
After I finally decided that what I needed to build. the timer would have:
- two different modes “program” and “workout”
- one button will be the only interface. holding the button will swap between the two modes.
- a single push or the button will do different things on each mode
- on program mode will swipe between different combinations of workout and rest times
- on workout mode will start/stop the timer count.
- the timer will have a buzzer to signal the change between working and resting intervals.
- five red leds will display the current working interval
- two green leds will display the resting time
- two other leds in different colors show the current mode and state (either working or resting)
my approach to de development was very simple. I started by trying out the differents parts using a board I had around and mounting the components on a protoboard. after I tried every part on its own started integrating the sensors on a single sketch. when that was complete I decided was a good idea to choose one of the smaller boards in order to reduce the form factor and keep the costs down. the choosen board was the arduino pro mini. basically the same as the nano I was using for the development but smaller and without the usb interface.
after a few mishaps with the pro mini, like the writing interface that didn’t worked with my computer or connecting the power source with the cables in the wrong order I got it to work and started “designing” a prototype. for this I used a piece of prototype pcb I got lying around. I choose a suitable layout and soldered everything in place. then I selected some plastic enclosing (a food container) and mounted the prototype inside
Trying different layouts on a protoboard
then the real problem started, the buzzer I used was too low for a gym environment, I tried many options but finally decided to trigger a bigger piezo buzzer with 12 volts of current. this required me to add a voltage regulator (to provide 5v to the arduino) and a relay to trigger the piezo with 12V without frying the arduino in the process.
this whole process took over a month but was no more than a few hours each weekend and some thinking or research during the week. the timer was been working for a month non stop at the gym without any issues so far.
whats next
Finished prototype
so, I have this prototype, that do exactly what I need it to do, but what now? I think there is a market for the these kind of devices, but how big, I don’t know. what’s the next stage? should I proceed to build it for sale?
In case you’re wondering, you can check the code here.