Notifications
Clear all

Treadmill Speed Control Project - Arduino PID with Hall Sensor Feedback

1 Posts
1 Users
0 Reactions
1,172 Views
TASan
(@tasan)
Member
Joined: 3 years ago
Posts: 48
Topic starter  

I've been working on upgrading my cheap treadmill's terrible speed control and would love some feedback on my design before I start ordering components.

My daily walker treadmill is frustratingly inaccurate - it's off by 30-40% when I'm actually walking on it. I measured this by filming the belt and timing how far a marker moved compared to what the display claimed. Meanwhile, my expensive treadmill (which has a reed or hall sensor for feedback) is dead accurate.

I am planning to replace the original speed controller with a proper Arduino-based PID system using hall sensor feedback. Basically turning my cheap treadmill into something that behaves like the expensive ones.

I am planning to get a Keya 115/230DR10AL-02 motor controller (replacing the original completely), controlled by an MCP4151 digital potentiometer that the Arduino adjusts based on hall sensor readings from the roller. I confirmed with the supplier that the controller has proper galvanic isolation and accepts 0-5V analog input on its control pins.

For speed sensing, I'm mounting an A3144 hall sensor on the frame with a small neodymium magnet glued to the roller end. Pretty straightforward pulse counting for the PID loop.

Since people will be walking on this thing with a 180V motor underneath, I added a hardware safety relay that cuts motor power if the Arduino fails in any way. Using an optoisolated relay module where the Arduino controls the coil through an optocoupler, and the relay contacts interrupt the motor controller's inhibit input. My theory is that any Arduino crash, hang, or power loss means no current through the LED, so the relay opens and stops the motor immediately.

I went back and forth on using a digital potentiometer versus PWM with RC filtering. Both would work since the controller accepts direct 0-5V input, but I figured the digital pot would give cleaner signals in the noisy environment around a big brushed DC motor. Plus it behaves exactly like the original potentiometer the controller expects.

The plan is to use a Mean Well isolated 5V supply to power the Arduino and keep all the isolation boundaries intact. The digital pot gets its reference voltage from the controller's 5V output (only draws 0.5mA, well under the 5mA limit) and connects as a standard voltage divider.

Here is my schematic (using Fritzing as it's the only program I understand for this). I tried color coding cables to make their runs clearer.

treadmill controller schem

Why This Project

I walk while working at my computer and have been frustrated with the speed inconsistency. I've already modified this treadmill with better cooling, so adding Arduino control seemed like the next logical step. Eventually I want to add web interface control so I can adjust speed without reaching for the console.

I know it's not strictly necessary - the thing works as-is - but it's been a fun way to learn about motor control systems and closed-loop feedback. Plus I have a bit of OCD, and knowing the speed I set is actually the speed I am walking (without it drifting over time etc.) is a great plus for mental calmness.

---

Are there any obvious issues with this approach? I'm particularly interested in thoughts on component choices, the safety relay setup, and whether I'm missing anything important for reliable operation. Also open to suggestions for improvements or alternative approaches.

The goal is to end up with something that maintains speed accurately regardless of load, just like the commercial units do. Any wisdom from folks who've done similar motor control projects would be much appreciated!

Thanks for taking a look!


Interested in learning about electrical engineering!


   
Quote