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);
}
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);
}
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.
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