Question about the output voltage of the LMD18200T

Below is a picture of a 12V barrel jack converter supplying 12V to the LMD18200T and connecting the GND, PWM, DIR and BRAKE pins to pins GND, 9, 5, and 6 of the Arduino nano, respectively. Arduino nano is receiving power from the USB terminal of the laptop.

IMG_0189
And the code below is a simple Arduino code for testing LMD18200T. I thought through this code that the potential difference between OUT1 and OUT2 would be equal to 12V multiplied by the supply voltage of 12V (255/255), but actually, the voltage between the two terminals was measured to be approximately 0.82V. According to the uploaded Arduino code, the maximum value of 255 was delivered to PWM, DIR delivered HIGH and BRAKE delivered LOW signals, which was expected to be similar to the voltage supplied by the motor driver, but a much lower value was output. How do I make a value equivalent to 12V output?

// Pin Definitions
const int pwmPin = 9; // PWM pin (connected to LMD18200T pin 9)
const int dirPin = 5; // Direction pin (connected to LMD18200T pin 5)
const int brakePin = 6; // Brake pin (connected to LMD18200T pin 6)

// Motor Control Parameters
const int speed = 0; // Motor speed (0-255)

void setup() {
// Initialize the motor control pins as outputs
pinMode(pwmPin, OUTPUT);
pinMode(dirPin, OUTPUT);
pinMode(brakePin, OUTPUT);
}

void loop() {
// Set the motor direction
digitalWrite(brakePin, LOW); // Apply brake by setting the brake pin HIGH

digitalWrite(dirPin, HIGH); // Set HIGH for one direction, LOW for the other

// Apply PWM to control the motor speed
//analogWrite(pwmPin, 0); // Set HIGH for one direction, LOW for the other
analogWrite(pwmPin, 127); // Set HIGH for one direction, LOW for the other

// Wait for a few seconds

// Brake the motor
// Wait for a few seconds
delay(5000);
}

Use an N channel logic level MOSFET and a suitable resistor to +12.

The signal at those pins will be a 590Hz PWM signal.
If you are using a DMM set to DC, the readings will most likely be wrong.
You need a scope

Do you have a load connected to the output?

There are no loads connected to both OUT1 and OUT2. You mean that I shuld use not Multimeter but oscilloscope for measuring right?

In your code you have analogWrite(pwmPin, 127). That will generate a 590Hz squae wave, not DC.
You should also have a load connected, at least a 1K resistor

After switching to analogWrite (pwmPin,255), connecting a 4.5K resistor to OUT1, and measuring the voltage at the resistance end and the OUT2 terminal resulted in 1.1V. Similar values were found when digitalWrite (pwmPin, HIGH) was used. I need at least 12V for the motor to run, can't I get it?

That module will NOT work at 100% duty cycle.
I think 0% to 95% is the range

1 Like

But even 95% cannot be reached

Are you using a scope?

Unfortunately, i dont have oscilloscope.

Just so you can test the outputs with a DMM, use tone() instead of analog write.
tone(9, 60);

You should see about 6V between one of the outputs and ground and zero between the other output and ground.

Your advice is correct

So now you know it works!

volatage between OUT1 and OUT2 has risen up to 3.1V

Switch to AC input, you should see about 8V

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.