Treadmill Speed Control Project - Arduino + Digital Pot + Hall Sensor

I've updated my schematic based on some additional research.

Key Changes:

  1. Added Safety Relay Circuit - I've added an optoisolated safety relay that cuts motor power if the Arduino fails in any way (crash, hang, power loss). The relay is normally-closed on the motor controller's inhibit input, so any Arduino failure immediately stops the motor. Safety independent of software.

  2. Confirmed Controller Isolation - Supplier confirmed the Keya 115/230DR10AL-02 has proper galvanic isolation between control (S1/S2/S3) and motor power circuits. Control ground (S1) is isolated from motor negative. They also said direct PWM is not suitable for the pure positive/negative input control, and it must be an analog voltage.

  3. I chose a digital pot over PWM - While both approaches would work electrically, I went with the MCP4151 digital pot for several reasons.

I was uncertain about PWM:

  • EMI concerns in a 180V brushed motor environment - PWM lines can pick up or radiate noise, though my lines will be pretty short.

  • Arduino's default 490Hz PWM is quite low, requiring heavy filtering to get clean analog (or at least that is my understanding, i might be wrong?)

  • Even at 31kHz, getting proper ripple attenuation needs multi-stage filtering or op-amp buffering (or does it, not quite clear to me but adds complexity)

Digital pot advantages:

  • Clean, stable analog output (no PWM ripple to filter out)

  • Simpler filtering requirements - no need for multi-stage RC networks or op-amp buffers

  • Behaves exactly like the original potentiometer (resistive divider characteristics)

  • Less analog design complexity compared to getting PWM filtering right

Digital pot trade-offs:

  • SPI wiring needs care in high-EMI environment (short runs, twisted pair)

  • Slightly more complex code (SPI communication vs. simple analogWrite)

But I thought that rather than trying to design proper PWM filtering for a 180V motor environment, the digital pot gives me a known-good analog signal that matches the original potentiometer behavior. Perhaps the simpler analog output is worth the slightly more complex digital control.

The extra complexity of SPI vs PWM seemed worth it for the cleaner signal and better noise immunity. Plus having hardware safety gives me much more confidence in the whole system.

Still working on component sourcing, but the design feels much more robust now.

Let me know if I've missed anything or gotten something wrong!