I am looking to set up a servo/stepper motor to drive a linear actuation system (in a lead-screw configuration). It is important that the linear actuation system detects any resistance from a physical object, which in turn will make the motor stop.
My current approach is to measure the current through the motor and set up a current limit such that the motor stops after it reaches a certain high current level. I intend to vary this current limit after some experimentation.
What motor and motor-driver arrangement could work to set this up? Initial searches have proven hard to find motor drivers that measure current! Stepper motors look to be insufficient for this task since their current draw does not fluctuate much during operation under varying loads, so I suspect that servo motors are a more suitable choice. I intend to control the system via a Raspberry Pi.
If you’re using a lead-screw arrangement then a brushed DC motor ought to work nicely and possibly is the simplest to measure the current on using a Brushed DC Motor Controller
For example, digging into the driver (arduino) for this controller we can see there is support for internal current measurement.
/// Reads all the results from the last current sense measurement for the
/// specified motor.
///
/// This function reads the "Current sense raw", "Current sense speed", and
/// "Current sense processed" variables from the Motoron using a single
/// command, so the values returned are all guaranteed to be part of the
/// same measurement.
///
/// This only works for the high-power Motorons.
///
/// \sa getCurrentSenseRawAndSpeed(), getCurrentSenseProcessedAndSpeed()
MotoronCurrentSenseReading getCurrentSenseReading(uint8_t motor)
{
uint8_t buffer[6];
getVariables(motor, MOTORON_MVAR_CURRENT_SENSE_RAW, sizeof(buffer), buffer);
MotoronCurrentSenseReading r = {};
r.raw = buffer[0] | ((uint16_t)buffer[1] << 8);
r.speed = buffer[2] | ((uint16_t)buffer[3] << 8);
r.processed = buffer[4] | ((uint16_t)buffer[5] << 8);
return r;
}
So I’m not recommending this controller specifically, but it appears that some type of UART or I2C motor controller could work out nicely.
If you can jag finding a Raspberry Pi driver for whichever driver IC is on board all the better!
Working the problem from another direction, stepper motors pair great with lead screws. If you want to detect a crash you can use a rotary encoder on the shaft. If the shaft is not spinning and it ought to be then you’ve crashed! You’re correct that since there is no current feedback, the crash will have the full torque of whatever the stepper drive current is set to which can be… scary depending on how big we’re talking…
Hi Harry
With Michael here. A brushed motor I think would be the easiest. The current with the light load of the screw will not be much above no load current but will rise fairly rapidly with the application of increased load, right up to stall current when stopped when full current will be present.
A low value resistor can be placed in the NEGATIVE motor lead and the voltage measured across that. The voltage will average out depending on the duty cycle of any control PWM so would be easier to control if no or constant PWM were used.
Be careful at start up. there will be an inrush spike to the value of stall current as the motor starts to turn, settling when it picks up speed.
Cheers Bob
If I go with this motor (or one similar - ideally around 6V), do you have any recommendations for a suitable current measuring sensor? It sounds like it may be the best approach to write a current limiting algorithm, using the outputs from that sensor. I’ll take Bob’s advice into account about the transient current spikes - especially at startup. Perhaps the algorithm I write could stop the motor if the current spike is detected for more than 1second - this would surely ignore the inrush spikes?
Hi Harry
Just had a look at Core site. They have lots of different break out modules for this job with a good selection of ranges. Search “hall effect” but you will have to be patient. you need to fight your way through LEDs and all sorts of other gizmos which have nothing at all to do with Hall Effect devices. Don’t know why they do this. Most annoying sometimes (read most of the time). Just have to be patient.
Cheers Bob
Yes you can when you wade through unrelated bits like Magnetometer, reed switch etc. Takes time but you can get there.
The unwanted result as far as Core are concerned is the situation where you get to a couple or more pages of completely unrelated bits then find another few of what you are looking for. It is quite feasible that a potential customer gives up after the first page of what realistically is junk as far as they are concerned and Core miss out on not only that sale but future business because the customer has to wade through so much non relevant rubbish they give up.
Would be good if someone could have a bit of a look at this. I appreciate you don’t want the situation where you need an exact match as the likelihood of finding a product under those conditions would be pretty small so some flexibility is desirable.
I know this can be a headache
I once contracted to one company who had a stores system as follows
You might want M5 stainless flat washer.
This could be that or
Washer stainless flat M5
washer M5 stainless flat
Washer flat stainless M5
or in fact as was often the case all or some of the above which you finished up with several stock codes for exactly the same item. AAAggghhhhh.
Exactly the opposite another company stock system would accept any of the above and as long as all the key descriptors were there they would be accepted in any order to return the one stock code for that product
Cheers Bob
Hi Harry
Just had another look at your post.
Brushless motors are another ball game altogether. Not sure how you would easily monitor current here. They also need special drivers as do steppers.
Cheers Bob