- FORWARD AND REVERSE MOTOR CONTROL ARDUINO DRIVER
- FORWARD AND REVERSE MOTOR CONTROL ARDUINO FULL
- FORWARD AND REVERSE MOTOR CONTROL ARDUINO CODE
- FORWARD AND REVERSE MOTOR CONTROL ARDUINO PLUS
If the object is a certain distance away, Arduino can be programmed to either extend or retract based on your needs.
FORWARD AND REVERSE MOTOR CONTROL ARDUINO CODE
An equation within the code can determine how far away an object is. When the receiver detects the ping, it sends a pulse to the Arduino. That ultrasonic ping is then reflected off an object and detected by the receiver. The ultrasonic sensor transmits an ultrasonic ping that is triggered by one of the pins on the Arduino. Ensure you have selected the right board and COM port in the IDE. Another command from the Arduino can switch the H-bridge and reverse the movement of the linear actuator.Ĭonnect the Arduino via USB to a laptop/desktop computer and upload the linear actuator Arduino code below using the Arduino IDE. The MegaMoto receives commands from the Arduino to trigger the H-bridge circuit and provide power to the linear actuator. For high current (10A+) applications, it is recommended to keep the jumper connected to prevent too much current from going through the sensors, extending their lives. The one jumper (vertical), connecting A2/A3 is used to link the current sensors of both halves of the H bridge together. MegaMoto to Power SupplyĪctuator (6-Pin Connector) to Arduino/MegaMoto
Simply line up the pins of the MegaMoto with the pins of the Arduino. This does not require any additional wiring. If you decide to not use the ultrasonic sensor, you will need to adjust the linear actuator Arduino code for this project. An optional step is to add an ultrasonic sensor to trigger the forward and backward movement of the linear actuator. The wiring for controlling linear actuators with Arduino is quite simple and can be broken down into three main parts, namely, connecting the MegaMoto to the Arduino, the MegaMoto to the power supply, and the MegaMoto to the linear actuator.
FORWARD AND REVERSE MOTOR CONTROL ARDUINO DRIVER
FORWARD AND REVERSE MOTOR CONTROL ARDUINO FULL
Either model will do but, depending on your application, ensure the linear actuator you choose does not have a current at full load that exceeds the maximum current of the MegaMoto. The MegaMoto GT, with the added fan and heatsinks, can take an input voltage of 6-35V and can output 35A of current with 50A spikes.
FORWARD AND REVERSE MOTOR CONTROL ARDUINO PLUS
The MegaMoto Plus takes an input voltage from 5-28V and can output 20A of current with 40A spikes. If you are going to stack the shields, we would suggest you use the Plus model since the GT model’s fan does not allow for easy stacking. This shield feature also means you can stack 3 of the Plus models on top of one another to provide bi-directional control of 3 linear actuators or uni-directional control of 6 linear actuators. You need to be far more clear in what you expect it to do and what it actually does.The MegaMoto is a shield, meaning you can attach it directly on top of an Arduino without needing to solder additional wires. 'It does not work' does not mean anything. put your main code here, to run repeatedly: PinMode (4, INPUT_PULLUP) // for stop push button
PinMode (3, INPUT_PULLUP) // for reverse push button PinMode (2, INPUT_PULLUP) // for forward push button PinMode (12, OUTPUT) // for reverse contactor shield PinMode (13, OUTPUT) // for forward contactor shield put your setup code here, to run once: