Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
B-Robot does not work - Stepper motors whine
12-08-2019, 02:01 PM (This post was last modified: 12-10-2019 10:32 PM by maxmar.)
Post: #1
B-Robot does not work - Stepper motors whine
Hello there,

I am new to the forum and the world of micro controllers like Arduino and also the jjrobots kits. However, I do have some knowledge about electrical engineering.


I have purchased the B-Robot EVO 2 kit from jjrobots and assembled everything according to the official assembly guide video (see here: https://www.jjrobots.com/b-robot-evo-2-assembly-guide/) . In the video everything is fine, but I am very much disappointed, because my robot does not work and I do not find the error.


What does not work?
After the calibration, both NEMA17 stepper motors do not work properly. The wheels do not move after me manually helping the robot to stand up, just give some whining noise and the robot falls over again immediately.
I have tried to find more information in this forum and on the internet. Most of the time, the problem is either related to the power supply which does not provide enough voltage or current or related to the A4988 motor drivers which are not set correctly.

To overcome the first problem, I have tried the following:
  • six fresh batteries of type Energizer Industrial AA (alkaline), checked for expiry date, in serial providing 9.01V (measured with voltage meter)
  • an Elegoo AC/DC adapter (9V, 1A output rating) power supply from my Arduino board, providing 9.11V when plugged in (measured with voltage meter)
  • a 9V block battery of type Elegoo Super Heavy Duty 6F22, checked for expiry date, providing 9.06V (measured with voltage meter).
None of the three power supplies solves the problem. Does maybe the AC/DC adapter not have enough juice?

To overcome the second issue, I have tried to set the motor drivers output current correctly. Combining information from the internet and the labels on the motor drivers, I have the A4988 version with the two sensor resistors having 0.1 ohm (labeled "R100"). The motors are rated with 1.68A according to jjrobots' website. This gives a necessary voltage of Vref = 1.68A x 8 x 0.1 ohm = 1.344V (see https://e3d-online.dozuki.com/Guide/VREF...A4988/92). The voltage is measured from the integrated potentiometer to the ground pin. In order to find the right setting, I have tried to characterize the motor drivers and measured the voltage at the potentiometer while turning its rotor. The flat of the rotor is the reference for the following measured voltages:
  • 0V at 9 o'clock
  • 0.55 V at 12 o'clock
  • 1.1V at 4 o'clock
  • 2.2V at 6 o'clock
However, the value of 1.1V remains just before reaching 6 o'clock and then there is a direct jump to 2.2V. Hence, I cannot set any values between 1.1V and 2.2V. I tried with 2.2V and the motors are less whiny, but still do not move properly.
Is the motor driver maybe broken? Or am I mistaken with the sensor resistors or the calculation of the reference voltage?


What does work?
I believe the calibration of the DEVIA control board and the servo motor work properly. After a few seconds, the robot waves three times with his arm like in the assembly guide video to signal the completion of the calibration. Moreover, I can connect to the robot's wifi and can read the angle value provided by the board. When I hold the robot upright, the angle is 0°. I can also activate the servo through the app. But it is strange that there is no information about the battery status and when I turn the robot by 90° in my hand, the app shows an angle of about 500 to 600 (what's actually the unit of the values?).


I am running out of clues where the problem with the stepper motors could come from and would be very grateful about any hints. Maybe someone has had the same problem or has seen the same behavior of the motor drivers.

Best regards,
Max

P.S.: I have attached
- a picture of my motor driver, the orientation of the potentiometer screw above refers to the picture in which the flat is at 6 o'clock (giving about 2.2V)
- a screenshot of the jjrobots app with the angle value that is shown when the robot is tilted approximately by 90° in my hand


Attached File(s) Thumbnail(s)
       
Find all posts by this user
Quote this message in a reply
12-09-2019, 10:37 AM (This post was last modified: 12-09-2019 10:39 AM by JJrobots JP.)
Post: #2
RE: B-Robot does not work - Stepper motors whine
First, thanks for all the info provided. That makes everything easier to narrow down..
Lets do this to discard possible issues sources:
1) Upload again the Arduino code if you have not done that since you got the DEVIA. Code: https://www.jjrobots.com/b-robot-evo-2-a...uide-v1-2/ Direct link: https://www.jjrobots.com/wp-content/uplo..._23_M0.zip
2) Disconnect the "faulty" A4988 from the DEVIA and start the B-robot without it. It should be able to keep the balance even without one stepper motor driver (You will need to help it to stand up). If the B-robot does not fall we can blame a faulty A4988 driver.

