How to Use the JGA25-370 Onboard Motor Driver 

Introduction

Our JGA25-370 Onboard Motor Driver is an easy to use motor driver board that attaches to the back of almost any JGA25-370 motor/gearmotor. It works for any motors that run at 4.5V to 48V, and has a max current rating of 3.7A. Just solder the output terminals to your motor and you are ready to go!

Layout

The motor driver has two output terminals which solder to the motor terminals on the back of any JGA25-370 style motor. Those output terminals can also be soldered to wires which can be connected to any brushed DC motor that is within the driver’s ratings. There are 4 male headers sticking out the side of the board, which connect to power, ground, input 2, and input 1. There is also an indicator LED for input 1 and another indicator LED for input 2. As well as an “LEDs” jumper that can be cut to disable those LEDs.

Features

The motor driver chip on this board is the DRV8251, which is an H-Bridge Brushed DC Motor Driver. It can support 1.8V, 3.3V, and 5V logic levels, and has a supply voltage range of 4.5V – 48V. It has a peak current of 3.7A, and a continuous current of about 2.2A. More features include:

  • PWM control
  • 450mΩ RDS(on)
  • Overcurrent protection
  • Thermal shutdown
  • Undervoltage lockout

Usage

This motor driver is very easy to control with any development board like an Arduino UNO, or our Tineato 3226. Start by soldering the output terminals to the terminals on your motor. The driver board should be pushed all the way onto the back of the motor and then soldered on. You can also use wires to connect the output terminals to different sizes of motors (22AWG or 20AWG works fine).

Then connect your power (4.5V – 48V) to the + pin, your ground to the - pin, and two I/O pins from your development board to IN1 and IN2. Also make sure your development board has a common ground with the motor driver, or in other words, make sure the ground of your development board is connected to the same ground of the motor driver.

A high signal on IN1 (1.5V – 5.5V) and a low signal on IN2 (0V) will make the motor spin one way, and the opposite will make the motor spin the other way. A PWM signal on one of the inputs will change how fast the motor spins.

Below is an example using our Tineato 3226 development board. Remember that any development board can be used. We are connecting our GND pin from our Tineato to the - pin on our driver, the VCC pin to the + pin, pin 0 to IN1, and pin 1 to IN2. Pins 0 and 1 on our Tineato are PWM pins so we will be able to control the motor’s speed. In the code below we turn the motor at full speed one direction, then let the motor come to a stop, then turn it about half the speed the other direction.

int IN1 = 0;
int IN2 = 1;

void setup() {
  pinMode(IN1, OUTPUT);
  pinMode(IN2, OUTPUT);
}

void loop() {
  //turn motor one direction at full speed
  digitalWrite(IN2, LOW);
  digitalWrite(IN1, HIGH);
  delay(2000);

  //stop the motor
  digitalWrite(IN2, LOW);
  digitalWrite(IN1, LOW);
  delay(500);
  
  //turn motor the other direction about half the speed
  analogWrite(IN2, 100);
  digitalWrite(IN1, LOW);
  delay(2000);

    //stop the motor
  digitalWrite(IN2, LOW);
  digitalWrite(IN1, LOW);
  delay(500);
}

Resources


More Tutorials

Comments

Leave a Reply