Controling L16 linear actuator with LAC and Rotary Pot

Hi all and thanks in advance for any advice. firstly i apologist if this is found elsewhere but i havent managed to find it, and secondly i am no IT expert, so please try keep things in simple terms :slight_smile:

basically i am contolling a Linear Actuator with a LAC board and a rotary Pot.
this works perfectly where in want to utilise 100% travel of the actuator, ie 50% rotation of the POT = 50% extension of the Actuator. :slight_smile:

however when i place limits on the extension and retraction of the actuator the pot then only controls the movement within this range and has a dead zone at the top and bottom of the rotation.
i.e. if i limit my actuator to have movement between 20% and 80% though my LAC (the blue rotary dials) then the POT only works and moves the linear actuator also within that range,
i.e. i can rotate the POT from 0-20% and nothing happens, until i get to 21% then the actuator will move…

this would be fine however i want to have 100% control of the actuator within this range (20-80%) ie the pot thinks that 20% = the zero/ start point and 80% is the 100%/ finish point.
so that the pot has no dead zone at the beginning and end and i have 100% control and refinement in the two restricted limits.

i also have an Arduino but have never written code so wouldn’t know exactly where to start… but happy to learn and do the hard yards.

iv written / coppied a few macros in Excel before so im capable of learning and adapting to code :slight_smile:

Any help / advice / links to this would be greatly appreciated.

This all comes down to the code / program. If you indicate you were able to get full extension using the full range of the potentiometer (0-5V), that is a good start.
From what we understand, you want to limit the rotation of the potentiometer but still get full range of the actuator, correct?
If so, this involves “mapping” the minimum value you want from the potentiometer, and the maximum value to the full range.

Example (different values):

0V = 0 (analog value) = minimum actuator position (fully retracted)
5V = 1024 (analog value) = maximum actuator position (fully extended)

You want something like:
1.5V = 307 (analog value) = minimum actuator position (fully retracted)
3.5V = 717 (analog value) = maximum actuator position (fully extended)

You will also need the code to ignore any values below 307 (for example) and above 717.
This means that you would have 40% of the potentiometer’s rotation.

y=mx+b

Hi and thank you very much for the reply.

im after it the other way around so have a limited extension and retraction of the actuator, but have full control within that restricted range with the Pot.

i am assuming it is similar to above but reversed. ? how do you measure the Analog value? i can use a volt meter to calculate the voltage of the pot, however how do i specify the corresponding analog value?

im guessing i want something like
0V=307 (analog value at limited minimum position)
5V=717 (analog value at limited maximum position )

Are you also able to point me in the right direction as to where to find some similar code please, i could look over the code and extract the parts i need. i have never written code before so will struggle without having something to copy :slight_smile:

thanks again for your help
cheers

You can use the analogread value of the Arduino and display it via the serial interface.


Within the map function, you’d instead put your min / max analog values.

Fantastic thanks that looks like exactly what i need. :slight_smile:

For the map function, how do i determine what the analog value would be ? apart from trial and error.

i.e. is there a way of reading the analog value of the actuator, to determine its value at different extensions? or even its value at full extension and retraction, i presume it is a linear relationship so some simple algebra could work out the equation.

CHeers

“Trial and error” is effectively moving the knob to the lowest position and recording the value, and then the max position and recording that value. No iterative process.
Same for the actuator - extend it to where you want the “min” to be, record that value, and then the “max”.