WEBVTT

00:01.680 --> 00:02.500
Hello everyone.

00:02.500 --> 00:06.910
Welcome to lab 7 R C servo.

00:07.270 --> 00:13.710
Here are some servo uses servos are used in robotics and automation.

00:13.830 --> 00:18.760
These And each joint on the server are servo or the robot.

00:18.810 --> 00:25.150
You can see it's got every joint has a servo and what it uses to control a robot to give it however

00:25.270 --> 00:26.730
may servo's it has.

00:26.760 --> 00:33.330
Example here this robot it's got six different servos which allows six different degrees of motion.

00:33.360 --> 00:40.700
And this here on the right is the remote control plane which is what we'll be using in our lab today

00:40.980 --> 00:47.460
as an actual RCA servo which is using remote control planes remote control cars and things of that nature

00:48.900 --> 00:50.370
to control servo.

00:50.370 --> 00:54.140
They use this technique called Pulse with modulation.

00:54.240 --> 01:01.920
If you look here on the screen you'll see we've got a signal and the signal that comes in it brings

01:01.920 --> 01:05.110
a has to come at a specific frequency.

01:05.310 --> 01:09.680
And then right here it is dictated at a 10 to 20 milliseconds.

01:09.750 --> 01:11.090
You have to.

01:11.250 --> 01:16.910
That gives you your period there or the frequency you need which is going to be specified in the servo

01:16.920 --> 01:18.240
data sheet you use.

01:18.420 --> 01:25.110
And so for each different pulse with modulation percent or for the amount of time that it's a logic

01:25.110 --> 01:29.200
high year service is going to go in a different direction.

01:29.370 --> 01:35.270
So this here is not applicable to ours but just kind of gives you an idea if you're high for one no

01:35.280 --> 01:36.690
second year.

01:36.710 --> 01:42.380
R C servo arm is going to be to the to the left at a minimum value.

01:42.480 --> 01:49.230
And if it's high for 1.5 milliseconds proxy server is going to be at the center value or if you're high

01:49.230 --> 01:56.760
for two milliseconds you're RNC service is going to be at the maximum value of the servo that the RC

01:56.760 --> 02:03.660
server that I'm using for this lab is from Radio Shack and here's a picture of the datasheet or just

02:03.660 --> 02:05.060
kind of walk through it here.

02:05.340 --> 02:13.470
It tells you that the voltage justification is between 4.8 and 6 volts which you're probably wondering

02:13.470 --> 02:18.090
the basis to board that I'm using to control it only it runs at 3.3 volts.

02:18.090 --> 02:25.410
So if I were to take and hook this servo directly up to my base to board it wouldn't work it wouldn't

02:25.410 --> 02:26.890
be able to.

02:27.120 --> 02:30.310
Three four point three volts would not be recognized by this.

02:30.300 --> 02:33.270
So we're going to have to create a circuit on here.

02:33.300 --> 02:40.770
Or designed to take our 3.3 volt signal and create it into a FEIBEL signal.

02:41.010 --> 02:48.570
And it also gives you the torque speed size and weight of your servo and they use single meaning that

02:49.200 --> 02:53.610
this circuit has a total range of less than 160 degrees.

02:54.120 --> 03:00.390
And then it tells you there you can you can see it tells us what we need to have a pulse with modulation

03:00.390 --> 03:09.750
signal that has a frequency of 50 hers and the angle of the RC servo is directly relative to the logic

03:09.750 --> 03:20.070
high up on the table there you can see it 0.6 milliseconds a degree of zero a logic high for 0.9 no

03:20.070 --> 03:24.030
seconds gives you a 30 degree angle and so on and so forth.

03:24.420 --> 03:35.160
And so I mean table up here which shows you the the difference the different duration of your logic

03:35.160 --> 03:39.300
horizon and compares that to the air gives you a hexadecimal value.

03:39.450 --> 03:46.230
So for the logic high for zero point six seconds since in our design we're going to be using an 8 8

03:46.260 --> 03:55.230
bits resolution so the hexadecimal value for that would be 0 8 and for 0.9 seconds the hexadecimal value

03:55.230 --> 03:57.600
for that would be zero of B.

03:57.810 --> 04:03.090
And this is to give you a reference on the basis to board when you're clicking on the buttons to change

04:03.090 --> 04:06.410
the resolution of your sort of a controller.

04:06.540 --> 04:12.480
You can see the duration of logic high and you can relate it to the datasheet to see that you're getting

