Hi, this is Wayne again with a topic “How Do Servos Work? With the Digilent Analog Discovery 3”.
Welcome back today, we’re going to see how a Servo motor actually works by using a digital logic analyzer to break it down, but before we get into it, this video is sponsored by digilent with their new analog Discovery. 3., it’s a lightweight and portable measurement device. That’S perfect for any maker, so this is a Servo motor. It’S just a DC motor that has an integrated gear, train, a shaft encoder and some control logic.
So it’s easier to use and they come in a few different sizes depending on what you need them for and how much weight they need to move so for projects like robots or RC cars. You need a motor that has some higher torque, but for something like one of these lucky cats, you can use a lower powered Servo motor. Also Servo Motors are generally limited for the range of motion.
There’S usually a hard stop using a pin at either 90 or 180 degrees, but there are also some continuous servos and, like that name implies they can do a full rotation. The one I have here is continuous and I’m actually going to use the 83 to drive it. Usually, when you do a project like this, you plug it into like a Raspberry Pi or an Arduino, but we’re gon na go straight to the source of how these are working. Wiring Wise, It’s a pretty simple setup power power and ground from the servo are connected to positive 5 volts and ground from the 83, along with the signal pin being connected to the wavegen output from the 83..
I also have the positive channel from the oscilloscope connected in line of the wavegen signal and the negative Channel connected to ground. Luckily, digiland included this really helpful sheet inside of the Box reader reference, so you don’t have to memorize, which wire is which there are a lot of them, and I really like how versatile the 83 is right, like it’s a single tool like one piece of Hardware, I’M using as a waveform generator to create the pwm signals for the servo, I’m using it to generate the supply load for the servo and I’m also using it as an oscilloscope. To then measure back. The pwm signals that I’m sending and that’s just like the start of what this thing can do, there’s so many more options, but speaking of pwm signals that stands for pulse width, modulation, which is a cool technique that rapidly turns digital signals on and off to simulate An analog signal through that ratio of on to off time – and it looks like this – it’s just like a square wave or the time between each pulse – is the pulse width and that’s what you’re are adjusting to change the simulated analog signal and now that I have This Hardware, all wired up, I can jump into the waveform software to actually drive it. So first, I’m going to set up the supply to actually power the servo.
To do this, I’m going to start at the home screen and just add a supply on the left side, column and there’s only a couple things we need to adjust here. First I’ll make sure that the negative Supply is off. We don’t need that for a Servo. We’Re only going to be using positive Supply and then I’ll make sure that the positive Supply is set to 5 volts and I’m also going to use the waveform generator to set up the pwm signal. So going back to that welcome tab, I can add the wavegen option now, once I’ve added the wave gen I’m going to change the type to square, also, I’m going to make sure that the amplitude is 5 volts to actually change the angle of the servo you’re. Going to play with the period variable, which is the pulse width in general, zero degrees is about a one. Millisecond pulse width and 90 degrees is about one and a half seconds pulse width. It’S going to really depend on your Servo, exactly it could vary a little bit, but once I have the variables I’ll set, I can go ahead and enable the waveform and based on the period you’ll, see the server move and it’s really cool being able to just Type numbers into the software and see how that has an actual effect on the position of the servo. Now there’s one more thing we can do just for fun to just like check our work right.
So the 83 has a built-in oscilloscope, which I hooked up earlier and if I go back to the main window, I can add that to my waveforms as well, and when I run that I can actually see the signal that’s being generated by the 83. I’M just kind of reading it back. You know the oscilloscope is looking at the signals that it’s connected to, and it’s just showing it to you. Of course. It’S the exact same one as the waveform generator, because it’s coming from the same place. But if you were say debugging this on an Arduino, you could use the oscilloscope to make sure and check that you’re getting the right signal since you’re not generating them yourself.
You’Re, just telling the code where to put the servo, I’m really liking the 83. From Vigilant. It’S pretty simple: it just connects to your computer via USBC for data and power and the waveform software is available for Mac, OS windows and Linux, and it’s pretty portable. I mean you can just put this in your backpacks, it’s perfect for a student or anyone who doesn’t have that, like bench top equipment. You know I would have really liked having this back when I was taking my circus classes, so I could debug my projects outside of the labs. Personally, I prefer to try and find more smaller compact tools that don’t compromise on any features, so that they’re out of my way when I don’t need them, and they don’t leave me wanting more or needing another tool when I do need them.
If you want to get one for yourself, be sure to check out that link down below the like button, but thanks for watching be sure to like And subscribe for more videos about 3D printing making and DIY projects. Here’S a video about making a dice case and here’s a video that YouTube thinks you’re gon na, like the best foreign .