Go Down

Topic: How to use Arduino PWM to control motor force. (Read 237 times) previous topic - next topic

SoraJayson

Apr 25, 2019, 03:57 pm Last Edit: Apr 26, 2019, 07:30 am by SoraJayson Reason: Change of idea
I been doing a project for Stroke Patient, it is related to a load cell to test the grip strength of the patient.

Project includes:
Arduino Mega 2560
Planetary dc motor (IG42-S14E DC12V 405RPM 6.5kg.cm)
13Amp 6V-30V DC Motor Driver
5kg Load Cell and module XFW-HX711

Below is the attachment photo for the project.
https://imgur.com/a/78o88iQ

I'm learning how to use Arduino PWM to control the force of the motor. Anyone can help me? cause i'm still new with Arduino and motor stuff.

jremington

Please edit your post to use code tags ("</>" button) instead of quote tags.

larryd

No technical PMs.
The last thing you did is where you should start looking.

SoraJayson

This looks odd:
units = scale.get_units(), 10;

Well I use a coding I found at Instructables about load cell to check how it works. Right now I'm trying to do another coding for it.

MarkT

PWM doesn't control the force consistently I'm afraid.

You need to measure the current through the motor, that is linearly related to the torque of the motor.

You can then use a PID loop to set the torque by adjusting the PWM in a feedback loop.

However if the motor is stalled (stationary), then the relationship between PWM and force will be more
consistent.  It will change as the motor warms up though.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

SoraJayson

PWM doesn't control the force consistently I'm afraid.

You need to measure the current through the motor, that is linearly related to the torque of the motor.

You can then use a PID loop to set the torque by adjusting the PWM in a feedback loop.

However if the motor is stalled (stationary), then the relationship between PWM and force will be more
consistent.  It will change as the motor warms up though.
Is there a tutorial? cause i can't seem to find any related to it.

hesam_m

can you give some details about your motor driver module?

SoraJayson

can you give some details about your motor driver module?
My motor driver is from Cytron Technologies. MD13S. Rare right?

hesam_m

My motor driver is from Cytron Technologies. MD13S. Rare right?
it looks like a brushless motor driver, but your DC motor is ordinary. You probably you don't need this.

just use a logic level Mosfet and connect your load to the drain with a protection diode
if I am right brushless motors used in the applications where speed matters, such as a quadcopter

MarkT

Is there a tutorial? cause i can't seem to find any related to it.
I doubt anyone else is doing this - is it being used stalled as I surmized?  The only accurate way
is to measure the current, and even then you have some uncertainty related to static friction.
Stalled motors tend to heat up (no air cooling), so the friction can change, as will the response to
PWM (the windings increase in resistance).  Measuring the current seems like the most repeatable
and sensible approach if consistency is important.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Go Up