04:12.480 --> 04:14.890
that actual specified angle

04:17.610 --> 04:30.870
here is a S R C servo diagram design and B R C servo BICI that a big box is dotted around the outside.

04:30.870 --> 04:37.770
That is the what we would call the top level VHDL file that is like your main project file you're going

04:37.770 --> 04:46.650
to have in your in your project here and inside that design we've got two other VHDL designs.

04:46.790 --> 04:53.100
We've got that Polsce with modulation that Peto you got VHDL component which is what you're going to

04:53.100 --> 04:56.190
have to create in order to make this lab work.

04:56.400 --> 05:04.680
And we've got the hecks to seven segment component here which you should have created in lab 4.

05:04.770 --> 05:09.610
So you can just pull that right and you shouldn't have to modify anything if you've got that working.

05:09.900 --> 05:17.220
You just have to map it to your date of resolute resolution and register we have said here and you're

05:17.220 --> 05:25.550
also going to have to create an add or subtract process and add or subtract process to count.

05:25.740 --> 05:33.690
Count your button presses and then take those values and put them into the 8 bit resolution register

05:34.110 --> 05:40.350
and you also have two switches to determine whether it's an add or subtract process and a select if

05:40.350 --> 05:42.330
it's enabled or not enabled.

05:42.660 --> 05:47.130
And then your three point three output coming out of Bass's to board is going to have to go through

05:47.130 --> 05:55.410
a circuit or a step that up to 5 volt output which then in turn will go on to your RCA servo to the

05:55.410 --> 05:55.980
output there.

05:55.980 --> 06:00.420
So this is definitely designed you can do a screen capture on and get a picture of when you want to

06:00.420 --> 06:07.770
use this to help you as you start architecting and putting everything together.

06:07.770 --> 06:14.850
And here is a three point three to five all level shifting circuit already provided for you if you have

06:14.850 --> 06:15.990
a different way of doing this.

06:15.990 --> 06:23.010
Maybe you have a specific I see that takes a 3.3 people and converts it up to five all single then you

06:23.000 --> 06:29.010
don't you don't need to use this or if you have an RC server that accepts the 3.3 bold input then you

06:29.010 --> 06:30.370
don't have to do this either.

06:30.400 --> 06:36.750
So but if you don't if you're like me and you've got a FEIBEL servo controlling with the three point

06:36.750 --> 06:42.090
people signal Here's a simple circuit you can use to do that.

06:42.150 --> 06:46.620
I'm not going to go through the specifics of how this works that's a whole other course an electronic

06:46.620 --> 06:53.640
circuit design but basically you can see the three point 3PL you bring that in and connected to your

06:53.640 --> 07:02.760
one k ohm resistor and two or two and thirty nine or four transistor which then the collector on that

07:02.760 --> 07:08.850
is connected to the another one resistor which is connected to the base of a second two and thirty nine

07:09.060 --> 07:14.850
for transistor where both of their emitters are connected to ground and B.

07:14.890 --> 07:20.790
Now it's important to know that on your second transistor that the five ought out is coming out of you

07:20.790 --> 07:28.350
need to have 100 ohm 150 or somewhere in that range a lot smaller resistor because you want to make

07:28.350 --> 07:32.010
sure that you've got the current to supply the RC servo.

07:32.010 --> 07:39.210
If you have too high a value like if you put a 10K resistor in there your servos just kind of chatter

07:39.300 --> 07:42.390
and it'll it'll be pretty messy and you try to figure out what's going on.

07:42.390 --> 07:51.510
So make sure you look at these values closely and follow this circuit set up exactly.

07:51.540 --> 07:55.580
So here's the tasks for our RC servo lab.

07:55.650 --> 08:01.440
You're going to create a pulse with modulation design using model sim to help you debug which I'll be

08:01.440 --> 08:07.690
giving you a test bench if you download the lab 7 file folders that folder.

08:07.740 --> 08:13.560
You'll have a pulse pole small with modulation design.

08:13.560 --> 08:15.100
Sorry about that.

08:15.300 --> 08:20.880
I'll give you a testbench in there and a tool command line file to help automate that process.

08:20.880 --> 08:26.910
And then you're gonna have to create a project in IMC and implement all the different parts of the RC

08:26.910 --> 08:28.060
servo controller.

08:28.190 --> 08:34.710
Patricia you previously on the diagram there and then as an extra if you can see if you can modify the

08:34.710 --> 08:38.390
ECF file and have it control the brightness of an LCD

