Close

Controlling the treadmill with an arduino

A project log for keyboard controlled treadmilldesk

Build a treadmill desk that can be controlled from your PC

pixjuanPixJuan 07/15/2017 at 09:290 Comments

The easiest way to control the treadmill is to simulate button presses, the original MCU will take care of changing the speed and stopping/starting the treadmill.

So the Arduino code should look like this :

Loop
{
check serial port for commands
if we receive a valid command, then simulate a key press
}

There is only 3 switches on the control panel :

After checking on the board, they are respectively linked to pin 2, 3 and 4 of the panel MCU.

The plan is to connect some Arduino pins to those switches, but first we need to check if the switches are connected to the ground or to VCC: They are connected to the ground, so it in the code we must set the pins to HIGH on init and set them to low when we want to simulate a key press.

So we just solder 4 jumper cables on the panel board, 3 for the switches and one for the ground and we will connect them to the Arduino.

So far it is working!
I tried to set pin connected to 'faster' to LOW for 500ms and it simulated 2 key presses. I lowered the timing to 250 ms and now it is reliable!
I will quickly upload the code here.

Discussions