Stephane_bzh
Member
Hi all,
For informations :
Today i received the BLDC 8015a driver.
Good news, i can have it work on the rover on the bench.
I can control it with PWM. (I modify the AT+E command to test it)
Tomorrow i will test it in real world
Here is what i've done to get it working :
For the hardware :
I have a adaptor board 1.0.
I put the pull up resistors modifications only for the mowing motor.
On the PWM line, I used a pull up of 10k instead of 1k because with the value of 1k when i set the pwm to about 127 the mowing is at it max rotation. With a 4.7k it is at 200, and with 10k it seams to be ok but the value may change in the futur.
Don't forget to add a TVS diode on the power line between + en - because without it the voltage when the enable pin is 0 jump over 80V!
I just connected the 8 PIN flat cable from the adaptor board to the BLDC 8015a driver "directly".
Not to difficult.
The jumpers on the BLDC 8015 are
JP1 : on
JP2 : off
For the software:
The main code changes are in the /src/driver/AmRobotDriver.cpp
change
digitalWrite(pinMotorMowEnable, enableActive);
to
digitalWrite(pinMotorMowEnable, !enableActive);
and comment the two lines :
if (speed < 0) {
digitalWrite(pinDir, HIGH) ;
// if (speed >= -2) speed = -2;
pinMan.analogWrite(pinPWM, ((byte)abs(speed)));
} else {
digitalWrite(pinDir, LOW) ;
// if (speed >= -2) speed = -2;
pinMan.analogWrite(pinPWM, ((byte)abs(speed)));
}
If you don't do that the mowing motor will turn slowly when the rover is in stop position.
In theory you should change too
if (digitalRead(pinMotorMowFault) == faultActive) {
digitalWrite(pinMotorMowEnable, !enableActive);
digitalWrite(pinMotorMowEnable, enableActive);
}
to
if (digitalRead(pinMotorMowFault) == faultActive) {
digitalWrite(pinMotorMowEnable, enableActive);
digitalWrite(pinMotorMowEnable, !enableActive);
}
I will come back to you tomorrow if the weather is fine enough to test...
Stephane
For informations :
Today i received the BLDC 8015a driver.
Good news, i can have it work on the rover on the bench.
I can control it with PWM. (I modify the AT+E command to test it)
Tomorrow i will test it in real world
Here is what i've done to get it working :
For the hardware :
I have a adaptor board 1.0.
I put the pull up resistors modifications only for the mowing motor.
On the PWM line, I used a pull up of 10k instead of 1k because with the value of 1k when i set the pwm to about 127 the mowing is at it max rotation. With a 4.7k it is at 200, and with 10k it seams to be ok but the value may change in the futur.
Don't forget to add a TVS diode on the power line between + en - because without it the voltage when the enable pin is 0 jump over 80V!
I just connected the 8 PIN flat cable from the adaptor board to the BLDC 8015a driver "directly".
Not to difficult.
The jumpers on the BLDC 8015 are
JP1 : on
JP2 : off
For the software:
The main code changes are in the /src/driver/AmRobotDriver.cpp
change
digitalWrite(pinMotorMowEnable, enableActive);
to
digitalWrite(pinMotorMowEnable, !enableActive);
and comment the two lines :
if (speed < 0) {
digitalWrite(pinDir, HIGH) ;
// if (speed >= -2) speed = -2;
pinMan.analogWrite(pinPWM, ((byte)abs(speed)));
} else {
digitalWrite(pinDir, LOW) ;
// if (speed >= -2) speed = -2;
pinMan.analogWrite(pinPWM, ((byte)abs(speed)));
}
If you don't do that the mowing motor will turn slowly when the rover is in stop position.
In theory you should change too
if (digitalRead(pinMotorMowFault) == faultActive) {
digitalWrite(pinMotorMowEnable, !enableActive);
digitalWrite(pinMotorMowEnable, enableActive);
}
to
if (digitalRead(pinMotorMowFault) == faultActive) {
digitalWrite(pinMotorMowEnable, enableActive);
digitalWrite(pinMotorMowEnable, !enableActive);
}
I will come back to you tomorrow if the weather is fine enough to test...
Stephane