Using a BLDC 8015a for the mowing motor

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
 
Hi cguenther

The TVS diode i used is the same as suggested by Bernds for the official drivers : ref 1-5KE33CA from ST Micro.
With it installed i can see that the voltage does not exceed 33V.

Stephane
 
Hi all,

Today i had the chance to test the 8015a driver in real world for about 30minutes. After that i had to stop beacause of the rain...

The driver worked very well with the modified code.
I made a lot a start-stop and all went fine.

The only litlle issue i had was the full speed of the motor.
With the 4.7k resistor (as explained in the first post), the full speed is reached at about PWM 200.
With the 10k resistor i used for the tests the full speed is never reached beacause the rover show only 0.8A.

So i will have to find the good resistor value.

The idea to do that is to set the PWM to full speed and then replace the pull up resistor with a 4.7k in serie with a 4.7k trimmer.
With these value i'am sure to be in the working window.
Then, i will slowly increase the trimmer value and i will stop when the current will be at max.
With that i will have the value of the resistor.

I will let you know.

If this work, maybe it could be interresting to add the code to the 'offical' code and to add some variable in the config.h?
I will do a clean version of that of course.

Stephane.
 
Hi Stephane, thanks for your infos concerning the use of the BLDC-8015A. I intend to use this Driver for my Mow-Motor AND Drive-Motors as well. I had only one Driver (was planned for the Mow-Motor already) on my desk for Testing-Purpose and it did drive (well, thats the intended use for the Driver) the ACT-Motor well.

However, using the On-Driver Poti for RPM-Selection i had the same feeling, that Full-Speed is already reached very early relative to the rotation possible with the On-Driver Poti.
I hooked up my Husqvarna-Drive-Motor on the 8015A - just for fun - and it drives the motors somewhat "better" as my Self-Programmed DIY-Drivers. (Thats still to be tested in real environmental conditions) - but especially in the Low-RPM-Area the Motor had much more Torque.

Concerning your findings to "match" the PWM-Value 100%/255 to "Full-RPM" of the Driver - one question. To my understanding PWM - Pulse-Width-Modulation is a kind of Square-Shaped Signal altering between 0 and Vref, and the Length of the 0V-Signal in relation to the Signalduration at Vref is the Pulsewidth. This might be on 1Hz or 1.5kHz, but it is the Relation of the Durations between 0V and Vref - or lets say, between 0 and 1.

If you are going to change some resistor-values - i think you are going to change Vref, what (to my understanding, correct me) has nothing to do with the PWM itself but only its Vref/High-Value. Shouldn't this match between: PCB sends PWM 100% -> Driver/Motor does 100% RPM not better be done in software? So, if the Motor spins at 100% at a PWM-Value of 50% - this 50 is your new 100% inside the Firmware what would need a kind of divider/multiplier in the adaption of this 8015A-Driver to the Software.

?
 
The speed is given by the duty cycle of the PWM.
The frequency is not too important, but according to the datasheet of the driver it should be around 1Khz.
I am suprised that the driver works with the 26kHz of the rover.

BUT what may help is that the driver can also be driven by a voltage control between 0 and 5V.
There is no jumper to choose between these 2 solutions.
I don't know how the driver is working inside.

I made a simple test :
A loop that increase by 10 the value of the PWM and let it for 5sec and then continue.
With this test and the 4.7k i can confirm that there is no more accelaration after the value 200.
With the 10k i can heard the acceleration until the value 250, this does not means that a at this moment i have the full speed.

I think that with a value between 4.7k and 10k i can find the 'good' value.


Maybe the pull up trick works because the driver can use either a voltage input or a pwm input on the same pin.

I will connect a scope to see the signal.

My fisrt idea was to use a chip to convert the pwm generated by the rover to a voltage that could be use by the driver.
A LTC2644 could do the job and can work with frequency up to 100kHz and 5V power supply.
As it seams to work like that, maybe this won't be necessary but it is a tricky hack...
The mowing motor does not need a very good speed regulation so I may keep it like that.

If you are planning to use 3 drivers, maybe the better solution will be to change the PWM frequency in the rover because your 3 drivers will use the same frequency?
As i am still using the official driver for the drive motor, i must keep the 26kHZ frequency.

