What kind of communication is used in treadmills to link the upper and lower board?

Thread Starter

Xavier Pacheco Paulino

Joined Oct 21, 2015
728
Hi,

What kind of serial communication (if serial) is used in treadmills to link the upper and lower board? UART, I2C, Can bus, etc? I mean, how the console sends the commands to the driver board.
 

MisterBill2

Joined Jan 23, 2018
9,795
The first step is to decide what you will communicate to the driver board. Then you need to decide what all the control system will do, what functions it will provide. Then you can select a processor that can handle the required software. Once the processor is selected then you can choose from the communication protocols that it can support and determine which is the most cost effective in that application. Thus, selecting a communications means is far from the first item on the list.
 

Thread Starter

Xavier Pacheco Paulino

Joined Oct 21, 2015
728
The first step is to decide what you will communicate to the driver board. Then you need to decide what all the control system will do, what functions it will provide. Then you can select a processor that can handle the required software. Once the processor is selected then you can choose from the communication protocols that it can support and determine which is the most cost effective in that application. Thus, selecting a communications means is far from the first item on the list.
It's a basic system where the console tells the driver to start/stop the DC motor, increase/decrease motor velocity (PWM), angle position (incline motor), also the driver tells the console if there's any error/problem in the system. The basic functions of typical treadmill. I'm thinking of developing an app (GUI) on a raspberry pi to operate those commands. I'm also thinking of using an STM32 MCU for the driver. So, I have to communicate a raspberry pi with an STM32.
 

MaxHeadRoom

Joined Jul 18, 2013
23,907
It's a basic system where the console tells the driver to start/stop the DC motor, increase/decrease motor velocity (PWM), angle position (incline motor), also the driver tells the console if there's any error/problem in the system.
So you have much of the system laid out already, with only a couple of metres between the GUI and the controller it is not really critical and is virtually wide open to pick a method of your choice, whichever is easier with the system you have chosen.
Max.
 

Thread Starter

Xavier Pacheco Paulino

Joined Oct 21, 2015
728
How is communication normally made? I mean, for example, let's say I chose to use UART to communicate the raspberry with the STM32 and I want to send a command from the console to the driver to increase the PWM duty cycle (therefore increase motor velocity). Do I have to assign an stream of bit to each command? For example, increase the velocity is 00000001, so that's what I send from pi to stm32?
 

dendad

Joined Feb 20, 2016
3,939
That is almost like saying "how does language work".
All languages use sounds but they can indicate different things.
The "language" used in treadmills in not fixed. It will depend on the manufacturer.
It could be as you say, a byte for some command, or a packet of data incorporating a register, read or write command, data and error checking.
 

MaxHeadRoom

Joined Jul 18, 2013
23,907
As an example using a picmicro, a particular required rpm of the motor would correspond to a certain 10 bit value for the CCP registers, this could be the value transmitted over from the send unit.
What you could do would be to first find out empirically the PWM value for rpm values across the rpm range.
This would be converted from a operator entered MPH rate that corresponds to the the required register value.
There is then the question of feedback from the motor if precise control or correction is required due to different loading etc.
Max.
 

RichardO

Joined May 4, 2013
2,271
How is communication normally made? I mean, for example, let's say I chose to use UART to communicate the raspberry with the STM32 and I want to send a command from the console to the driver to increase the PWM duty cycle (therefore increase motor velocity). Do I have to assign an stream of bit to each command? For example, increase the velocity is 00000001, so that's what I send from pi to stm32?
I always use ASCII for the commands and arguments. This makes debugging much simpler because everything is human readable without having to decode bit patterns.
 
Top