Page 1 of 1

Can I read output voltage to motor?

Posted: Fri Feb 05, 2021 3:35 pm
by Pete
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.

Re: Can I read output voltage to motor?

Posted: Thu Feb 18, 2021 11:01 am
by Basicmicro Support
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.

Re: Can I read output voltage to motor?

Posted: Sun Sep 12, 2021 2:30 pm
by Pete
Thank you very much for the reply and I apologize for not checking in sooner.

I have found out the problem soon after the post. It turns out that the RoboClaw itself was faulty because a different Roboclaw returns a correct value. Since other functions of the RoboClaw still work, I opt out to leave it as it is.

Re: Can I read output voltage to motor?

Posted: Tue Sep 14, 2021 12:10 pm
by Basicmicro Support
Hmm. Reading the PWM isn't a hardware function so I'm not sure how it could be faulty on one unit but not another. It is just a memory value that is read back. If you could elaborate I would appreciate it. Thanks.