I am wondering if you might be able to help me with a little Arduino project I'm doing.
The Goal is to use an Arduino mega to control 16 small linear actuators, each with a 2 inch stroke. Here is the actuator I plan to use.
I'm thinking Arduino talks to relays which talk to the actuators.
Then create a 30 second loop that runs once when a button is pushed.
When the loop starts, all the actuators are completely retracted.
Then for the next 28 seconds, each of the actuators randomly extend or retract. They all go up an down randomly. Some go all the way up, some go part way, then stop then go back down, etc.
Then, for the last 2 seconds, all the actuators retract again and the show is over.
Can you suggest how I could write an Arduino script to make that happen?
I'll make a cool YouTube video of the project and share it - and the credit - with everyone
You need to know the stall current of the actuator in order to choose a motor driver and power supply, and as typical, there is no useful information on the Amazon web site.
Apparently the actuators also lack limit switches, so they burn out if you try to drive them past the end stop.
In a perfect world, the max stroke of the linear actuator ("LI") would determine how far.
Say, for an LI with a max stroke of 2 inches. We could randomly choose 2 things. "Direction" and "Duration" tell the thing to go UP for 532ms. then at the end of the randomly chosen 532ms, there would be a 250ms Delay, then another randomly chosen Direction and Duration. IF the randomly chosen D&D would result in the LI being all the way up or all the way down, that'd be fine because we can use an LI that's protected from burning itself out.
Does that seem feasible?
The hardware issues are easy to solve by getting the right hardware.
For me, the problem is that my coding skills are elementary at best
Not easier. Look for the ones @lastchancename mentioned that have a servo controller build in, so you can control them with a standard 50 Hz 1-2 ms pulse straight outta the servo library.
You can get servo expander boards to handle many servos, be they real servos, continuous rotation servos or linear actuators what have a servo controller option.