Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
B-Robot DRV8825 Problem
12-09-2015, 10:49 PM
Post: #1
B-Robot DRV8825 Problem
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
Find all posts by this user
Quote this message in a reply
12-10-2015, 06:31 AM
Post: #2
RE: B-Robot DRV8825 Problem
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.
Find all posts by this user
Quote this message in a reply
12-10-2015, 11:50 AM
Post: #3
RE: B-Robot DRV8825 Problem
(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.
Find all posts by this user
Quote this message in a reply
12-10-2015, 11:51 AM
Post: #4
RE: B-Robot DRV8825 Problem
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
Find all posts by this user
Quote this message in a reply
12-10-2015, 06:45 PM (This post was last modified: 12-10-2015 07:14 PM by sasa999.)
Post: #5
RE: B-Robot DRV8825 Problem
#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!
Find all posts by this user
Quote this message in a reply
12-10-2015, 08:33 PM
Post: #6
RE: B-Robot DRV8825 Problem
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.
Find all posts by this user
Quote this message in a reply
12-10-2015, 10:45 PM
Post: #7
RE: B-Robot DRV8825 Problem
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
Find all posts by this user
Quote this message in a reply
12-11-2015, 04:17 AM (This post was last modified: 12-11-2015 04:29 AM by KomX.)
Post: #8
RE: B-Robot DRV8825 Problem
(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. Напряжение питания моторов и то напряжение, которое я прошу Вас рассчитать - это совершенно разные напряжения!
Find all posts by this user
Quote this message in a reply
12-11-2015, 10:32 AM
Post: #9
RE: B-Robot DRV8825 Problem
What voltage battery do you use?
Find all posts by this user
Quote this message in a reply
12-11-2015, 01:45 PM (This post was last modified: 12-11-2015 01:45 PM by weekeda.)
Post: #10
RE: B-Robot DRV8825 Problem
(12-11-2015 10:32 AM)sasa999 Wrote:  What voltage battery do you use?

3S Turnigy LI-PO 1000mAh battery => 11,1V
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)