Can I read output voltage to motor?

General discussion of using Roboclaw motor controllers
Post Reply
Posts: 1
Joined: Fri Feb 05, 2021 3:06 pm

Can I read output voltage to motor?

Post by Pete » Fri Feb 05, 2021 3:35 pm

Currently I have a Roboclaw 2x30A and I would like to measure or calculate output voltage to each motors. I couldn't a command which directly gives me the output voltage from the user's manual (please let me know if one exist and I just missed it).

However, I found a command to give me pwm (which can be converted to duty cycle) and main battery voltage. So I thought I can simply multiply percentage duty cycle to main battery voltage to get my output voltage, but it appeared that the pwm output isn't what I thought it is.

My setup is 22V battery, Roboclaw 2x30A, and a DC motor.
When I tested read pwm command by sending a command to run a motor at constant velocity the Roboclaw already shows max pwm value of 32767 (according to the user's manual pwm goes from +/-32767), which should mean the output voltage is around 22V, but measuring the terminal directly with multimeter shows only 2V. In fact, it appears Roboclaw shows max pwm after the true measure voltage of 2V.

Am I doing something wrong here and is there a way for me to acquire output voltage to motors? And thank you in advance.

User avatar
Basicmicro Support
Posts: 1543
Joined: Thu Feb 26, 2015 9:45 pm

Re: Can I read output voltage to motor?

Post by Basicmicro Support » Thu Feb 18, 2021 11:01 am

If you are using velocity control you have no control over the PWM. The Velocity PID does. The PWM setting is only valid(IIRC) if you are controlling the duty directly.

Post Reply