Raspberry Pi Servo Motor Control - No Jitter!

  Переглядів 49,362

Gary Explains

Gary Explains

День тому

How to control a servo motor from a Raspberry Pi without any jitter! Using Python you can control an SG90 servo motor from a Raspberry Pi with precision and no jitter. I use a Raspberry Pi 4 in this video, but it will work equally well with a Raspberry Pi 3 or a Raspberry Pi Zero.
Buy from Amazon ( Affiliate Links):
Servos: geni.us/BG35
Breadboard Jumper Wires: geni.us/Zp6vEr
Code: github.com/garyexplains/examples
Newsletter: garyexplains.com
Introduction to Android app development: www.dgitacademy.com
Let Me Explain T-shirt: teespring.com/gary-explains-l...
Twitter: / garyexplains
Instagram: / garyexplains
#garyexplains

КОМЕНТАРІ: 65
@1MarkKeller
@1MarkKeller 2 роки тому
*GARY!!!* Good afternoon Professor! Good afternoon fellow classmates! Stay safe out there everyone!
@GaryExplains
@GaryExplains 2 роки тому
MARK!!!
@ziggggy53ify
@ziggggy53ify 2 роки тому
Excellent primer to servo programming in Raspberry Pi, plus a practical application! Bravo!!!
@moeyali123
@moeyali123 10 місяців тому
I was worried when I first ran the new code, jitters were still there. I ran it a second time and it worked perfectly. Thank you
@codyflanagan304
@codyflanagan304 11 місяців тому
Hey Gary, Thanks so much for your concise tutorial. It helped me out so much with my camera tracking project
@ollocksbay
@ollocksbay 2 роки тому
thank you dude!, i've been trying to program a robotic arm with a raspberry pi, when it wasnt slamming itself into the desk it was nearly backhanding me, this helped to explain why it kept shaking everywhere and so hard to control, thanks!
@jdeb0016
@jdeb0016 11 місяців тому
Thanks for your kind explanation and your code :) Before I was only using a GPIO pin and my servo motor was jittering too much but with the PiGPIO it is working fine!
@thorsten9211
@thorsten9211 2 роки тому
REALLY NICE! The most guides are a bit old and not so detailed. Looking forward to see more! (As always!)
@only1leddy
@only1leddy Рік тому
Helped me loads my servos so smooth now well happy mate
@HGmolotov
@HGmolotov 2 роки тому
Really could have used this about a month ago for my Arduino, but hey, I got it sorted. Seeing how it's used on raspberry pi should be interesting!
@odyssey_of_mind
@odyssey_of_mind 2 роки тому
absolutely amazing video sir. may god bless you. my project is now saved.
@4STEVEJOY34
@4STEVEJOY34 Рік тому
Loved it! I plan to apply this to ESP32 S1 in CircuitPython. Fingers crossed.
@FourTweny
@FourTweny 4 місяці тому
Thank you so much. I really enjoyed this video. It was very helpful.
@billgross3579
@billgross3579 2 роки тому
Excellent! This was great and I'm already looking forward to the radar video.
@GaryExplains
@GaryExplains 2 роки тому
You and me both!
@muddyexport5639
@muddyexport5639 2 роки тому
Good vid! Look fwd to see the radar in operation.
@ShonenReviews
@ShonenReviews Рік тому
Man, I was looking for this for dayss!
@vyacheslavhruschev6172
@vyacheslavhruschev6172 Рік тому
maaaan, that's incredible! This really worked, thank you!
@BrunoPereira-mo6kg
@BrunoPereira-mo6kg 2 роки тому
Hi Professor! Could you make a video showing the LTPO screens refresh rate changing? OEMs say the refresh rate could change between 1 and 120Hz, but I haven't found a video testing their claims... Could you do that please 😁?
@noelomeli1520
@noelomeli1520 2 роки тому
This was very helpful! Thank you!
@SebastianCastroRojas
@SebastianCastroRojas 2 роки тому
Hello Gary, Thank you for the nice intro, you're enticing me to use my Pi's GPIOs. Looks like fun! Well done moving the like/comment/subscribe/bell reminder to the middle. It may be problematic with the early leavers and the UKposts auto-play feature or playlists. You may find convenient to use movie scripting principles, insert the reminder right at the middle point; the "point of no return" when you have your audience engaged and wanting more ;)
@taiwantoklip
@taiwantoklip Рік тому
Thanks million ,it also works on MS995 servo
@daitran8266
@daitran8266 2 роки тому
Thanks, nice explanation.
@mohitmw22
@mohitmw22 2 роки тому
Hello Gary, I have been using the Raspberry Pi for a while now and we know how convenient it is to connect various sensors and modules using the GPIO pins. I recently found my Nordic Thingy 52 and realized I have the whole suite of sensors in one place that can be connected wirelessly to the Pi! I would like to know if there is an easy way for the two components to communicate?
@srisrisrisrisrikanth
@srisrisrisrisrikanth 2 роки тому
Garry, Thank you for this video :-)
@markjockel6434
@markjockel6434 Рік тому
Hello Gary, The sweep script is very nice. I'm new to Python as was wondering if there is an easy way to sweep from 70 to 110 º and back to 70º for just 100 cycles. Any help would be greatly appreciated.
@sskumar669
@sskumar669 2 роки тому
very helpful video sir thank so much
@henkoegema6390
@henkoegema6390 2 роки тому
Can I use your method also on the Jetson Nano 2GB with a PCA9685 servo driver? 🤔 My servo's are jittering too much.
@andreinarita5156
@andreinarita5156 Рік тому
How you found the custom values for the min and max pulse width? How you know that these work for you?
@HDelport8
@HDelport8 2 роки тому
I subed because I love the into!
@MaxMax-wy7bi
@MaxMax-wy7bi Рік тому
Hi, I have to type after every reboot or normal Start: sudo pigpiod. Otherwise an error appears. How can I change that?
@GaryExplains
@GaryExplains 2 роки тому
First!!! 😂
@vighneshmallampally6627
@vighneshmallampally6627 2 роки тому
First to comment on first comment 😂😂
@burhanbohra4662
@burhanbohra4662 2 роки тому
Gary Please Explain Harmony OS
@1MarkKeller
@1MarkKeller 2 роки тому
lol!
@yoshi717abc
@yoshi717abc 2 роки тому
Garry :) are the gpio pins interchable ?
@GaryExplains
@GaryExplains 2 роки тому
Harmony OS is Android.
@JxH
@JxH 2 роки тому
Soundtrack is Arthur Tussik. :-)
@3D_dreams
@3D_dreams Рік тому
Can u pls show how to reverse rotation of newer towerpro sg90
@lorisrobots
@lorisrobots Рік тому
Excellent! Thank you!
@stmohir
@stmohir Рік тому
Thank you, This was a life saver :)
@gabrieljulioarmandosiagian1921
@gabrieljulioarmandosiagian1921 2 роки тому
Excuse me Sir, why my raspberry always disconnected from the remote desktop after some minutes doing "Sudo pigpiod"?
@eriksmrkolj5792
@eriksmrkolj5792 11 місяців тому
very nice video👍 👍 👍
@JasonMayes
@JasonMayes 2 роки тому
Hi new to all this - can you let me know if i can connect 2 servos (exact ones you show here) to Raspberry pi 4b without any additional stuff? Or can it not power? My aim is to get a pan/tilt combo working with the raspberry pi camera 2 module. Totally new to this so any advice appreciated in the most minimal way possible - would rather not buy more stuff as it will go on a robot so want to keep weight to minimum.
@shadbud9198
@shadbud9198 Рік тому
Did you find out?
@JasonMayes
@JasonMayes Рік тому
@@shadbud9198 worked for me for a pan tilt setup
@rickhunt3183
@rickhunt3183 2 роки тому
I think you might find using a PCA9685 servo controller will make things much easier for you.
@cnaazh6942
@cnaazh6942 2 роки тому
please make a tut for 360 servos
@Martin-fo9sj
@Martin-fo9sj Рік тому
Thank you, it saved me a lot of pain :D
@henkoegema6390
@henkoegema6390 2 роки тому
Thanks for this good explanation. :-) How can I add the terminal command "sudo gpiod" in the python script itself to start the deamon? And how to stop at at the end. Best regards.
@henkoegema6390
@henkoegema6390 2 роки тому
sudo gpiod = "sudo pigpiod"
@matematikmuhendislik
@matematikmuhendislik Рік тому
how can i use two servos
@zazaaom5
@zazaaom5 2 роки тому
Thank you
@ToxicBananaFish
@ToxicBananaFish 5 місяців тому
Form some reason, my servos won't stop at the min/mid/max positions, but instead just continue to rotate in whatever direction indefinitely
@anthonyshort8957
@anthonyshort8957 2 роки тому
Hi ... I'm considering signing up for your newsletter, and was encouraged by your "no spam" statement. However, in the privacy policy linked from the sample newsletter it says "We use the information we learn from you to ... Send you newsletters, offers and promotions for our products and services, third party products and services, or special events by e-mail, text, or other another medium". Is there a way to sign up for the newsletter without getting spam from Android Authority? Thx.
@GaryExplains
@GaryExplains 2 роки тому
Unfortunately the privacy policy needs to be broad to cover every eventually and the complex nature of privacy laws on a global scale. It also covers more than just my newsletter. As I say in the video. If you sign up all you will get is my newsletter. Nothing else.
@TheUnofficialMaker
@TheUnofficialMaker 2 роки тому
Sweet!
@axelkoster
@axelkoster 2 роки тому
oh nice. i guess this will make my autonomous weapon system a bit better. :-)
@bornach
@bornach 2 роки тому
The really cheap servos sold on Amazon and Ebay claiming to be Tower Pro are probably clones. Might explain why they don't adhere to the datasheet specs.
@rino19ny
@rino19ny 2 роки тому
maybe i missed it. where did you get the servo.min() function? please treat us as noobs.
@GaryExplains
@GaryExplains 2 роки тому
It is part of gpiozero. The "servo" object is created first and then you can control it via that variable.
@krestonkurotani3231
@krestonkurotani3231 2 роки тому
Probably too bulky to shove all of them onto a remote plane The radar though, ooooh
@armandolario6665
@armandolario6665 2 роки тому
I don't understand why you call this motors SERVO-MOTORS: they are not SERVO, because they haven't any encoder for the feedback, then it's an open loop control, NOT a closed loop control. You will never be sure that the motor reaches the set position, you can do this only by means of a feedback that confirms the reached positions is the same as the set position
@MikePreston-darkflib
@MikePreston-darkflib 2 роки тому
Inside there is a potentiometer which encodes the current position, so they are servo motors. There are tutorials about how to change these servos into continuous rotation by modifying the pots.
Piccolo OS: Write Your Own Multitasking OS
28:29
Gary Explains
Переглядів 19 тис.
Raspberry Pi Servo Motor Control
17:36
ExplainingComputers
Переглядів 373 тис.
Братик купил бегемота #shorts #iribaby
00:42
IRIBABY
Переглядів 3,2 млн
Мерс оживлен! Результат есть, смысла - нет :)
1:17:37
The Ultimate Guide to using Motors in Robotics (including ROS, Raspberry Pi)
25:56
Articulated Robotics
Переглядів 265 тис.
controlling lots of servos with a Raspberry Pi Pico
13:38
pileofstuff
Переглядів 11 тис.
How To Use A Servo With Raspberry Pi Pico
11:49
Core Electronics
Переглядів 14 тис.
How To Control A Standard Servo With Raspberry Pi
7:40
Core Electronics
Переглядів 65 тис.
Ethercat + linuxcnc + Raspberry pi?
19:17
MetalMusings
Переглядів 39 тис.
Raspberry Pi Battery Power
20:34
ExplainingComputers
Переглядів 330 тис.
Servo Motors, how do they work?
15:12
The Engineering Mindset
Переглядів 1,7 млн
Братик купил бегемота #shorts #iribaby
00:42
IRIBABY
Переглядів 3,2 млн