When the jumpers are attached to the enable pins the motors move at full speed forwards and backwards, which suggests to me that there isn't a fault with the driver. In theory I think it should make the bigtrak move forwards for two seconds ad backwards for two seconds at half speed, but when I connect the motor enable pins to the PWM signals the motors don't move. Here is the code I'm using: int B1Out = 4 I would like to be able to use PWM to control the speeds of the two motors. Even when I connect it to the Arduino's 5V pin it doesn't move. However, when I replace the jumber with a connection to an Arduino PWM pin the motor does not move, no matter what duty cycle I use. When I attach the motor enable jumpers the motors run normally, and the robot moves forward. I'm using a 5v power bank to power the Arduino Mega and the motors from different USB ports. I've been trying to use the L298N dual H-bridge motor driver board like this one to drive the two motors on a bigtrak. L298N pinout The board has a premounted 5V. An L298N (motor driver) consists of four output pins, four input pins, three power pins and two pairs of enabling pins as shown in the below figure. I'm new to Arduino and motor control so I apologise if I've made a silly mistake. A motor driver is an electronic component that uses the principle of H-bridge to control the output voltage and the direction of rotation of the motor.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |