Dear professionals,
I am currently working on a project which requires me to control the direction and length of the linear actuator's extension and I have basic knowledge on H-Bridge drivers like L298N and SN754410. Therefore i would like to stick to either of these chips. I'm currently testing out using the SN754410 chip to extend the actuator, however, its not working out. I have no idea how to feed a 24v supply to the actuator through the arduino as the maximum voltage recommended is 20V. Any suggestions of other alternatives are welcomed.
my current program is
const int switchPin = 2; // switch input
const int motor1Pin = 3; // H-bridge leg 1 (pin 2, 1A)
const int motor2Pin = 4; // H-bridge leg 2 (pin 7, 2A)
const int enablePin = 9; // H-bridge enable pin
void setup() {
// set the switch as an input:
pinMode(switchPin, INPUT);
// set all the other pins you're using as outputs:
pinMode(motor1Pin, OUTPUT);
pinMode(motor2Pin, OUTPUT);
pinMode(enablePin, OUTPUT);
// set enablePin high so that motor can turn on:
digitalWrite(enablePin, HIGH);
}
void loop() {
// if the switch is high, motor will turn on one direction:
if (digitalRead(switchPin) == HIGH) {
digitalWrite(motor1Pin, LOW); // set leg 1 of the H-bridge low
digitalWrite(motor2Pin, HIGH); // set leg 2 of the H-bridge high
}
// if the switch is low, motor will turn in the other direction:
else {
digitalWrite(motor1Pin, HIGH); // set leg 1 of the H-bridge high
digitalWrite(motor2Pin, LOW); // set leg 2 of the H-bridge low
}
}
Some details of the materials i have:
1.Linear Actuator : Linak (LA-30) 24V
2.Arduino Uno
3.24V batteries
4.L298N
5.SN754410