Of course, as you suggested, the max value could be done in software too. This is also a good idea.



Stephane.
 
Hi.
Einfacher ist noch Tim´s Lösung. Da kann man die Hartware so lassen und den Treiber direkt am BLC Adapter anschließen.
Noch die Änderungen in der Software und der Mähmotor läuft ohne Probleme.
Meiner Jetzt seit fast 40 Mähstunden ohne Probleme.
 
Thank you for the link

But the drivers used are not the 8015a, and the connexions are a little different.
I saw that Tim had to modifiy the code too, to have the driver to stop.
 
BUT what may help is that the driver can also be driven by a voltage control between 0 and 5V.
Ok, got it. Just referred to the specs an it says, that it can accept PWM ideally on 1kHz-Duty-Cycle-Basis OR analog-input 0-5V. Didn't notice that - now your voltage-divider makes sense - however, i'd still try to have the 5V corresponding to 100% on the driver and making the match itself in the software.

Stephane, could you give me a hint, in which module the 26kHz are generated within the Ardumower-Firmware? ...ok, disregard, pinman.cpp.... will have a closer look.
 
Zuletzt bearbeitet:
Hi all,

The driver is still running fine.

I put a 4.7k trimmer in serie with the 4.7k resistor in the PWM line so that i can find the optimal value.

I tried to tests to find the optimal value

1. I send a 255 value in the PWM, the driver is connected to a lab power supply and i check the current.
I increas tjhe trimmer value until the current is at it max.
It is working, but, the mesasure is not very accurate

2. i made a little code that incread the PWM of 10 after a second in a loop.
At each step you c an heard the speed of the motor increasing.
The goal is to find the correct value of the trimmer to listen a last speed increasing when the PWM reach 255.

I found the second test was better and i could find the optimal value.

I didn't mesured it but if someone is interrested i can do that.

Stephane.
 
Please apologise my maybe stupid question: ow do you change PWN at the mow-motor? I'm using sunray, and I only know a button "mow on/off". How to deal with this?

Best regards,
Juergen
 
Dear Stephane,

good idea to use the AT+E command and a modified code to test driver/motor. I will do so.
Yesterday my 8015a arrived. I have a question related to the connection: I am using BL-adapter 1.1 Pin-out is: EN, DIR, ODO, BRK, Fault, PWM, GND.

While 8015A input is: GND, ALM, SPEED, AVI, BRK, ENBL, F/R. What to connect with what? As you already did, maybe you can help?

Will a PWM pullup also be necessary for adapter1.1?

And you use TVS also at DC+ / DC-, correct?

Best regards,
Juergen
 
Hi Juergen

I think the adapter board 1.1 will work, but maybe qyou will have to change the pull-up value on the pwm line.
A value between 4.7k and 10k should be Ok. I will give you the value I have found on my driver when i had time to measure it!


Connections :
In this (your) thread you have a picture of the board with the name og the signa(from NormanB).
GND : no pb
BRK on the 8015A : BRK on the driver board.
ALM on the 8015A : Fault on the driver board.
SPEED on the 8015A : ODO on the driver board.
AVI on the 8015A : PWM on the driver board.
ENBL on the 8015A : EN on the driver board.
F/R on the 8015A : DIR on the driver board.

And of course a TVS diode on the power line DC+ DC-

I hope the will help
 
Hi Stephane_bzh,

2 more questions from a non electronic expert:

1. What does "no pb" mean?
2. Can you upload a little scheme of how to solder the diode (just to be sure not tzo make any mistakes)?

Thanks a lot!
 
Hi gubtibubti

No pb means no problem. You connect to gnd.

The diode is connected between the dc+ and dc-, you can solder the legs of the diode directly to the power wires that are connected to dc+ ans dc-.

I Will upload a little schemd to be clear.

Stéphane
 
Dear Stepane,
winter is over and I want to restart my Ardumower project. I stopped last year in using my 8015A for the first time. Here I want to start again, now.
Do you have a code snipped to use AT+E to test the mower motor with the 8015A driver?

Thanks beforehand and best regards,
Juergen
 
Oben