0

I hope all are doing good.

I recently acquired a couple of Parallax continuous servo motors with adjustment screw rated at 50Hz, I successfully driven them using Arduino in all directions with variant speeds. Today I connected one servo to Rpi and used Pigpo library to move it, the servo moves however changing the arguments (eg 1000,1500,2000) does nothing! nor the speed or the direction change. adjusting the screw only slightly increase/decrease the speed however I was not able to determine the midpoint of rotation.

In Arduino Uno the midpoint I set was 1500 and the screw was adjusted to stop when 1500 is given.

both codes above showed similar behaviors. The servos are powered separately with common ground added.

enter image description here

Second Code:

enter image description here

1 Answer 1

0

If pigs does not work you have not connected the servo properly, i.e. wrong GPIO or no Pi ground connection.

Your pigs code uses GPIO 4 (pin 7).

Your RPi.GPIO code uses GPIO 12 (pin 32).

https://pinout.xyz/

3
  • the codes were changed to have the pins, pictures you see above are unaltered original codes. Pigs work only in one direction with the arguments have no affect on the behavior, I'll double check my grounding and power requirement
    – Zak
    Commented Jul 12, 2023 at 6:13
  • I'd guess you have not connected to the GPIO you have told the software to use. Photos please. Two other possibilities 1) you are using GPIO 4 for something else like 1-wire (/boot/config.txt listing) or 2) the servo requires a 5V control signal (unlikely).
    – joan
    Commented Jul 12, 2023 at 8:06
  • Update, It seems to be working now, I think the ground wire feeding into the Rpi lost connection with the lever nut connector. I appreciate your help
    – Zak
    Commented Jul 12, 2023 at 14:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.