NOTE: the angle provided on the control APP should be fine. Those 500 to 600 degrees values are strange. Could you please attach a screen capture of the app displaying that? Does the B-robot change the spinning direction of the motors if you hold it in the air with your hand and tilt it back and forward?
You can also activate the DEBUG mode in the Arduino code and check the angle via SERIAL PORT. More info here: https://www.jjrobots.com/b-robot-evo-2-a...uide-v1-2/ You need to set DEBUG==1 in order to get the ANGLE and re-upload the code to the DEVIA Board
Visit this user's website Find all posts by this user
Quote this message in a reply
12-09-2019, 08:54 PM
Post: #3
RE: B-Robot does not work - Stepper motors whine
Hello everybody,
I am also new to the forum and in the world of robots ;-)

Unfortunately, I have exactly the same problem as Max.
I have also assembled the robot as described in the video and again tested the wiring as in the picture.
>> https://www.jjrobots.com/wp-content/uplo...24x791.jpg <<

After switching on the robot, I can successfully connect to the robot via WLAN (and control the servo). But when I try to help the robot on its "legs," you only hear a loud whine. :-(

Greetings from Germany
Patrick

PS: A second flashing of the Arduino code did not change the behavior.
Find all posts by this user
Quote this message in a reply
12-09-2019, 10:30 PM
Post: #4
RE: B-Robot does not work - Stepper motors whine
(12-09-2019 08:54 PM)KnightBot Wrote:  Hello everybody,
I am also new to the forum and in the world of robots ;-)

Unfortunately, I have exactly the same problem as Max.
I have also assembled the robot as described in the video and again tested the wiring as in the picture.
>> https://www.jjrobots.com/wp-content/uplo...24x791.jpg <<

