New to Arduino so please bear with me.
Let me explain the setup . I am developing a setup which uses linear actuators. The Arduino is connected to a motor driver and it sends a pulse of some duration to a motor driver (IBT_2 PCB, containing[ BTS 7960]). The motor driver then tells the linear actuator to move forward or reverse depending on the input from arduino. The battery I am using is the Build Power 4500mAh Li-Po 11.1V 4500mAh 30C battery.
I obtained a basic actuator LYX LX 600, 200mm, 300N, 100mm/s, unable to find any datasheet for the same) to test. A simple reversing test was used in which the actuators would first extend for some time and then retract for the same time (code attached below). With the actuators, I found some anomalies. Sometimes the actuator would not come back to the same position as the starting position. Also, a difference in lengths extended by the actuator was observed when turning it on for 1 step of 500 milliseconds and 5 steps of 100 milliseconds.
I had concerns as to what was causing the problem. Whether taking a better actuator would solve the problems or I would face the same issues due to some other part of the hardware.
A rough hand-drawn schematic of the setup and the Arduino code being used are attached.
It would be great if any mistakes made could be pointed out and whether the problem is with some of the hardware.
int fwd=11;
int rev=10;
int ren=6;
int len=5;
int tim=3000;
void setup() {
// put your setup code here, to run once:
pinMode(fwd,OUTPUT);
pinMode(rev,OUTPUT);
pinMode(ren,OUTPUT);pinMode(len,OUTPUT);
digitalWrite(ren,HIGH); digitalWrite(len,HIGH);
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(fwd,HIGH);
digitalWrite(rev,LOW);
delay(tim);
digitalWrite(fwd,LOW);
digitalWrite(rev,LOW);
delay(750);
digitalWrite(fwd,LOW);
digitalWrite(rev,HIGH);
delay(tim);
digitalWrite(fwd,LOW);
digitalWrite(rev,LOW);
delay(750);
}
