Page 1 of 1

MCP236 close loop currrent control

Posted: Thu Aug 29, 2019 11:13 pm
by fausto.tromba
Hi
I'm new with BasicMicro.
I have MCP236 and with the Motion studio, is possible to drive the motion driver in PWM, speed or position control, as far as I understand. Unfortunately, I cannot see current control. There is PWM but it is more "voltage" than current. is it possible to set in current with a current sensor to close the loop?

Thanks
Fausto

Re: MCP236 close loop currrent control

Posted: Fri Aug 30, 2019 9:35 am
by Basicmicro Support
MCP controllers support current control(using their own onboard current sensors). Setting the Inductance and Resistance settings(see PWM settings screen) enables current control mode on MCP controllers. Duty commands are mapped to current instead of voltage when in current control mode. The range of current is specified by the Min/Max Current limits set for the motor. For example if max current is 30amps and you set a duty of 16384 the MCP will increase power to the motor(in the forward direction) until 15amps is reached or 100% power has been applied. If -16384 is set MCP will increase power(in the reverse direction) until 15amps is reached or 100% power has been applied.

Note that the motor inductance is in Henries and the Resistance is in Ohms.

The more accurate the Inductance and Resistance settings the better the current control will function.

Re: MCP236 close loop currrent control

Posted: Mon Sep 09, 2019 5:17 am
by fausto.tromba
Hi
Thanks a lot for your mail. I set the inductance and the resistance (L = 0.0020 H and R = 2). In PWM-tab playing with the vertical bar, I can move the motor. Duty is only in read-mode and I cannot write on it. The bar code is really sensitive. There is one way to write it?
Now the current limit is +-15A.

Thanks
Fausto

Re: MCP236 close loop currrent control

Posted: Mon Sep 09, 2019 10:20 am
by Basicmicro Support
The text box for duty just shows the numeric value of the slider.

Remmeber when using current control mode if you have no load on the motor(eg its off the ground) it is going to go off to full speed(or until it reaches the current you requested.

Put a load on the motor(or stall it even) and you should be able to control the current via the slider accurately(eg all the way up or down will be 15amps(in the specific direction). Back to center should be 0 amps. Midway between center and up/down should be 7.5amsp etc...

This assumes your motor can pull at least 15amps under that load.