Help using RioRand motor driver with uno

Hello i'm trying to use a RioRand motor controller with an arduino uno.

This is the driver.
RioRand Upgraded 6V-90V 15A DC Motor PWM Speed Controller 1PC: Computer Usb Port Cards: Amazon.com: Tools & Home Improvement

When using the potentiometer the motor runs great but, if i use a pwm signal from arduino the motor seems to pulse from low to high.

Schematic.

Code.

/*
  Fade

  This example shows how to fade an LED on pin 9 using the analogWrite()
  function.

  The analogWrite() function uses PWM, so if you want to change the pin you're
  using, be sure to use another PWM capable pin. On most Arduino, the PWM pins
  are identified with a "~" sign, like ~3, ~5, ~6, ~9, ~10 and ~11.

  This example code is in the public domain.

  https://docs.arduino.cc/built-in-examples/basics/Fade/
*/

int led = 9;         // the PWM pin the LED is attached to
int brightness = 0;  // how bright the LED is
int fadeAmount = 5;  // how many points to fade the LED by

// the setup routine runs once when you press reset:
void setup() {
  // declare pin 9 to be an output:
  pinMode(led, OUTPUT);
}

// the loop routine runs over and over again forever:
void loop() {
  // set the brightness of pin 9:
  analogWrite(led, brightness);

  // change the brightness for next time through the loop:
  brightness = brightness + fadeAmount;

  // reverse the direction of the fading at the ends of the fade:
  if (brightness <= 0 || brightness >= 255) {
    fadeAmount = -fadeAmount;
  }
  // wait for 30 milliseconds to see the dimming effect
  delay(100);
}

Thanks!

Sounds like your motor controller is expecting an analog voltage control, not a PWM (pulsating 0V/5V) digital signal.

The PCB even has 0-5V on the silkscreen. And the 3 pin connector has a pot on it. So, it's definitely an analog input. The PWM aspect of the controller is referring to the motor output signal, not the control input signal.

A digital pot would do the trick.

1 Like

Thanks for the reply that makes sense.

@van_der_decken
Is this what you had in mind?
935 Adafruit Industries LLC | Development Boards, Kits, Programmers | DigiKey

That's a DAC. Different beast. It may work, it may not. It would depend on the circuitry on the motor controller. A digital pot of the same value as your hardware pot would be where I'd start experimenting. YMMV

Something like this? It has the same resistive value as the included pot.
4286 Adafruit Industries LLC | Development Boards, Kits, Programmers | DigiKey

That's the kind of thing.

Thanks a million! :smiling_face_with_sunglasses:

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.