Тёмный

Raspberry Pi Servo Motor Control - No Jitter! 

Gary Explains
Подписаться 311 тыс.
Просмотров 53 тыс.
50% 1

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

Опубликовано:

 

6 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 67   
@GaryExplains
@GaryExplains 3 года назад
First!!! 😂
@vighneshmallampally6627
@vighneshmallampally6627 3 года назад
First to comment on first comment 😂😂
@burhanbohra4662
@burhanbohra4662 3 года назад
Gary Please Explain Harmony OS
@1MarkKeller
@1MarkKeller 3 года назад
lol!
@yoshi717abc
@yoshi717abc 3 года назад
Garry :) are the gpio pins interchable ?
@GaryExplains
@GaryExplains 3 года назад
Harmony OS is Android.
@ziggggy53ify
@ziggggy53ify 3 года назад
Excellent primer to servo programming in Raspberry Pi, plus a practical application! Bravo!!!
@codyflanagan304
@codyflanagan304 Год назад
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 Год назад
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!
@muddyexport5639
@muddyexport5639 3 года назад
Good vid! Look fwd to see the radar in operation.
@only1leddy
@only1leddy 2 года назад
Helped me loads my servos so smooth now well happy mate
@thorsten9211
@thorsten9211 3 года назад
REALLY NICE! The most guides are a bit old and not so detailed. Looking forward to see more! (As always!)
@noelomeli1520
@noelomeli1520 2 года назад
This was very helpful! Thank you!
@moeyali123
@moeyali123 Год назад
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
@ShonenReviews
@ShonenReviews 2 года назад
Man, I was looking for this for dayss!
@amethyst_academy
@amethyst_academy 2 года назад
absolutely amazing video sir. may god bless you. my project is now saved.
@1MarkKeller
@1MarkKeller 3 года назад
*GARY!!!* Good afternoon Professor! Good afternoon fellow classmates! Stay safe out there everyone!
@GaryExplains
@GaryExplains 3 года назад
MARK!!!
@daitran8266
@daitran8266 3 года назад
Thanks, nice explanation.
@sskumar669
@sskumar669 3 года назад
very helpful video sir thank so much
@4STEVEJOY34
@4STEVEJOY34 2 года назад
Loved it! I plan to apply this to ESP32 S1 in CircuitPython. Fingers crossed.
@HGmolotov
@HGmolotov 3 года назад
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!
@pisceesian1
@pisceesian1 2 дня назад
Very well explained. Can you please make a video on how to open/close a prosthetic arm using a servo. @Gary Explains
3 года назад
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 RU-vid 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 ;)
@FourTweny
@FourTweny 8 месяцев назад
Thank you so much. I really enjoyed this video. It was very helpful.
@lorisrobots
@lorisrobots Год назад
Excellent! Thank you!
@taiwantoklip
@taiwantoklip Год назад
Thanks million ,it also works on MS995 servo
@billgross3579
@billgross3579 3 года назад
Excellent! This was great and I'm already looking forward to the radar video.
@GaryExplains
@GaryExplains 3 года назад
You and me both!
@HDelport8
@HDelport8 2 года назад
I subed because I love the into!
@srisrisrisrisrikanth
@srisrisrisrisrikanth 3 года назад
Garry, Thank you for this video :-)
@vyacheslavhruschev6172
@vyacheslavhruschev6172 Год назад
maaaan, that's incredible! This really worked, thank you!
@zazaaom5
@zazaaom5 2 года назад
Thank you
@stmohir
@stmohir 2 года назад
Thank you, This was a life saver :)
@eriksmrkolj5792
@eriksmrkolj5792 Год назад
very nice video👍 👍 👍
@markjockel6434
@markjockel6434 2 года назад
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.
@mohitmw22
@mohitmw22 3 года назад
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?
@BrunoPereira-mo6kg
@BrunoPereira-mo6kg 3 года назад
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 😁?
@3D_dreams
@3D_dreams 2 года назад
Can u pls show how to reverse rotation of newer towerpro sg90
@andreinarita5156
@andreinarita5156 Год назад
How you found the custom values for the min and max pulse width? How you know that these work for you?
@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.
@TheUnofficialMaker
@TheUnofficialMaker 3 года назад
Sweet!
@MaxMax-wy7bi
@MaxMax-wy7bi 2 года назад
Hi, I have to type after every reboot or normal Start: sudo pigpiod. Otherwise an error appears. How can I change that?
@rickhunt3183
@rickhunt3183 3 года назад
I think you might find using a PCA9685 servo controller will make things much easier for you.
@ToxicBananaFish
@ToxicBananaFish 10 месяцев назад
Form some reason, my servos won't stop at the min/mid/max positions, but instead just continue to rotate in whatever direction indefinitely
@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"
@cnaazh6942
@cnaazh6942 3 года назад
please make a tut for 360 servos
@JxH
@JxH 3 года назад
Soundtrack is Arthur Tussik. :-)
@gabrieljulioarmandosiagian1921
@gabrieljulioarmandosiagian1921 3 года назад
Excuse me Sir, why my raspberry always disconnected from the remote desktop after some minutes doing "Sudo pigpiod"?
@matematikmuhendislik
@matematikmuhendislik 2 года назад
how can i use two servos
@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 2 года назад
Did you find out?
@JasonMayes
@JasonMayes 2 года назад
@@shadbud9198 worked for me for a pan tilt setup
@anthonyshort8957
@anthonyshort8957 3 года назад
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 3 года назад
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.
@axelkoster
@axelkoster 3 года назад
oh nice. i guess this will make my autonomous weapon system a bit better. :-)
@bornach
@bornach 3 года назад
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 3 года назад
maybe i missed it. where did you get the servo.min() function? please treat us as noobs.
@GaryExplains
@GaryExplains 3 года назад
It is part of gpiozero. The "servo" object is created first and then you can control it via that variable.
@moatezbenabdallah7589
@moatezbenabdallah7589 3 месяца назад
What about Raspberry Pi 5 ?
@krestonkurotani3231
@krestonkurotani3231 3 года назад
Probably too bulky to shove all of them onto a remote plane The radar though, ooooh
@armandolario6665
@armandolario6665 3 года назад
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
Просмотров 20 тыс.
Разоблачение ушные свечи
00:28
Просмотров 772 тыс.
Мой инстаграм: v1.ann
00:13
Просмотров 100 тыс.
Я НЕ ОЖИДАЛ ЭТОГО!!! #Shorts #Глент
00:19
Raspberry Pi Pico: Inputs & Servo Control
17:20
Просмотров 131 тыс.
Top 10 Uses for a Raspberry Pi (400th EC video!)
11:24
Просмотров 239 тыс.
controlling lots of servos with a Raspberry Pi Pico
13:38
BBC BASIC in RiscOS on a Raspberry Pi is really cool!
17:37
I built my own computer. by hand.
13:03
Просмотров 1,1 млн
Разоблачение ушные свечи
00:28
Просмотров 772 тыс.