08:41.370 --> 08:45.260
some hints here to get you started start by.

08:45.260 --> 08:52.170
First off you want to start by creating your Holsworth with modulation design using a test pulse with

08:52.170 --> 08:55.790
modulation dot the file I give you.

08:56.340 --> 09:01.650
You're going to want to test this because if this doesn't work then when you go ahead and try and create

09:01.650 --> 09:06.130
your design you're going to have all kinds of problems like nothing's going to work for you and you're

09:06.930 --> 09:09.150
sitting there just spinning your wheels trying to hear what's going on.

09:09.150 --> 09:16.320
So make sure that this pulse with modulation designed you create once you measure that work you can

09:16.320 --> 09:17.330
verify that works.

09:17.340 --> 09:22.020
Everything else we want the other parts have created in different labs so it should just be kind of

09:22.020 --> 09:24.950
wire things together and getting it to go.

09:25.230 --> 09:30.570
And then another thing you can do is take all our stuff from the previous lab such as the counter and

09:30.570 --> 09:36.450
the Nexus 7 segment display and see if you can put those together to get it where when you push a button

09:36.480 --> 09:40.890
you can get the results to display on the 7:7 displays.

09:41.010 --> 09:46.260
And once you get those two parts done at that point it should be relatively easy for you just kind of

09:46.740 --> 09:52.330
wire the thing together and use the references I gave you in previous lectures to figure it all out.

09:54.430 --> 10:03.250
Here you see a file I give you the pin mappings are you've got your ADD right here you can see on the

10:03.250 --> 10:09.370
far left that switch if you have a high or low is going to dictate whether you're adding or subtracting

10:09.850 --> 10:16.390
values and then your switch on the far right enables your pulse with modulation output.

10:16.420 --> 10:22.840
So if you could give that a logic high your pulse modulation output will go to zero if you get a logic

10:22.840 --> 10:23.500
one.

10:23.530 --> 10:29.220
It'll output whatever value you have and resolution register and then you're sent out.

10:29.270 --> 10:32.170
There's going to be the 8 bit

10:35.260 --> 10:41.150
8 bits of resolution you have in the resolution or register those we map to the seven Sigma display.

10:41.200 --> 10:42.930
As you can see circuit here.

10:43.150 --> 10:48.460
And then you've got the two buttons there that start reset buttons.

10:48.640 --> 10:55.000
If you click on those as they're going to add different values such as ones or one or five when you

10:55.000 --> 11:01.600
click on those you're going to see here your values go up and down based upon whichever one you click

11:02.020 --> 11:08.260
and then the top up there you can see you've got the pulse with modulation output and that you're going

11:08.260 --> 11:15.310
to want to wire directly into your RC servo pulse with modulation input when you look at the datasheet

11:15.370 --> 11:20.350
on the RC servo it's going to tell you what you need to connect your voltage waiting to connect the

11:20.350 --> 11:28.810
ground and what you need to connect to the your control your modulator input and the outcomes of this

11:28.810 --> 11:29.410
lab.

11:29.780 --> 11:37.030
Or that you should be able to understand how multiple VHDL designs can be reused in multiple VHDL designs

11:37.040 --> 11:39.290
which this is very useful.

11:39.290 --> 11:44.410
You'll come to find out that as we create a library visit Zeins you'll be using an array using them

11:44.830 --> 11:51.370
all over the place so it's definitely useful to keep these and have them handy and you'll become more

11:51.370 --> 11:57.470
comfortable with using model sim as you design your pulse with modulation component.

11:57.690 --> 12:01.770
You're pretty much having to come from the ground up on mass so you're going to use model assumed to

12:01.780 --> 12:07.050
verify and make sure everything's happening just as as you'd like.

12:07.600 --> 12:13.180
And also you got to understand how to control an RC servo motor using external components which is where

12:13.180 --> 12:16.900
we're using the transistors resistors and things like that.

12:16.900 --> 12:24.430
Take a 3.3 volt signal and convert it up to 5 volts signal and you're learning how to create a pulse

12:24.490 --> 12:27.720
with modulation design implementation in VHDL.

12:27.730 --> 12:29.140
There are other ways you can do this.

12:29.140 --> 12:38.080
You can use a microcontroller or you can use your own transistors and just a 555 timer and a whole slew

12:38.080 --> 12:38.710
of different ways.

12:38.710 --> 12:40.560
But this is one of the ways we can do it.

12:40.600 --> 12:42.520
And we're going to learn how.
