How to use LEGO Mindstorms Clutch
A clutch is a mechanical device that is used for engaging or disengaging power transmission. Now we will see how we can make such a device using LEGO.
- #908
- 30 Jul 2018
A clutch is a mechanical device that is used for engaging or disengaging power transmission. Now we will see how we can make such a device using LEGO.
As we are already off the season we decided to look back at the competition. First, we will take a look at the working solution for FIRST LEGO League 2017 Manhole Cover. This was generally accepted as one of the most difficult missions during the competition. We've built a single attachment to accomplish it.
(we are releasing the video without explanations and will add the explanations later)
Your first task follows, and we will explain how to use tasks.
We are about to connect the whole car with the lights and motors to the controller. Let's recap to know what is ahead of us, what would the process be and what is the end result of the next couple of sections when at the end we have a car controlled by the phone
The power in the car comes from the batteries. The batteries are in a batteries holder. About 5 of them. Two cables are connected to the batteries holder. It is very important to identify which of those cables is the plus and which is the minus.
We would start connecting a lot of things to the Raspberry Pi. It will be good if we could have some way of referring to the pins on the Raspberry Pi. For example like Pin 5 or Pin 26. Luckily there is such a way.
In the set for the Perfect Course, you have 3 different type of cables. They are called Breadboard Jumper Cables. We would need to use them to extend the default cables on the car and to connect the car components to our new controller
We need to extend the cables to be able to connect them to our Raspberry PI. We must also add new connectors at the end of the cables.
Every electronics tutorial, book or course about Raspberry Pi or Arduino will use a motor driver. Very few of the courses will actually explain why do you need a Motor Driver, what is it for?
Give it a name and you will have power over it. I learned this from an MIT professor. So let's give the part of the car names. Then we could refer to them. Talk to them. Change them. Do all kinds of things with them. Give it a name and you will have power over it.
The course is designed to be used with almost every remote controlled car. The process of opening the car will be different for different cars but there are basic principles that you could follow.
With the set for the course, you also have an SD card. It is important that you understand why and how is the SD Card is used.
We've just plugged in the power bank in the Raspberry Pi controller. Has it started? Is it doing something? Why is it not moving? Simply put the raspberry power a small red diode and it just emits light. Well, it's on, but it will do nothing else.
Yes, we know. Starting with the phone when you have a toy car and a Raspberry Pi might seem strange, but this is why we do it.
We have two power sources (batteries) - one power source is for the controller, the Raspberry PI, and one power source is for the motors. What is the separation between the power sources and why it exists? Why do we need two power sources? We need the different power sources because there is not enough power otherwise.
In the course, we are going to use the following components and hardware elements. It is important to know their names and what are they used for.
In the first module of the perfect STEM Course we will move fast, but not deep. We would explore a number of different areas of technical science like electronics, Linux, programming, mobile technologies, AI without getting into too many details. The goal is for us to arrive at a working Remote Control car controlled from the phone and to learn basic concepts on which we could extend.
This is a remote control car. Have fun with it before disassembling it.
We should multiply the error by a certain number and then add it to the steering of the LEGO Mindstorms Steering block. In this way, by changing the coefficient we change how much/fast should the proportional part influence the steering of the robot.
After we take each sample, we perform calculations and these calculations could take different time. It is important to know how much time does it take to perform the calculations. In this video tutorial, we would data log the time and plot the data.
Let's record the values of the Gyro Sensor while the robot is moving and is trying to keep its orientation straight. This is an interesting experiment and we will have to use file access to write the values to a file.
This video tutorial contains the final 2 programs for moving straight with a LEGO Mindstorms EV3 robot. The first program is for proportional compensation that just keeps the robot orientation straight, while the second program is for Integral compensation that returns the robot to the straight line when the robot makes a mistake.
Sometimes when we are working with sensors it is important that the time between two consecutive samples is the same. This will make each sample equally important and independent of how much time it took to take it. In this video tutorial, we would use the EV3-G timer block to make a "WaitForTick" program where the time between each sample of the EV3 Gyro takes exactly 0.02 seconds.
In this video tutorial, we would do a few experiments with the coefficients for the Integral compensation. There are actually two coefficients - "c" and "b"
This video tutorial is about understanding the "magic". In this video tutorial, we would conduct an experiment and will look at how exactly does the integral part of the PID algorithm compensate for the error that the LEGO Mindstorms EV3 robot makes.
The integral part "remembers" the errors that the robot has made in the past and we can compensate for those errors. This will make the robot return back to the line that we would like to keep it aligned.
This is where the confusion really comes. We are keeping the robot orientation straight while the robot moves, but at the end the, robot is not at the fiinal location that we would like it to be. The robot is still about 2-3 centimeters away after moving for about a meter.