After switching on the robot, I can successfully connect to the robot via WLAN (and control the servo). But when I try to help the robot on its "legs," you only hear a loud whine. :-(

Greetings from Germany
Patrick

PS: A second flashing of the Arduino code did not change the behavior.

Hi Max,
Have you adjusted the A4988 stepper motor drivers? Does the B-robot keeps its balance if you help it to stand up with your hand? Which batteries are you using? Alkanile?
Visit this user's website Find all posts by this user
Quote this message in a reply
12-10-2019, 11:11 AM
Post: #5
RE: B-Robot does not work - Stepper motors whine
Hello. I´m facing the same problem. After connecting to power, the robot starts with moving the servo and steppers. After that, the steppers accelerate till they are missing steps, stop and begin to whine with a frequency about 1kHz.I do not have the original nema 17 steppers but the one I have are working fine on an other stepperdriver.Any hints for me?
Find all posts by this user
Quote this message in a reply
12-10-2019, 02:06 PM
Post: #6
RE: B-Robot does not work - Stepper motors whine
(12-10-2019 11:11 AM)lawman Wrote:  Hello. I´m facing the same problem. After connecting to power, the robot starts with moving the servo and steppers. After that, the steppers accelerate till they are missing steps, stop and begin to whine with a frequency about 1kHz.I do not have the original nema 17 steppers but the one I have are working fine on an other stepperdriver.Any hints for me?
Have you tried the steps listed above? Are your motors 1.8º per step? Using A4988 drivers?
Visit this user's website Find all posts by this user
Quote this message in a reply
12-10-2019, 04:40 PM
Post: #7
RE: B-Robot does not work - Stepper motors whine
(12-10-2019 02:06 PM)JJrobots JP Wrote:  
(12-10-2019 11:11 AM)lawman Wrote:  Hello. I´m facing the same problem. After connecting to power, the robot starts with moving the servo and steppers. After that, the steppers accelerate till they are missing steps, stop and begin to whine with a frequency about 1kHz.I do not have the original nema 17 steppers but the one I have are working fine on an other stepperdriver.Any hints for me?
Have you tried the steps listed above? Are your motors 1.8º per step? Using A4988 drivers?
I tried another nema 17 stepper Motor with 1.8 degree I had in my basket and it works a little bit better. So now I ordered two new motors from your shop. I`ll keep you updated.
Find all posts by this user
Quote this message in a reply
12-10-2019, 07:36 PM
Post: #8
RE: B-Robot does not work - Stepper motors whine
(12-09-2019 10:30 PM)JJrobots JP Wrote:  
(12-09-2019 08:54 PM)KnightBot Wrote:  Hello everybody,
I am also new to the forum and in the world of robots ;-)

Unfortunately, I have exactly the same problem as Max.
I have also assembled the robot as described in the video and again tested the wiring as in the picture.
>> https://www.jjrobots.com/wp-content/uplo...24x791.jpg <<

After switching on the robot, I can successfully connect to the robot via WLAN (and control the servo). But when I try to help the robot on its "legs," you only hear a loud whine. :-(

Greetings from Germany
Patrick

PS: A second flashing of the Arduino code did not change the behavior.

Hi Max,
Have you adjusted the A4988 stepper motor drivers? Does the B-robot keeps its balance if you help it to stand up with your hand? Which batteries are you using? Alkanile?

Hello,

I started to do some tests.
At some point I had the robot running.

What have I done?

I changed the wires for the stepper motors on the controller board (M1 controls the left motor and M2 the right motor). Now the balancing and controlling of the robot works!

When I change the cables back (M1 controls the left motor and M2 the right motor) the robot does not manage to balance and the steppers whine loud again!

This behavior is reproducible at any time!!!

How is that possible???

best regards
Patrick
Find all posts by this user
Quote this message in a reply
12-10-2019, 10:04 PM (This post was last modified: 12-10-2019 10:24 PM by maxmar.)
Post: #9
RE: B-Robot does not work - Stepper motors whine
First of all, thanks to all of you for your answers to my thread! Really appreciated and happy to see the commitment of the community!

And big thanks to Patrick! His hint solved the problem for me.

I have interchanged the cables of the motors so that in my configuration, the M2 output is connected to the right motor (right being the side where the robot's arm is located) and the M1 output to the left motor. After switching on power, the calibration is done, completion signalled by waving with the arm three times, and then the robot even stands up on its on with a quick move.
If the cables are switched again, the motors just whine again and the robot is not able to balance at all. Similar to Patrick, this behavior is reproducible.


Nevertheless, I still observed some issues which I would like to report hoping to shed some more light on the issues:

1. The documentation of the wiring of the two stepper motors by jjrobots is inconsistent. If you look at the picture at https://www.jjrobots.com/.../Brobot-EVO-2-connecting-everything-1024x791.jpg and the picture in the assembly guide video at https://www.jjrobots.com/b-robot-evo-2-a...uide-v1-2/ at 1:46 min playtime, you might recognize that the wiring is different.
The first shows the cables oriented with the black wire at M1 towards the center of the board, the second with the blue wire at M1 towards the center of the board! For Patrick the second seems to work, for me the first works. How can that be? Which one is "more correct"?

2. Instead of interchanging the cables at M1 and M2, I have also tried to turn the cables by 180° and leave them at the same output. In this case, the robot also works. It completes the calibration and is also able to stand up by itself. However, both stepper motors sound much worse and generate a vibrating sound which is not there when the cables switch the output! Why?

3. I have checked both motor drivers by directly connecting it to an Arduino and one stepper motor. The wiring and code are done as shown at https://www.instructables.com/id/Drive-a...-a-A4988-/ (steps 1 to 4) with the USB cable at the Arduino as logic power supply and the 9V block battery as motor power supply.
Both motor drivers work properly and can drive both motors. When rotating the potentiometer on the motor drivers, the voltage there changes smoothly without any jump and can easily be adjusted to values between 1.1V and 2.2V. This is NOT the case, when the motor drivers are mounted on the Devia control board (when powered with any of the power supplies mentioned in my first post). Why not?


Looking forward to your thoughts!

All the best,
Max


P.S.: To answer some of the questions from JJrobots JP, I have update my initial post with some more details and structure. However, I have also tried to flash the code again to the Devia board, but this does not work. The compiler of the Arduino IDE finds a number of errors in the code. I have downloaded the files from the Github website at https://github.com/jjrobots/B-ROBOT_EVO2...ROBOT_EVO2
Find all posts by this user
Quote this message in a reply
12-11-2019, 03:03 PM (This post was last modified: 12-11-2019 03:15 PM by JJrobots JP.)
Post: #10
RE: B-Robot does not work - Stepper motors whine
(12-10-2019 10:04 PM)maxmar Wrote:  First of all, thanks to all of you for your answers to my thread! Really appreciated and happy to see the commitment of the community!

And big thanks to Patrick! His hint solved the problem for me.

I have interchanged the cables of the motors so that in my configuration, the M2 output is connected to the right motor (right being the side where the robot's arm is located) and the M1 output to the left motor. After switching on power, the calibration is done, completion signalled by waving with the arm three times, and then the robot even stands up on its on with a quick move.
If the cables are switched again, the motors just whine again and the robot is not able to balance at all. Similar to Patrick, this behavior is reproducible.


Nevertheless, I still observed some issues which I would like to report hoping to shed some more light on the issues:

1. The documentation of the wiring of the two stepper motors by jjrobots is inconsistent. If you look at the picture at https://www.jjrobots.com/.../Brobot-EVO-2-connecting-everything-1024x791.jpg and the picture in the assembly guide video at https://www.jjrobots.com/b-robot-evo-2-a...uide-v1-2/ at 1:46 min playtime, you might recognize that the wiring is different.
The first shows the cables oriented with the black wire at M1 towards the center of the board, the second with the blue wire at M1 towards the center of the board! For Patrick the second seems to work, for me the first works. How can that be? Which one is "more correct"?

2. Instead of interchanging the cables at M1 and M2, I have also tried to turn the cables by 180° and leave them at the same output. In this case, the robot also works. It completes the calibration and is also able to stand up by itself. However, both stepper motors sound much worse and generate a vibrating sound which is not there when the cables switch the output! Why?

3. I have checked both motor drivers by directly connecting it to an Arduino and one stepper motor. The wiring and code are done as shown at https://www.instructables.com/id/Drive-a...-a-A4988-/ (steps 1 to 4) with the USB cable at the Arduino as logic power supply and the 9V block battery as motor power supply.
Both motor drivers work properly and can drive both motors. When rotating the potentiometer on the motor drivers, the voltage there changes smoothly without any jump and can easily be adjusted to values between 1.1V and 2.2V. This is NOT the case, when the motor drivers are mounted on the Devia control board (when powered with any of the power supplies mentioned in my first post). Why not?


Looking forward to your thoughts!

All the best,
Max


P.S.: To answer some of the questions from JJrobots JP, I have update my initial post with some more details and structure. However, I have also tried to flash the code again to the Devia board, but this does not work. The compiler of the Arduino IDE finds a number of errors in the code. I have downloaded the files from the Github website at https://github.com/jjrobots/B-ROBOT_EVO2...ROBOT_EVO2

Hi Max, Patrick
Thanks for the text. You are completely right. The assembly guide was misleading (video and image). The problem comes from the latests Arduino code. We changed the motor orientation by mistake when testing new PID parameters and left the code like that. Confused
We just updated the GUIDE with this new connecting diagram:    

About your points:
1) Thanks again. Guide updated
2) The stepper motors allows you to connect the cables in two positions, depending on which one, the motor will spin in one or the other direction. So... If you connect the cables "backwards" and at the same time, swap the motors (RIGHT-LEFT) The brobot will be able to keep it balance but the control will be just the opposite (FORWARD<-> BACK / RIGHT <-> LEFT) Regarding the noise: that is strange. For the motor, it does not really matter wich direction to spin. Please check the cable has enough slack so the headers are not forced and making proper contact?

3) You mean that the control of the stepper motor from the DEVIA is not so smooth like just using an Arduino (UNO?) and an A4988? or that the output voltage of the A4988 jumps when they are placed in the DEVIA? if we are in the second case, was the USB port connected while you were testing it?
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


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