Can you tell me why I\'m excited about this project? Do you know how cool this is? \"No Jay,\" I can hear you say, I sigh when you strengthen yourself for another excited explanation. \"Why don\'t you explain it to us? \"Well, let me stand up and calm down. I have had the idea of this project for most of the year, and I have been working actively, starting in August. Everything I \'ve recently posted, metal wheels, external interruptions, and my two debunking tutorials are all research I \'ve prepared for this project! On top of that, luckily some of the matches are open and are perfect for this project! So this is not only the result of a few months of work, but also the first time I submit the game! So, if you like this tutorial, or if you\'re a fan of the cheap robot series, consider voting for me! Of course, it\'s far less cool than the project itself! Shaft encoder and speed controller are complex things to build one from scratch ( Not to mention craft supplies) But I assure you that we can make things simple! Let\'s start! For more instructions on making cheap robots, check out the cheap robots range! For more things I do, you can check my profile page! For more information about Digilent or Digilent Makerspace, check out the Digilent blog! The simple answer is that they are a sensor that you can use to judge the speed at which the wheel of the robot rotates. When your motor or wheel rotates, the encoder sends high and low signal pulses to your robot. These pulses will become faster or slower depending on the speed at which the motor rotates. By timing the pulse, your robot knows how fast the motor rotates without having to guess! This is very important if you want to do very precise actions, and it is used everywhere. In fact, most of the motors in your printer at home have a shaft encoder. The problem is, they are not cheap! In order to carry out this precise measurement, the shaft encoder must usually be manufactured very precisely. Even the cheap shaft encoder of the robot kit often relies on specialized magnets and Hall effect sensors. You can build your own house cheap with infrastructure Red light, you can recycle the optical encoder from the old hardware in some very neat way, but I want my encoder to be closer than that. Yep! This is what you need! These supplies are the supplies for the metal wheel tutorial used in this tutorial. You also need the following: this is the case with the shaft encoder itself! When I explain how to actually use this thing, I will introduce wiring in the next tutorial. You will want to polish their rims before starting the metal wheel tutorial. This is actually a very important step and it will take a while to do it well. Even caps like the Snapple cap I\'m using have a thin layer of clear paint on them to prevent rust. View the second picture in this step. Can you see how deep the area I polish is? You don\'t want to polish until the entire edge is polished well like this. I suggest pulling a video on YouTube and taking some time to polish it carefully. After that, use the metal wheels of my cheap robot tutorial to get your wheels done! In this tutorial, don\'t worry about sticking the completed wheels to the motor shaft, because we will make more changes to the wheels before we finish. There are two ways to cut the tape for this step. My preferred method is to put a small piece of tape on my cutting board and use x- Acto cutting pieces. If you are not satisfied with this ( Or your parents won\'t let you use a knife) You can cut the pieces with scissors. The length of each tape should be only about 1/1/4 ( 6mm if you are using a more reasonable unit system). Cut three or four. I prefer four, but it\'s a bit difficult to put them all on my wheels. For this step, the length of each piece is not as important as the width, and the width should be the width of any tape you are using. This is good because it means that the width of each tape should be exactly the same. Once you have the tape, be careful to stick them to the edge of the wheel. Try to place them evenly, but it doesn\'t matter, so you can look at it directly. It is important to ensure that there is a large piece of bare metal between each tape. This will ensure the contact of our encoder sensor with the conductive wheel between the tape. It\'s also important to make sure your tape is fairly straight. This is because our encoder measures the width of each bar. ( That\'s why it\'s important that they have the same width. ) This is probably the most tedious step in the whole process. If you are young, you may want an adult to do it for you as it requires some very good manual dexterity. If you really want to do it yourself, take the time to be careful. I know that in order to make this step right, I have experienced a few springs myself. Slide your wheel onto your motor and use it to understand how high your contact spring must be ( Like the first picture). ( I would like to point out that in the first picture of this step, I actually did not compress the spring with my finger. I\'m just holding it so you can see the springs that are related to the wheels well. ) View the second picture in this step. Do you see a slight sharp angle on my spring? My goal is to make sure the spring is slightly bent down to reach the edge of the wheel. Also, I make sure my spring is slightly bent too far so that the tip is gently pressed on the edge of the wheel. This means that the spring will always be in contact with the wheel ( Even if the hole I hit fell off a little beforecenter). Once you know where to bend the spring, bend there with pliers. You may want to get the exact bending of this part with two pliers. Slide one end of a wire into the bottom of the contact spring. To do this, slide the wire into between the two coils of the spring and rotate until it is sandwiched between the flat coils at the end of the spring. If you do it right, the spring itself holds your wire when you weld it. I found the solder here very hot. If you have them, you can also use it to weld the head pins at the other end of the wire. I need to do this because I used too thick twisted wires to fit neatly into my breadboard. Finally, I glued the other of the two wires directly to the metal housing of the motor. This is important because the motor housing is electrically connected to the metal shaft and the metal shaft will also be connected to our metal wheel! At the same time, the wheel, shaft and housing are insulated from the inside of the motorworkings. This means that our motor housing provides us with a fixed and constant connection to the metal wheel! First, put an insulating tape on your motor housing. We just connected a wire directly to the housing, so we wanted to isolate our contact spring from the circuit. In this way, the connection will only be completed if the spring touches a bare metal part of the wheel. See how our coder works now? Before we glue anything, we want to know where our spring is going. Slide the wheel back to our motor and just keep the contact spring in place. Note that in the second picture, how does the tip of the spring come into contact with the wheel in the middle of the tape? Remember where the bottom of the contact spring will go because next you will want to put it back there. Remove the wheel because the next step will happen soon and we don\'t want it to get in our way. Apply a lot of glue to the motor housing (over the taped-up section). Then, use a pair of pliers to clamp the wire connected to the contact spring base (As shown in Figure 3) Place the contact spring firmly into the glue spot. Stay stable when it cools. After the glue cools, slide the wheel back and check the spring contact point again. As you can see in Figure 4, for my comfort, mine is a bit too close to an edge of the tape, so I made a small adjustment to the spring by stretching the spring. ( If the spring does not maintain contact with the edge of the wheel, you can also bend the spring slightly with pliers. ) Be very careful if you do this because you don\'t want to spoil the spring and have to start from scratch! Once you are satisfied with the way the spring touches the wheel, try connecting the motor to the battery. This way you can see the wheel spinning under the spring. Keep an eye on the tip of the spring and make sure it always touches the tape when passing through. This is the shaft encoder we finished! As you might have guessed, it\'s basically like a switch. When the wheel turns, the tape disconnects the connection between our two wires, and that\'s what we\'re going to feel. Because we know that the length of each tape is exactly the same, we can measure the break time of each tape, which tells us the speed of our motor! Neat right? But we\'re not done yet. Next, I will introduce how to control the speed of the motor using simple PID. Since this is done with something piecemeal that you can find around the house, we can\'t just use it and expect it to work perfectly right away. We need to apply some signal processing, similar to what I introduced in the debinginterrupt tutorial. This is my first time in the race so I hope you will consider voting for me! This is also the first part of a pair of I bles to complete this project, so please read my PID tutorial when it comes out! Thank you so much, I hope you enjoyed this!