JJRobots COMMUNITY

Full Version: B-Robot DRV8825 Problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi,

I want to built a really stable version of the b-robot.
So I bought 0.9 degree steppers and want to get 1/32 steps....

But now I have a problem with my B-Robot and the drv8825 motor drivers.
I tried different drv8825 motor drivers but only one is working. The other drivers are spinning too slow it feels like one motor has double speed.
I can also switch the drv8825 from left to right and left or right motor is spinning way faster than the other side. Also I have trimmed the motor drivers and both are at 0.5 Volt. I have also already twist and shield nearly all cables to avoid interferences.

My setup consist of:

- 2 Wantai Motors (Nema17, 1.7A, 4200g.cm,0.9°,42BYGHM809)
- B-Robot ESP8266 Shield
- DRV8825 motor drivers
- Turnigy LI-PO 1000mAh battery (20-30c discharge)

So has somebody get the B-Robot working with DRV8825?
Is it also possible to get 1/32 steps not only 1/8 or 1/16??

Hope to solve my problem quick. Thank you in advance for your help.
Weekeda
Questions:
1. a sketch used?
2. put you right mode driver?

Possible problems:
- The timing of the control pulses for the DRV8825 different from the sketch embedded in the program;
- Exceeds the maximum frequency of the control pulses.
(12-09-2015 10:49 PM)weekeda Wrote: [ -> ]Hi,

I want to built a really stable version of the b-robot.
So I bought 0.9 degree steppers and want to get 1/32 steps.
0.9 degrees and 1/32 steps will not give you more stability.
You need 4x higher frequency to Step pin for 1/32 and 0.9deg.
Hi KomX,

thank you for that fast answer.

1. I use the newest sketch from https://github.com/jjrobots/B-ROBOT/tree/master/BROBOT
2. I have not changed the sketch yet

Is there a sketch for the DRV8825?
What part of the sketch I have to change?

Thank you in advance
Weekeda
#define MICROSTEPPING 32 // 32 or 16 for 1/32+0.9deg or 1/16 + 1.8 deg.

#if MICROSTEPPING==16
speed = speed_M1 * 46; // Adjust factor from control output speed to real motor speed in steps/second
#else
speed = speed_M1 * 46*4; // 1/32+0.9deg Microstepping
#endif

#if MICROSTEPPING==16
speed = speed_M2 * 46; // Adjust factor from control output speed to real motor speed in steps/second
#else
speed = speed_M2 * 46 * 4; // 1/32 + 0.9deg. microstepping
#endif

BUT... chech if there not any limits! One of them is MAX_CONTROL_OUTPUT. There is limit to 500, but 500x46*4=92000 .. Sad Try limit to 355!
int16_t speed is only 16bit 65535 Sad

I think there you need much more changes if you want your robot run smooth and quick. Sampler way can be 1/32+1.8deg motors or 1.16+0.9degr. motors. They fits easy in 16bit
BUT nothing is impossible!
weekeda
To determine the maximum speed of the stepper motor by using a calculator.
Calculator will calculate you the minimum time interval (Minium Time/Step) between two pulses "step".
On changes in the sketch is fully explained everything sasa999.
Nice thank you both for that quick reply!

First I will try now to get the robot working with both motor drivers and microstepping=16.
But when I look at the changes I do not understand why the robot is not working.
I use microstepping=16 and the same code as posted from sasa999:

#if MICROSTEPPING==16
speed = speed_M2 * 46; // Adjust factor from control output speed to real motor speed in steps/second
#else

So its 500*46=23000 and the limit should be okay?
I also tested the calculator to determine the maximum speed but I'm not sure:

Imax=1.7(A)
L=4.0(mH)
Voltage=0.6(V) => I have trimmed the motor drivers to 0.5Volt or should I enter the 2.8V from the Technical Specifications of the motor?
Steps/Revolution=400 => Or should I enter 6400 (400degrees*16microstepping)?

Minium Time/Step 27.2(miliseconds)

How can I use this value now to adjust the factor in this line?:
speed = speed_M1 * 46; // Adjust factor from control output speed to real motor speed in steps/second
(12-10-2015 10:45 PM)weekeda Wrote: [ -> ]Voltage=0.6(V) => I have trimmed the motor drivers to 0.5Volt or should I enter the 2.8V from the Technical Specifications of the motor?
Наверняка, Вы поймёте русский язык...
Вот документация на DRV8825.
1. Напряжение питания моторов - Voltage - для нормальной работы драйвера должно быть больше 8.2 вольт!!!
2. На странице 12 документации есть формула расчёта максимально допустимого тока через обмотку двигателя. Воспользуйтесь ею и выставьте потенциометром на каждой плате требуемое напряжение VREF!
3. Напряжение питания моторов и то напряжение, которое я прошу Вас рассчитать - это совершенно разные напряжения!
What voltage battery do you use?
(12-11-2015 10:32 AM)sasa999 Wrote: [ -> ]What voltage battery do you use?

3S Turnigy LI-PO 1000mAh battery => 11,1V
Pages: 1 2
Reference URL's