I have been implementing some linear actuators into some of our van builds for automated movements with some of the furniture pieces, bed slides, lay flat tables, seat back actuators, ect. I am trying to implement a force shutoff on some of these actuators as a safety feature for children or pets to avoid a "worse case scenario".
The actuator amperage is the only value I can use that is related to the force. The actuator pulls more amps as the force increases.
I am looking for recommendations on where to start with this. I am completely new to Arduino and programing so anything helps. If anyone has ANY advice it would be greatly appreciated.
To measure current and make decisions can work. Note that high currents might exist when starting a motor. Make some tests and find out the duration for the start up current. Then Your code could check if over current lasts longer then a start up. Or You can set a flag, at motor start, that inhibits the over current checking for a short time.
Using current measuring and draw “certain” conclusions is covered by a patent I’m a part of…
I would suggest finding a way to measure the force rather than rely on amperate of the motor. This will change with time, temperature, age, etc. This will be especially noticeable during the winter months when it gets sub zero. You will also have to deal with the voltage so that will most likely take you into sensing wattage. You can do it as you indicate but the accuracy will not be very good over time and temperature. If you stay with this consider BTS7960 module, it has lots of power capability and has built in current measurement, just read the BTS7960 datasheet to figure out how to use it.
As you are new to this concept of sensing for force...
...you could not be wrong in doing it two (or more) ways to see how things work for your application.
First off, there are more than a few current sensing devices that connect to the Arudino.
Assuming you are using DC, a simple clamp-on, or CT, current transmitter is not the best choice. the clamp on is primarily for AC voltages. Clamp-on for DC is not as common and has more circuitry.
Adding a current sensor board/module, should not be hard and you should get feedback you are looking for.
As was mentioned about possible current shift due to temperature. you could say:
if (the current is 50% greater than a second ago) then, stop motor and retract
That way, not look at the numeric value, just compare to the average.
also, you can build in a load cell in the actuator mount. as the actuator pushes, the force would change. you would need an idea about how much force is there now to get the correct load cell, but they are certainly cheap enough to buy a few for testing.
Calibrate with a beach ball, a basketball, and such.