I recently got a NordicTrack T5.7 treadmill which is powered by a MC2100LS-30. It is an older treadmill that works great, however one of the features of the new treadmills out today allow you to visualize your treadmill run like so:
This is amazing to me, but my treadmill is not smart like this nor does it have a screen so I want to try and replicate this with an arduino.
Currently, I have intercepted the connection between the controller and the console into a breadboard like so:
I want to know how to read the MPH (and then also the current incline) from these connectors. I currently have the blue wire hooked up to pin 9 and the green wire hooked up to pin 3. Description of what those wires do is below:
This is the closest I have gotten code wise, but after 2.0mph, the numbers dont matchup. I basically just slapped together code from all sorts of different places because I don't quite understand what is going on so if someone could guide me on how to properly read the data from these wires and convert it to MPH I would be grateful. Thanks!
Code:
This is amazing to me, but my treadmill is not smart like this nor does it have a screen so I want to try and replicate this with an arduino.
Currently, I have intercepted the connection between the controller and the console into a breadboard like so:
I want to know how to read the MPH (and then also the current incline) from these connectors. I currently have the blue wire hooked up to pin 9 and the green wire hooked up to pin 3. Description of what those wires do is below:
I have tried several arduino scripts but my lack of expertise in arduino and electrical engineering have me stumped on how to convert all these numbers I am receiving from these wires into a human-readable MPH.GREEN- This wire brings the speed sensor signal to the console. This is a pulsing 0, 5 VDC signal as the treadmill is
running. When the treadmill is at rest, this voltage may measure either 0 VDC or 5 VDC.
BLUE- This wire carries the square wave speed control signal from the console to the power board. The duty cycle of
this 5 VDC signal is used to set the speed of the treadmill. At the maximum duty cycle of 85% (meaning the 5 VDC is being sent 85% of the time and not being sent 15% of the time), approximately 4 VDC can be measured. At lower speeds, a lower voltage will be measured. NOTE: Many digital multimeters have difficulty measuring this square wave signal. They may only show a maximum of 1.5 VDC when the treadmill is set to its maximum speed. What is important to see in this instance is that the voltage goes up as the treadmill speed is increased.
This is the closest I have gotten code wise, but after 2.0mph, the numbers dont matchup. I basically just slapped together code from all sorts of different places because I don't quite understand what is going on so if someone could guide me on how to properly read the data from these wires and convert it to MPH I would be grateful. Thanks!
Code:
Code:
const int sensorPin = 3; //Blue PWM
unsigned long pulseCount=0;
const unsigned long updateInterval=50000; //50ms
int RPM=0;
long startTime;
const float TireDiameter = 13.5; // Tire diameter in inches (actually 1.9in)
const float TireCircumference = TireDiameter * PI;
const int FeetPerMile = 5280;
const int InchesPerFoot = 12;
const long InchesPerMile = (long)FeetPerMile * (long)InchesPerFoot;
const int MinutesPerHour = 60;
void setup()
{
Serial.begin(9600);
attachInterrupt(1, N1, RISING);
}
void N1() {
pulseCount++;
}
void loop() {
if (startTime == 0) {
startTime=micros();
}
if (millis() - startTime > updateInterval) {
RPM=((pulseCount/2)/((millis() - startTime)/600000000));
startTime=0;
pulseCount=0;
}
//display or otherwise use RPM value
//Serial.print("RPM: ");
//Serial.println(RPM);
float InchesPerMinute = RPM * TireCircumference;
float InchesPerHour = InchesPerMinute * MinutesPerHour;
float MPH = InchesPerHour / InchesPerMile;
Serial.print("MPH: ");
Serial.println(MPH);
}