Loading...
Hello, my name is Mrs. Holborow and welcome to Computing.
I'm so pleased you've decided to join me for the lesson today.
I'm really excited about today's lesson because in today's lesson, we're going to be building and testing a buggy chassis.
Welcome to today's lesson from the unit, Using Physical Computing to Create a Robot Buggy.
This lesson is called Chassis Design and Build, and by the end of today's lesson, you'll be able to build and test a buggy chassis.
Shall we make a start? We will be exploring these keywords in today's lesson.
Let's take a look at them now.
Chassis.
Chassis, a base frame or structure that supports and holds components.
Strong.
Strong, able to withstand force, pressure, or wear.
Visual inspection.
Visual inspection, looking at something carefully to see if you can find any problems. Look out for these keywords throughout today's lesson.
Today's lesson is split into two sections.
We'll start by building a buggy chassis and then we'll move on to test a buggy chassis.
Let's start by building our chassis.
Sofia says, "I have two motors connected to a motor controller and the Pico microcontroller.
There are lots of wires and components.
How do we hold them all together in a buggy, Alex?" That's a really good question, Sofia.
Let's see if Alex has a response.
Alex says, "I think we need to design and build a chassis." I think you're right, Alex.
A chassis is the mainframe or base of a vehicle.
It holds the component parts together like the wheels, motors, battery, and electronics.
In a robot buggy, the chassis should be strong enough to hold all of the components.
It needs to withstand movement, bumps, and vibrations without bending or breaking.
A weak chassis can cause parts to shift, fall off or get damaged during use.
A chassis should also be designed to be lightweight.
A lightweight chassis will help the buggy move faster and use less power from the battery.
When designing and building a chassis, you must find a balance between weight and strength.
Alex says, "I'm not sure what materials to use for the chassis." Can you think of any materials which might be suitable? Maybe pause the video here whilst you have a think.
A chassis could be made from a number of suitable materials, such as cardboard, plastic, metal, or wood.
Sofia says, "Those materials sound great, but if I want to test out my buggy first to make sure it works, I can always make a second improved version of the buggy." That's a really good idea, Sofia.
Maybe we can design a trial run.
Before buying and using new materials, it's a good idea to test your idea works by junk modelling.
Alex says, "What is junk modelling?" Junk modelling is a low cost and environmentally-friendly way to test and make models or prototypes.
Recycled materials like egg boxes, plastic containers, straws, bottle caps, and recycled card can be reused when junk modelling.
This means that fewer new materials need to be brought and reduces the use of energy and raw materials.
Sofia says, "How will we hold the components securely onto the chassis?" Clips, clamps, glue, tape, Velcro and elastic bands could all be used.
Whatever method you use, try to think about which method is most suited to your buggy and would secure the components the best.
Time to check your understanding, I have a true or false statement for you.
In a robot buggy, the chassis should be strong enough to hold all of the components.
Is this true or false? Pause the video whilst you have a think.
Did you say true? Yes, we need the chassis to hold all of the components of our buggy.
Alex says, "I only have motors for the two rear wheels.
What could I do for the front of the buggy?" Do you have any ideas about what Alex could do? Maybe pause the video whilst you have a think.
Without support at the front of the buggy, the chassis would drag on the floor and stop the buggy from moving properly.
Alex says, "I've added a smooth ping pong ball underneath to support the front of the chassis." That was a really good solution, Alex.
Well done.
Did you think of anything different? A wheel or some other smooth surface like a ping pong ball can stop the chassis dragging and help the buggy move around.
Whatever you choose to support the front of your buggy chassis, make sure it's smooth enough not to drag on the floor and has no sharp edges.
Time to check your understanding.
I have a question for you.
Junk modelling is, A, a low cost and environmentally friendly way to model prototypes out of recycled or reused materials.
B, not used in modelling as the quality isn't very good.
Or C, about using new raw materials.
Pause the video whilst you think about the correct answer.
Did you select A? Of course, well done.
Junk modelling is a low-cost and environmentally-friendly way to model prototypes out of recycled or reused materials.
To build a buggy, select suitable material for your chassis and get all of your components ready.
In this example, we've got an egg box and we've got all of our components.
Check that you have all of the parts that you will need.
Next, place your motors inside the chassis and mark where you need to create the holes for the axles for the wheels to attach to.
Take extra care when cutting or making holes and ask for help if you need it.
Next, add some kind of wheel or smooth surface to the front of the chassis.
So in the picture, a wheel has been added, but this could be replaced with a ping pong ball or something else which is suitable.
The chassis should be strong enough to hold all of the components.
You may need to make the chassis stronger by adding extra supports or reinforcement materials before you test it.
In the example, the lid of the egg box needed to be secured in place with tape to make the chassis more rigid.
The buggy is ready to test once you are happy that the chassis is strong enough and all of your components are securely in place.
Time to check your understanding.
I have a question for you.
What is the main purpose of the chassis in a buggy? Is it A, to generate electricity? B, to control the motors? Or C, to hold and support all of the components? Pause the video whilst you have a think.
Did you select C? Well done.
The main purpose of the chassis is to hold and support all of the components.
True or false? The chassis can be made stronger by adding supports and reinforcing with extra materials.
Is this statement true or false? Pause the video whilst you have a think.
That's right, it's true.
Well done.
Okay, we are moving on to our first task of Task A, where you are going to actually build your buggy chassis.
If you can, follow the instructions in Task A to build your buggy chassis.
Remember, these instructions are provided as an additional resource for today's lesson.
Pause the video whilst you go and complete the task.
How did you get on? Did you manage to build your chassis? I'm sure you've built some excellent ideas.
Here's an example of the built chassis, but remember, yours is likely to look different because you may have used different junk modelling equipment.
Okay, so we've built a buggy chassis.
Let's now move on to test a buggy chassis.
Sofia says, "I'm really pleased with my buggy so far.
I'm looking forward to testing it.
What should I test first?" What do you think Sofia should test first? Maybe pause the video whilst you have a think.
There are many ways to test the buggy, but a good starting point is to do a visual inspection.
A visual inspection is when you look at something carefully to see if you can find any problems. On a buggy, you might look for things such as loose or misaligned wheels, components, wires and batteries.
A visual inspection can help you identify and fix errors before they become problems which are harder to fix.
Sofia says, "I noticed that one of the wheels is not in line on my buggy, so I adjusted the position." So you can see here we've got Sofia's before and after.
That was a really good spot on the visual inspection, because if we hadn't aligned the wheels, the robot buggy would probably go off in the wrong direction.
Once the visual inspection is complete, you can use test code to complete a functional test to see if the buggy works as expected.
To function well, the buggy should be able to move forward, move backward, turn left and right.
To move the buggy forward, both motors should be turned on in the forward direction.
So here's some example of some code to do that.
So on line 1, we have from machine import Pin and then on line 2, from utime.
Remember, that's useful for setting pauses and things like that.
On line 3, we have motor_right_fwd, forward, is equal to Pin(12, Pin.
OUT).
On line 4, motor_left_fwd=Pin(14, Pin.
OUT).
So we are using pins 12 and 14 for the left and right motors.
On line 6, we have motor_right_fwd.
high to turn that motor on, and on line 7, exactly the same, but this time with motor_left.
On line 8, we have utime.
sleep for three, which we'll turn the motor on for three seconds and then on line 9 and 10, we are setting those motors to low to turn them back off again.
So let's just recap.
On line 3 and 4, we are setting up the forward pin objects.
On line 6 and 7, we are turning on both motors.
On line 8, we are waiting for three seconds, and then on line 9 and 10, we are turning off both motors.
Sofia says, "The buggy worked.
It moved forward for three seconds." Oh, that's great, Sofia.
That must have been really exciting.
To move the buggy backwards, both motors should be turned on in the backwards direction.
Let's have a look at this code.
So we are setting bwd pin objects to 13 and 15.
So unlike the previous example where we used fwd, we are using bwd for backwards.
We are turning on both the motors, just like we did before.
We are waiting for three seconds and then we are turning off both motors.
Alex says, "It worked going backwards too." That's great, Alex.
Well done.
Sofia says, "The buggy worked well in both the forward and backwards directions." That's really great.
That's exactly how we wanted it to work.
Alex says, "How do we get the buggy to turn though?" Hmm.
Can you think about how we might get the buggy to turn? Maybe pause the video whilst you have a think.
You can get the buggy to turn or spin by running the motors in the opposite direction to each other.
So let's have a look at this code in a bit more detail.
So on line 7 and 8, we are turning on both motors but in the opposite directions.
So we are turning the right motor forward and the left motor backwards.
To turn the buggy left or anti-clockwise, the left motor should rotate backwards and the right motor forwards.
So we have motor_right_fwd.
high and then motor_left_bwd.
high.
So the left rotates backwards and the right rotates forwards.
To turn the buggy in the opposite direction clockwise, the left motor should rotate forward and the right motor backwards.
So you can see we've just flipped the code around slightly.
Sofia says, "My buggy spins in circles for three seconds.
How do I get it to turn by a smaller amount?" Alex says, "I think we can adjust the amount the buggy turns by changing the value in sleep." That's a really good idea, Alex.
Well done.
To turn the buggy by smaller amounts, you can adjust the amount of time the motors are rotating.
So you can see here on line 9, we've adjusted the three to 0.
5.
By changing the time the motors are running to 0.
5, my buggy rotates about 90 degrees or a quarter turn.
So we can see Sofia's buggy in the original position and in its final position after the 0.
5 seconds.
Time to check your understanding.
Which line of code turns a motor off? Is it A, B, or C? Look carefully at the code and think about your answer.
Did you spot it? Well done.
Line C would turn the motor off.
So motor_left_fwd.
low.
Remember,.
high will turn the motor on.
I have a true or false statement for you.
A buggy can be turned by running the wheel motors in opposite directions to each other.
Is this true or false? Pause the video whilst you have a think.
That's right, it's true.
Well done.
Okay, we are moving on to our final task of today's lesson, Task B.
If you can, follow the instructions in Task B to test your buggy chassis.
Remember, the instructions are provided as an additional resource for today's lesson.
Pause the video whilst you go and test your buggy chassis.
How did you get on? Did you manage to test your buggy chassis? I'm sure you've got it working.
Well done.
Here, we have some code which shows how to move the buggy forward and move the buggy backward.
If you haven't quite got your buggy chassis working correctly, then maybe pause the video and look carefully at your code and make any corrections.
Now, we have the code to turn the buggy right, which is clockwise and turn the buggy left, which is anti-clockwise.
Again, if you didn't quite get your buggy chassis turning, maybe look carefully at the code and make any corrections that you need to.
Now, we have the code which has reduced the amount the buggy turns to 0.
5 seconds.
Remember, we don't want the buggy to spin, we just want it to turn slightly.
So, you can see, on line 9, we have utime.
sleep(0.
5).
Okay, we've come to the end of today's lesson, Chassis Design and Build.
I hope you've enjoyed today's lesson because I'm sure you've done a fantastic job.
Let's summarise what we've learned together in today's lesson.
A chassis provides structural support for all the components of a buggy.
A chassis must be strong enough to enable a buggy to function reliably.
Visual inspections can help identify and fix issues before they become problems that are harder to fix.
Motors can be controlled through code to change the direction of a buggy.
I hope you enjoyed the lesson and I hope you'll join me again soon.
Bye.