[SOLVED] Servo, ultrasonic sensor and motor interference


#1

I have the following problems with my new GoPiGo:

  1. the fwd() command also triggers the servo now and then (connected on port A1)
  2. the movement of the servo is not steady and there is some gitter now and then
  3. the ultrasonic sensor readings are jumping up and down when the motor is running, when the motor is not running the readings are steady

Please advise how to solve this because the behavior of my GoPiGo is very unpredictable and therefore almost unusable.


[SOLVED] Servo trouble - Servo moves unexpectedly on power up and during regular operation
#2

Hi @danny.geyssens,

To help you better, can you follow this guide, generate a test log and upload it with your reply. Can you also send us some pictures of your GoPiGo board and your setup.

-Shoban


#3

Hi Shoban,

Thank you for your reply. Please find in attachment the requested log file and some pictures of my GoPiGo board and my setup.

log.txt (7.1 KB)


#4

Hi @danny.geyssens,

It looks like your battery is weak, can you use a fully charged battery pack and try the Ultrasonic example again and post its output with your reply.

-Shoban


#5

log.txt (6.6 KB)
Hi Shoban,

Please find in attachment the requested log file but this time with fully charged battery.
Just another picture of what happens when the motor starts, the servo turns 90 degrees and stays like that during the test.


#6

Hi @danny.geyssens,

We too tried running the troubleshooting script with the same setup as yours but we were not able to replicate the issue. So can you send us a video of your issue and the program you are running. Also can you send us the screenshots of your outputs. Can you also tell us all the programs that are running on your Pi when you have this issue. These will help us to isolate the issue and provide you the solution.

-Shoban


#7

Hi Shoban,

I’m using the standard DI image with the latest updates. I run only the DI test program. I made a small movie of what happens when the motor starts running. I’m connected to the RPI using VNC. I’m not able to upload a movie because the file size on the forum is limited to 3MB. The only thing you see on the movie is the servo moving quickly to the right as soon as the motor starts running. Each time the motor restarts the servo is jittering to its maximum extend.


#8

Hi @danny.geyssens,

Can you run the following code in new file and tell us what you see.
Open a new file using sudo nano Servo+Motor.py
and type the following code:

import gopigo
import time
import atexit
atexit.register(gopigo.stop)
while True:
        gopigo.fwd()
        time.sleep(2)
        for i in range(0,180):
                gopigo.servo(i)
        time.sleep(.1)

Run this code using sudo python Servo+Motor.py

On running this code you should see the motor moving forward and after two seconds servo motor moving from 0 to 180 degrees while the motor continues to be moving and this should repeat.

Let us know how it goes,
-Shoban


#9

Hi Shoban,

I managed to upload some video’s to my YouTube channel:

  1. this is what happens when I run the DI test program:
    https://youtu.be/Q9Fn8lu7G2c

  2. this what happens when I power up the GoPiGo:
    https://youtu.be/tFqhHEQUXcQ

  3. this is when running your code:
    https://youtu.be/VvyNZaLlqFc

Please let me know if you need additional information to help you find a solution for this strange behavior of my GoPiGo.

Danny


#10

Hi @danny.geyssens,

Can you try one last thing on your board, try updating the firmware following the instructions given below and try out the examples after the firmware update.

Navigate to the /GoPiGo/Firmware/ directory using
cd /home/Pi/Desktop/GoPiGo/Firmware/
then run the following commands
sudo chmod + firmware_update.sh
sudo ./firmware_update.sh

Please let us know if this helps,
-Shoban


#11

Hi Shoban,

I tried the firmware update with no success. The problem stays the same.

Danny


#12

Hi @danny.geyssens,

Sorry to hear that it doesn’t work for you and thanks a lot for your patience in testing it out . We would like to replace the GoPiGo and the Motors. Can you contact us here, under “General Questions and Feedback” . We will have one shipped to you immediately.
Again, I’m really sorry for frustration; we’ll make it right immediately.

Please let us know if this helps,
-Shoban


#13

Hi Shoban,

I finally received the replacement GoPiGo board and motors. It took 1,5 month to receive the package and I had to pay 35€ to the Belgian customs.
But now the good news: everything is working perfectly and I’m very satisfied with the way you have helped me in solving this problem. Thanks a lot!


#14

Hi @danny.geyssens,

Great to hear that you have everything working perfectly. Sorry about the delay in it reaching you.
Thanks a lot for your feedback and enjoy your GoPiGo!

-Shoban


#15

This topic was automatically closed after 24 hours. New replies are no longer allowed.