Xy160d motor driver

Hi! I have a problem with xy160d motor driver, because the driver can't communicate with the arduino Uno.I don't get any error or something,simple when I plug my power supply the, motor is not running. I need this driver to run a wiper motor.What can be the problem?Here is the code what I want to use, thanks for the help:D

int IN1pin = 9;
int IN2pin = 8;
int ENApin = 7;
void setup() {
  // put your setup code here, to run once:
  pinMode (IN1pin, OUTPUT);
  pinMode (IN2pin, OUTPUT);
  pinMode (ENApin, OUTPUT);

}

void loop() {
  // put your main code here, to run repeatedly:
  digitalWrite(IN1pin, HIGH);
  digitalWrite(IN2pin, LOW);

  analogWrite(ENApin, 255);

}

pin 7 on Uno doesn't have pwm as far as I know

Yes, thanks I checked, and you have right! I swap the pins and uploaded again the code, but nothing happens :confused: any solution?

illustrate your wiring and the change in code

int IN1pin = 8;
int IN2pin = 7;
int ENApin = 9;
void setup() {
  // put your setup code here, to run once:
  pinMode (IN1pin, OUTPUT);
  pinMode (IN2pin, OUTPUT);
  pinMode (ENApin, OUTPUT);

}

void loop() {
  // put your main code here, to run repeatedly:
  digitalWrite(IN1pin, HIGH);
  digitalWrite(IN2pin, LOW);

  analogWrite(ENApin, 127);

}


C'mon, I still don't know your wiring.
Voltage to driver?
GND connection between arduino and driver?
Motor specs, volts/amps?

Are both indicator leds on driver on?
On the photo power led in off.
Black wire from psu to driver is positive?

from the psu I swap the wires, and (so + yellow is and - is black wires) but also nothing happens, I don't know why is the second indicator led is off, it can be a broken driver? the PSU is 12V 10Ah, and yes I have GND between arduino and driver.

ok
You are not very clear.
So from psu you have yellow +12V and black GND, right? (Not -12V)
+12V should go to driver pin where in your photo you had black wire.

I am little bit confused with it, because it is my first time with this module:/, the yellow is +12V but the black is -12V, from PSU

So it's 24V? Should be written on the label!
Do you have datasheet or something to understand?
If not, just a photo of labelings.

I will take a photo for you, about PSU, how to connect PGND to the driver?

The model of the PSU S-120-12 , sorry for just stealing your time with my problem😅

Ok, there are hundreds of different psus named like that.. Anyway, it's 12v 10a supply.
Is it working? Does it have led on?
Did you correct the polarity to driver?
Psu V+ to driver where you had black on your photo?

yes it is working, it have led, and working well, I change the polarity so +12V(the yellow) is on right place and the black wire it is connected to the -12V (PSU) and the black wire it is connected to the Driver PGND

And the power led on driver is now on?

no:(

it is the same

Not good.... I think you damaged the driver.

If you have multimeter, verify you get 12v on driver input.

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