Raspberry Pi Servo Motor Control

Поділитися
Вставка
  • Опубліковано 2 жов 2024

КОМЕНТАРІ • 635

  • @therushden
    @therushden 4 роки тому +87

    Again, explaining computers makes a video I find interesting even though I never knew I had any interest in servos. 👏👍

  • @PeterGMerchant
    @PeterGMerchant 4 роки тому +3

    One of the clearest explanations/demonstrations of using servos on the RPi. Also a good demonstration of using thonny.

  • @paulj2383
    @paulj2383 4 роки тому +3

    Thank you for taking the extra effort to explain the python code. Also thank you for explaining the power supply requirements.

  • @saturno_tv
    @saturno_tv 4 роки тому +9

    As the moment youtube notified me about this new video, I was watching Explaning Computers: the Latte Panda Delta Review. Bought two of those myself. :)

  • @easycommuter2147
    @easycommuter2147 4 роки тому +1

    Very interesting
    I very much appreciate your comments which add a real world perspective.
    For example, how the SG90 you used is the "most common type servo in the world" I just assumed it was a hobbyist piece of electronics. It really brings home how relevant what you are sharing is..
    Thanks again

  • @nathanielpullig932
    @nathanielpullig932 2 роки тому +1

    I’m building a little robotics platform for myself and had typed out a little Python Library for myself to handle the wheels but didn’t know for sure if the PWM methods could control more than one servo at a time. With this hindsight I realize it’d be a bit silly if it weren’t capable of doing so. Now I just have to remember where I saved the two libraries, test them out, and add in turning to the Wheel library. Thank you again for the awesome videos!

  • @pamus6242
    @pamus6242 4 роки тому +1

    This is the most well documented piece of well put practical code I have ever seen, since witnessing Linus's kernel 1.0.

  • @Jeroenvdv
    @Jeroenvdv 4 роки тому +1

    Not to argue with you, but, seemed more like 67,65 to me 😉.
    Thanks as always for charing your knowledge with us.
    Ordered a Rasp PI 4B for my 11 year old just today.

  • @alankingvideo
    @alankingvideo 2 роки тому +1

    With just 2 PWM chanels but 4 outputs I had wondered if you can coltrol 4 servos independantly, turnd out you can. All working fine thanks, for the code really speeded things up for me, only used stepper motors before.

  • @tweaker1968
    @tweaker1968 4 роки тому +2

    Glad you have moved on to SBC implementation.... Thanks for another interesting video....

  • @ChrisJSetterington
    @ChrisJSetterington 4 роки тому +1

    Thanks Chris, I think you just cured my MeArm's Parkinsons symptoms. It's driven by Arduino but got it with the intention to link up to the Pie instead. Never got around to it, thought the servo's were sketchy. Other commitments killed off any progression, that's all history 01/01/2020 😀

  • @auxz2jz158
    @auxz2jz158 4 роки тому +1

    Nice little tutorial better than most out there, hope u continue them and show us how to combine them into other codes and with other sensors.

  • @ArpitSharma-kk9tl
    @ArpitSharma-kk9tl 4 роки тому +34

    finally after long time real projects

    • @ExplainingComputers
      @ExplainingComputers  4 роки тому +18

      Glad you appreciated. More soon!

    • @gdutfulkbhh7537
      @gdutfulkbhh7537 3 роки тому

      I find the Pi is much more interesting once you start interfacing it with the physical world. I already own four or five computers that are better than a Pi at everything else... but once you tinker with sensors, motors, hats, designing your own enclosures and so on, you find that there’s a real sense of achievement. Also, I am able to tell myself it doesn't matter if you nuke one... although I haven't lobotomised a single Raspberry Pi yet.

  • @3phasetinkerer
    @3phasetinkerer 4 роки тому +1

    Why have I not subscribed to your channel already? You sir are one of awesomest dude around here! This is what I was looking for!

  • @ashishkota5541
    @ashishkota5541 4 роки тому +1

    Thankyou Sir ...it was a crystal clear content for a beginner working on servo with Raspberry Pi ....No words to say 😁

  • @LMacNeill
    @LMacNeill 4 роки тому +1

    Reminds me of the days when I flew RC aircraft -- that was back in the late '80s and early '90s. We definitely didn't have anything like a Raspberry Pi to control them, however. :-) This looks like it would be a lot of fun to experiment with.

  • @MrClakkas49
    @MrClakkas49 4 роки тому +2

    Love the Raspberry Pi content. Please keep it coming!

  • @geoffreyjohnstone5465
    @geoffreyjohnstone5465 4 роки тому +1

    Fascinating to see this. There is a whole world of unused possibilities for the humble Pi. All explained impeccably. I reckon you could explain Einstein's special theory of relativity to a bunch of 8 year olds and they would all understand

  • @I3ordo
    @I3ordo 4 роки тому +1

    I was planning to use something similar for my tv to pivot to the otherside of the room and vice versa and this solves the trickiest part of it actually. Now i have find some stronger servos...

    • @ExplainingComputers
      @ExplainingComputers  4 роки тому

      There are some very big, heavy duty servos available! I had not thought of mounting a TV on one. You have now got me contemplating something!

    • @tin2001
      @tin2001 4 роки тому +1

      Probably cheaper to use some limit switches and a normal geared motor... Heavy duty servos are expensive, plus servos tend to be designed to move rapidly to arbitrary precise positions, while it sounds like you just want 2 positions.

  • @Ryan_Tidwell
    @Ryan_Tidwell 4 роки тому +1

    Been following your videos for some time. I like them all, but this one is by far my favorite.
    I now have a raspberry pi 4 B, partially due to some of the videos on raspberry pi that you have made.
    I would have purchased it from an Amazon affiliate link from your video if one existed. I'm not sure what that kind of thing entails but it might help to pay for future projects.
    I can't wait to see what you do with the servos in future videos. Would love to see you control the servos remotely through wifi. Thanks for the great videos. :D

  • @JohnDoe-tm2sc
    @JohnDoe-tm2sc 4 роки тому +1

    Excellent video and explanations. Thumbs up. Just on the side note - you could use a piece of something like Scotch tape to anchor the servos.

  • @soilder268
    @soilder268 2 роки тому +1

    Thank you very much! I learned a lot from the no jitter

  • @poppasteve2976
    @poppasteve2976 4 роки тому +20

    Thank you Professor! Fascinating, as always.

  • @rainbowspringsirrigation1519
    @rainbowspringsirrigation1519 4 роки тому +1

    lol. i am not that interested in computers but love learning and I love this video. well done and thank you. I do like rc cars and other rc stuff so this would something nice to incorporate into that. like have the pi control the lights so when you turn it puts on the directional. when you brake it but on the brake lights

  • @raisagorbachov
    @raisagorbachov 2 роки тому +1

    Excellent presentation. I'm going to have a fun time working out how to control two servoes on a Delta V-wing drone.

    • @ExplainingComputers
      @ExplainingComputers  2 роки тому

      Sounds like a cool project.

    • @raisagorbachov
      @raisagorbachov 2 роки тому

      @@ExplainingComputers It will be when I get that far. RIght now I'm having difficulty since eBay sellers are willing to sell but not to supply. If I was back in Swansea I could go to Tom Whitehouse in the market but I'm in South Carolina.

  • @ThePiGuy24
    @ThePiGuy24 4 роки тому +38

    Just a heads up: at 3:19 you said that a pulse is expected every 0.2 seconds, whereas it should be 0.02 seconds.

    • @ExplainingComputers
      @ExplainingComputers  4 роки тому +31

      You are correct -- it is 0.02. There are time when I detest having a weekly schedule, which means I have to produce things so quickly that errors creep in and are not found. I will now have myself and this video for ages. :(

    • @AnttiNannimus1
      @AnttiNannimus1 4 роки тому +6

      @@ExplainingComputers On the bright side, this is only your first mistake in 2020. But sadly, now you've used up your entire quota for the year, and it's only January.

    • @toysareforboys1
      @toysareforboys1 4 роки тому +6

      @@AnttiNannimus1 First and second mistake, he said PMW instead of PWM at 3:09 :)

    • @Sorrentino_Gianni
      @Sorrentino_Gianni 4 роки тому +1

      That left me quite confused and I thought I had become stupid, thanks for the comment :)
      PS: does the Raspberry have enough resolution to impose a 20ms delay?

    • @0dyss3us51
      @0dyss3us51 4 роки тому +2

      @@ExplainingComputers no worries better to make an erroe here and there and do exciting projects as these than neither!! Really loved this one! I am so excited to see more singleboard builds, possibly with item detection and some wheels under with various functionality, dare I say an arm that could fetch drinks? We are allowed to dream right? :)))

  • @lukash9413
    @lukash9413 4 роки тому +1

    Very helpfull. I like your Raspberry Pi projects. I always learn something new. Thank you.

  • @zq2030
    @zq2030 4 роки тому +1

    Excellent servo motor tutorial, I really enjoy these resources. Thanks!

  • @VideosfromNH
    @VideosfromNH 4 роки тому +1

    Nice demo thanks. I have a RPi but haven't used it with servos yet.

  • @derinkoyuncuoglu8977
    @derinkoyuncuoglu8977 3 роки тому +1

    Thank you profesör. I from Turkey. 🙋‍♀️

  • @r1273m
    @r1273m 4 роки тому +20

    "That was one the most exciting things, ever." !! People may mock but you have to start somewhere if you want to build a self driving car. I started with a "blink" programme and it's still blinking..... Bob

    • @speakertoanimals
      @speakertoanimals 4 роки тому

      if it's still blinking, that's better than when you do something more and it stops blinking... like how I find myself when I ignore pulldown resistors... or pullup?

  • @zxkim8136
    @zxkim8136 4 роки тому +1

    Brilliant explanation of the code Chris ......nice Vlog learned something today thank you 😀😀😀Kim😀😀😀

  • @jerryh559
    @jerryh559 4 роки тому +6

    Very interresting video!
    Please make more of this practical video's, where you can learn what fun stuff you can do with SBC'S.

  • @bosqueblanco3744
    @bosqueblanco3744 2 роки тому

    alone in the kitchen figuring out servos and i couldnt help myself but to get embarrasingly jiggy with that intro beat . lmao

  • @RoyNeeraye
    @RoyNeeraye 4 роки тому +5

    03:10 Was that a "sponsored" comment? Just kidding. I'm sure we all rectified on our own. Nice video, really got me wanting to try my hands on basic robotics. 👍🏼

  • @wolfrobots118
    @wolfrobots118 4 роки тому +6

    I love any video you make. Always professional and always FULL of valuable information. It's like tech eye candy.

  • @sanghyunhwang1297
    @sanghyunhwang1297 4 роки тому +1

    Instructions crystal clear

  • @tomjohnson7512
    @tomjohnson7512 4 роки тому +2

    bloody awesome content as always mate, thanks a bunch!

  • @moisesandre
    @moisesandre 2 роки тому +1

    Awesome!!! You explain very well, thank you!!!

  • @TheRoboticXstreamer
    @TheRoboticXstreamer 4 роки тому +12

    Awesome channel. Simply love it 👍

  • @BharatMohanty
    @BharatMohanty 4 роки тому +4

    I guess a rover making video is on the way....sir BTW very informative video.. :)

  • @5argetech56
    @5argetech56 4 роки тому +30

    Mr. & Mrs. Servo Motor...

  • @noealves8400
    @noealves8400 4 роки тому +7

    Agreed: the most exciting thing ever!!! Thank you for the video.

  • @LewisLetsPlay
    @LewisLetsPlay Рік тому +1

    For some reason changing the duty cycle to 13.222 on SG90 will send the servo more than 180 degrees, maybe 320 degrees, but not to an angle, just adding to current angle, so if you change it to 13.222 twice it will go to 640 degrees counter-clockwise from the current position.
    Here is some code to make it spin continuously for 5 seconds
    import RPi.GPIO as GPIO
    import time
    GPIO.setmode(GPIO.BOARD)
    GPIO.setup(11,GPIO.OUT)
    servo1 = GPIO.PWM(11,50)
    servo1.start(0)
    count = 0
    while (count < 10):
    print(count)
    servo1.ChangeDutyCycle(13.222222222222221)
    time.sleep(0.5)
    servo1.ChangeDutyCycle(0)
    count = count + 1
    servo1.stop()
    GPIO.cleanup()
    print("Finished")

  • @electron7373
    @electron7373 Рік тому +4

    Nice work! Must say your video quality, camera work and editing are top notch! You make it look easy breezy but I sure there's heaps of production gone into every video. Chris rules!

  • @shankarnathmajumder
    @shankarnathmajumder 4 роки тому +4

    Thanks for the Explaining, beautiful Presentation.
    👍👍👍👍👍

  • @aaronchu0427
    @aaronchu0427 3 роки тому +5

    Awesome video! Nicely paced and concise explanations. Thank you.

  • @minigpracing3068
    @minigpracing3068 4 роки тому +1

    This goes back a couple of decades for me, but it looks like the problem with driving servos directly from a microcontroller still exists. If you put an oscope on your pwm signal with the servo connected, you'll find a distortion on the waveform. This is happening because the servo controller is drawing more current than the MCU pin can supply. You can build or buy servo buffers that will fix this for you. The biggest issue with not fixing this is that with very high speed servos, the waveform can distort enough to "command" the servo into the stops on the gears. Since the motor still wants to spin, you get stripped gears.

    • @minigpracing3068
      @minigpracing3068 4 роки тому

      Sorry for the editing, lots of failures with my typing today.

    • @ExplainingComputers
      @ExplainingComputers  4 роки тому

      Thanks for this, though I doubt that this is the case. The servo is not drawing significant current from the GPIO pin, and the signal on that pin is generated by software, not hardware. The software PWM signal will certainly vary, but not due to current draw. I think! :)

    • @minigpracing3068
      @minigpracing3068 4 роки тому

      @@ExplainingComputers build yourself a simple buffer circuit and give it a try, I can't remember how many sets of gears I went through before learning this lesson. I did some quick web searching, and not finding something that was pretty easy to find back in about 1999. Some much garbage fills the search engines now.
      Some other info suggested that 5 volt signals may be to much for some servos, that 3.3 volts might work better and you could buffer this with a simple opto-isolator. I remember using some kind of common buffer chip, but not recollection of what it was.

    • @ExplainingComputers
      @ExplainingComputers  4 роки тому

      I can only come back to my point that the PWM output from the Pi's GPIO pins is being generated by software code, not directly from any form of electronic circuitry. So it cannot be influenced by the current draw from the pin. Current draw could damage the pin, the Pi, or cause the Pi to reset perhaps. But unlike current drawn from a hardware PWM output, it cannot alter the pulse itself.

  • @Rubbernecker
    @Rubbernecker 8 місяців тому

    This is great, and very well explained!

  • @mohamedfarid7499
    @mohamedfarid7499 2 роки тому +1

    thank you Mr.Chris

  • @techman2471
    @techman2471 4 роки тому

    I was told running motors directly from the Pi was not recommended. Utilizing servos is a marvelous way to cicumvent this peccadillo.

    • @ExplainingComputers
      @ExplainingComputers  4 роки тому +1

      This is true, as the servo includes its own motor controller.

    • @techman2471
      @techman2471 4 роки тому +1

      @@ExplainingComputers That is good for us Pi noobs

  • @tubegor
    @tubegor 4 роки тому +7

    I can only confirm that controlling a servo with RPI was particularly exciting for me as an RPI enthusiast. This is the technology that inspires. Thanks again for an interesting Sunday.

  • @DAVIDGREGORYKERR
    @DAVIDGREGORYKERR 4 роки тому

    I think that there must be a Py2C which will produce machine code that can be compiled using gcc-arm.so to produce reasonably efficient machine code.

  • @cyphi1
    @cyphi1 4 роки тому +1

    That was an amazingly detailed video!!

  • @louh9473
    @louh9473 4 роки тому +2

    Thanks very much. On the contrary, very interesting and helpful.

  • @nurchiguseynov4672
    @nurchiguseynov4672 3 роки тому +4

    2:12 "... in contrast a servo does not spin continuously, ..."
    That is not entirely accurate. Servo is a general term for a closed-loop system consisting of a motor, feedback, and, well, the control system.
    You can have speed servos that, as the name suggests, will maintain speed, given a reference. They do spin continuously at a set speed and (try to) maintain that speed as the load changes.
    What you describe in this video is a position servo, which spins to get to a position set by the reference.

  • @JakeWilliams117
    @JakeWilliams117 4 роки тому +1

    Thankyou for this, its just what I needed. Definitely earned a subscribe!

  • @user295295
    @user295295 4 роки тому +1

    I enjoyed the video. Maybe i'll get a Pi and servos and program my own analogue clock with it.

  • @ivanduran8976
    @ivanduran8976 3 роки тому +1

    You're the best, mil gracias inge.

  • @noweare1
    @noweare1 4 роки тому +1

    I think you would really like using an arduino. Yeah, there are a lot of channels already doing stuff with arduino but I think you would like physical computing quite a bit.

  • @Jeffrsharpe
    @Jeffrsharpe 4 роки тому

    Chris, that was a great explanation and very easy to follow....only thing i would like to see extra is how to control the speed. Could that be added sometime?

  • @Kababalax
    @Kababalax 2 роки тому +1

    @13:30 Explained for my sanity.
    Duty cycles range from 2 to 12, which represent 0 to 180 degrees. So for our input variable "angle" you are using "angle/18" (to get 10 degree position steps out of 180 degrees). So for an input "angle" of 90 degrees, it would be 90/18=5 for the duty cycle. However if we gave 5 as a duty cycle in the range of 2 to 12, then this would effectively be a 3 and not 90 degrees, because 5 is not the midway point between 5 and 12, 7 is. So this is why we add 2 for the duty cycle position (5+2).

  • @lesliedeana5142
    @lesliedeana5142 4 роки тому +12

    A great way to start the week!

  • @PeterGMerchant
    @PeterGMerchant 4 роки тому +1

    I am struggling with the concept of duty cycle to explain Pulse Width Modulation in the Raspberry Pi. To start with the wikipedia article and others about PWM for controlling RC servos says that a 1msec pulse turns the servo one way and a 2msec pulse turns it the other way, and therefore a 1.5msec pulse centers the servo. en.wikipedia.org/wiki/Servo_control . This is of course independent of the frequency of the pulses, whether they be one every 20msec or one a minute. This 1msec/2msec are generally the minimum/maximum values.
    Duty cycle usually should have a fixed frequency, but this is not mandatory. This is the width of the pulse relative to the period of the pulses. Within the Raspberry Pi software we are specifying a frequency of 50 Hertz, which gives a period of 20msec. A 20 msec pulse is 100% duty cycle, and a 10msec one is 50%. For a servo to get a pulse width of 1 msec, this is a duty cycle (50Hertz) of 5% and a 2msec pulse is 10%.
    The leap of faith that you have to have here is that in the software the value that you use to specify the pulse width is the duty cycle percentage. This is never stated explicitly.
    Testing with a couple of servos that I have in my collection, and guessing the angle as I don't have a protractor handy, and starting from a central position (1.5msec pulse specified as a 7.5% duty cycle) one servo arm moves +/- 45 degrees and the other moves just less than +/- 90 degrees. So whichever servo you use, testing is required.
    Good information about Servos
    www.pololu.com/blog/12/introduction-to-servos
    Deatil about using PWM for RC servo control:
    en.wikipedia.org/wiki/Servo_control
    Python PWM. To my mind uses the term 'duty cycle' rather than 'pulse width'.
    sourceforge.net/p/raspberry-gpio-python/wiki/PWM/

  • @reggiep75
    @reggiep75 4 роки тому +2

    After a long daunting wait, I took the plunge into Windows 10 at the weekend.
    Not that I wanted to but it was the end of the road really and now I'll be feeding Microsoft a regular diet of my likes, dislikes, data, loads of encrypted data (hahaha), silly noises into microphones, random searches for 'strong XXXXL adult diapers' (to mess with the system) and the content of this fine channel.
    Take that Microsoft, and now I'm unpausing to watch a fine vid about servos.

  • @in10zfilms
    @in10zfilms 2 роки тому +1

    Great explanation and code works 1st time Christopher, most excellent! I am brand new to raspberry pi and python. Q: Is there a code example that would repeat (or loop) the code 50 times? (Without copy and pasting code 50 times… lol) thanks again you are a great teacher. John

    • @ExplainingComputers
      @ExplainingComputers  2 роки тому +1

      You could add something like this:
      count = 0
      while count < 50
      [SERVO CODE]
      count = count + 1
      Note that here the code inside the while loop is indented with a tab.
      I have a Python intro video here:
      ua-cam.com/video/Crsp_He70no/v-deo.html

    • @saitamatechno
      @saitamatechno 2 роки тому

      or you can use for loop:
      for i in range(50):
      servo code

  • @larrywestenberg7839
    @larrywestenberg7839 4 роки тому +4

    The straightforward precision with which you explain, diagram, apply and demonstrate is a refreshing and very QUICK way to learn! I've never been anywhere near a Rasberry Pi yet. But I can't wait to meet "familiar friends" when I finally get some! I find your dry humor a SCREAM! Thank you for making this topic interesting.

  • @MichelMorinMontreal
    @MichelMorinMontreal 4 роки тому +3

    Interesting, though a bit difficult for amateurs like me... I extrapolate: we will be able to use this new knowledge soon, in particularly exciting fields! Can't wait! Thank you very much!

  • @partscience
    @partscience 4 роки тому +1

    Servos... I don't think its your concern to conrol... you're computer, programming specialist so.... but if you want to enter in electronics control then go more deeper to work more like with microcontrollers, fpgas, PLCs, motors, Sensors to explain deeply...

  •  4 роки тому +1

    Micro servo motors are fine for learning, but they're too fragile for most real world applications. Personally I'm a fan stepper motors, they are robust, precise and you can literally find them in a trash area of any larger office building (you can find really lovely stepper motors in higher end commercial printers from brands like OKI or Kyocera). I have buit a reliable drive for a camera slider (with timelapse function) pretty much for free (I already had arduino, motor controller and some old li-po drone batteries)

  • @thedissappointments7273
    @thedissappointments7273 3 роки тому +1

    Kinda time senstive but no rush obv. With the servo motor, what wire would fit in the holes along the servo? and how would you go about attaching said wire? do you just make a tiny knot so it doens't thread back through or is their an actual component you can buy?? THanks in advance!!!

  • @webslinger2011
    @webslinger2011 4 роки тому +1

    Please setup one using NRF24L01 modules to wirelessly control servos on the pi. I've done it on arduino for a pan-tilt ESP32 camera mounting. I have uploaded my sketch on github and a youtube video on it using arduino. I would like to know how to do bi-directional communication as well.

  • @kooky2
    @kooky2 4 роки тому +4

    This is really interesting and I look forward to seeing what projects you have in store! Thank you.

  • @zurbok
    @zurbok 2 роки тому

    Thanks! I am going to use this to teach kids how to make a cat feeder.

    • @ExplainingComputers
      @ExplainingComputers  2 роки тому

      Excellent! :) You may be interested in the video I did making a hamster feeder with servos . . . ua-cam.com/video/lT4AZAJdtAs/v-deo.html

  • @te4059
    @te4059 4 роки тому +1

    How to set the initial position of servo motor, and all angles with relation to it? It always starts of at 45 degrees. Whenever I input 0 degrees for example it's at a 45 degrees angle. And when I input 45 degrees it's at a 90 degrees angle.

  • @logtothebase2
    @logtothebase2 4 роки тому +1

    I'm surprised hardware PWM has not need added to latest boards for sure I noticed that PWM control on LEDs is glitcchy.

  • @CCoburn3
    @CCoburn3 4 роки тому +3

    What kid wouldn't like to learn to code so he can control servos? The Raspberry Pi may be the greatest invention of the age -- it encourages young people to do something other than watch TV and play videogames. It encourages them to use their minds. And Chris is doing an excellent job of showing people what is possible with a Pi. Good job!

  • @connorb1665
    @connorb1665 4 роки тому +3

    Another wonderful video! Love from Johannesburg, South Africa ❤️

  • @lorderectus1849
    @lorderectus1849 2 роки тому +1

    Absolutely riveting 🧐

  • @masterneme
    @masterneme 4 роки тому +8

    Me > Watches video.
    > ...
    > Adds a dozen servos to wishlist.

  • @semuhphor
    @semuhphor 4 роки тому

    Thank you for another enjoyable video. Cheers.

  • @steveshadowphoto9346
    @steveshadowphoto9346 4 роки тому +1

    Chris, in many of your videos you're seen having a nice cuppa tea. I'm a tea drinker myself and would love to know what brand(s) you find go best with computer projects. I myself like Yorkshire Gold, P&G and Typhoo! Thanks and best regards from the Windy City!

  • @erikev
    @erikev 2 роки тому +1

    RP has build in PWM. Running this as bit-bang PWM is unnecessary and inaccurate, and takes the entire CPU

  • @Ardonyx
    @Ardonyx 4 роки тому +1

    Would you be interested in making a experimental video of jury rigging SBCs into gaming machines through hardware adapters? I would be interested into seeing how well that would turn out.
    For example some SBCs have 8gb of RAM and a PCI-e mobile port, a adapter could be used to house a PCI-e x16 v3 graphics card and the same with a Lenovo L440 and you could quite possibly compare it with a Asus gaming laptop.
    To make it all happen, you might need to collab with another youtuber computer enthusiast if you want fresh results.

  • @BirTutamEsc
    @BirTutamEsc 4 роки тому +2

    For detailed information, you can look this address: www.raspberrypi.org/documentation/usage/gpio/

    • @ExplainingComputers
      @ExplainingComputers  4 роки тому +1

      This is the link for information on the Pi's GPIO pinout and GPIO functionality. There is nothing on servos or how to code for GPIO, which is the subject of this video. :)

    • @BirTutamEsc
      @BirTutamEsc 4 роки тому

      @@ExplainingComputers
      You're right about that. So let me correct the sentence as follows. You must first go to the address I mentioned above and get preliminary information, then go to the address I will specify now and get more detailed information.
      Address: tutorials-raspberrypi.com/raspberry-pi-servo-motor-control/

  • @kesmik
    @kesmik 4 роки тому +2

    RPI has two hardware PWM pins. Also you can try different lib (pigpio) which supports PWM by hardware timer. Maybe this could help to reduce jitter I have never used RPI with servo personally :)

  • @kkaviarasu8658
    @kkaviarasu8658 4 роки тому +1

    Could you please make a video for controlling the servo using raspberry pi keyboard and mouse

  • @kirschkern8260
    @kirschkern8260 4 роки тому +2

    A motor can only spin. A Servo can holds the torqur or the position of the arm.

  • @BlenderRookie
    @BlenderRookie 4 роки тому +1

    I have an extra pi 3, so yeah, I need to learn this stuff.

  • @lorderectus1849
    @lorderectus1849 2 роки тому +1

    He’s giving a pi 🕵️‍♂️ a serve!

  • @mo_ya_80
    @mo_ya_80 3 роки тому +1

    very helpful, thank you

  • @rexjuggler19
    @rexjuggler19 4 роки тому +2

    As is my custom, I went to church this morning and then thought about Explaining Computers to watch this afternoon. I thought, "Wish he'd do another technical how-to type soon". In fact, that's how I found the channel a few years ago. I had a Raspberry Pi Model 1 B and wanted to learn about it and stumbled on to this channel and have been watching ever since. Much to my delight, this was the video waiting for me! Good deal. Thank you. I do like them all, but interested in this type of controller logic from time to time.

  • @Kababalax
    @Kababalax 2 роки тому +1

    @3.16 Question, 50 Hz is 50 cycles per second, so how come you say a pulse is expected every 0.2 seconds? Isn't it every 0.02 seconds?

  • @mangethegamer
    @mangethegamer 4 роки тому +4

    I would love to see a build guide for a home automation unit with these motors for raising and lowering window blinds.

    • @jyvben1520
      @jyvben1520 4 роки тому

      stepper motors would be better, they have continuous rotation, search for
      "home automation blinds" on youtube : the hookup and drzzs

    • @j.macjordan9779
      @j.macjordan9779 4 роки тому +1

      Honestly, automated window treatments sound inconsequential, but many a year ago, I worked in retail selling flooring...so naturally, I was required to sell window treatments too...(?).
      The amount of money they (the relatively few companies that offer custom window treatments) want just to mill custom window treatments is ridiculous (even more so when you see the margins they pull); but add "motorized" to any order & it would add more to the price of custom window treatments than any other option available. There were times, to motorize a standard sized shade, it would easily double/triple+ the price (& this was always assuming self-installation…).
      There are very few window treatments that are more complex than a single rotating metal rod. As a general public service, if you cannot find a UA-cam video to help...then out of a sense of moral/ethical duty to act, I would think EC would be compelled to take on the Custom Window Treatments cabal and their insatiable appetite for profit with just a single UA-cam video.
      Motorized aside, Window Treatments are one of the New Home Buyer's 1st or 2nd surprise dropkicks to the pants/trousers. It's definitely common in the States...not so sure about the UK....(?)

    • @mangethegamer
      @mangethegamer 4 роки тому

      @@jyvben1520 Thanks my man! Will definitely look that up

  • @TuttleScott
    @TuttleScott 4 роки тому +16

    when someone shows their code on youtube does anyone else try to scroll the screen down so you can see the rest of it?

    • @ExplainingComputers
      @ExplainingComputers  4 роки тому +7

      I am always trying to scroll (or click on) computer screens shown in videos! :)

    • @DFX2KX
      @DFX2KX 4 роки тому

      Yep, me too....

    • @tin2001
      @tin2001 4 роки тому +1

      I watch Tim Pool's videos about news events, and I'm constantly trying to scroll the pages or un-pause the videos he has open.

    • @darkshadow31415
      @darkshadow31415 4 роки тому

      It's worse to try an rotate a .jpeg image as if it were a 3D CAD file

  • @EnginoIsRunning
    @EnginoIsRunning 2 роки тому +1

    3:40 for the famous sg90 the correcrt duty cycle is 5%-10%

  • @rodneybuckland1890
    @rodneybuckland1890 3 роки тому +2

    In the video, it is claimed that the code is available. Where is it?

    • @ExplainingComputers
      @ExplainingComputers  3 роки тому

      As indicated with the link in the second line of the video description it is here :) www.explainingcomputers.com/pi_servos_video.html

  • @rohankatreddy3260
    @rohankatreddy3260 4 роки тому

    I like his accent it make the video intresting

  • @alexlandherr
    @alexlandherr 4 роки тому +1

    I modified the Go_to_Angle example and came up with this:
    # Script originally from Christopher Barnatt over at www.explainingcomputers.com.
    # Modified by Alex Landherr. Python Version: 3.7.3.
    # Import libraries
    import RPi.GPIO as GPIO
    import time
    # Set GPIO numbering mode
    GPIO.setmode(GPIO.BOARD)
    # Set pin 11 as an output, and define as servo1 as PWM pin
    GPIO.setup(11,GPIO.OUT)
    servo1 = GPIO.PWM(11,50) # pin 11 for servo1, pulse 50Hz
    # Start PWM running, with value of 0 (pulse off)
    servo1.start(0)
    # Loop to allow user to set servo angle. Exit command allows exit
    # with execution of servo.stop and GPIO cleanup :)
    while True:
    # Ask user for angle and turn servo to it
    angle = input('Enter angle between 0 & 180, type ''exit'' to exit program: ')
    if angle == 'exit':
    servo1.stop()
    GPIO.cleanup()
    print("Goodbye!")
    break
    int_angle = float(angle)
    servo1.ChangeDutyCycle(2+(int_angle/18))
    time.sleep(0.5)
    servo1.ChangeDutyCycle(0)

  • @lionelreesable
    @lionelreesable 4 роки тому

    Thank you for the informative video. Best wishes.