Introduction: How to Make a Lego Delivery Truck With Two Sensors Using EV3

I wanted to make a Robot similar to a Delivery Truck. Looking through different sites and builds, I could get a reference and make a build similar to it. I came across Builderdude35 and also found it on the website Sirius EV3 which is what my creation is based on. This will guide you through the steps to build a similar but different build that is your own!

If you want to have a look at the original design I was inspired by here it is:

Downloads – Builderdude35

then scroll down until you reach Sirius (FLL Robot).

Supplies

5 x Cable, Connector, 20cm for NXT

2 x Technic Beam

1 x 11.5 Double Bent Thick

2 x Technic Beam 1 x 15 Thick

2 x Technic Beam 1 x 2 Thick with Pin Hole and Axle Hole

2 x Technic Beam 1 x 3 Thick

2 x Technic Beam 1 x 5 Thick

2 x Technic Beam 1 x 7 Thick

2 x Technic Beam 1 x 9 Thick

4 x Technic Beam 3 x 5 L-Shape Thick

42 x Technic Pin with Friction Ridges Lengthwise and Center Slots

6 x Technic Pin with Friction Ridges Lengthwise and Towball

2 x Tyre 94.2 x 22 Motorcycle Racing Tread, Narrow

17 x Technic Axle Pin with Friction Ridges Lengthwise

16 x Technic Pin Long with Friction Ridges Lengthwise, 2 Center Slots

2 x Technic Axle 8 with Stop

2 x Wheel 75 x 17 Motorcycle

6 x Technic Axle 3

1 x Technic Axle 5

1 x Technic Axle 7

1 x Technic Axle 9

1 x Technic Axle Towball

1 x Technic Beam 5 x 11 Open Center Frame Thick

1 x Technic Beam Frame 5 x 7 Open Center Thick

2 x Technic Gear 16 Tooth Reinforced [New Style]

2 x Technic Pin Double with Axle Hole

2 x Technic Pin Long with Friction Ridges Lengthwise and Stop Bush [Ridge Near Rim]

4 x Technic Wedge Belt Wheel [aka Pulley]

2 x Wheel 11 x 8 with Center Groove

5 x Technic Axle 2 Notched

2 x Technic Axle Connector Smooth [with x Hole + Orientation]

2 x Technic Axle and Pin Connector Angled #1

4 x Technic Axle and Pin Connector Angled #2 - 180°

2 x Technic Axle and Pin Connector Angled #6 - 90°

3 x Technic Axle and Pin Connector Perpendicular

7 x Technic Axle and Pin Connector Perpendicular 3L with 2 Pin Holes

4 x Technic Axle and Pin Connector Perpendicular 3L with Centre Pin Hole

4 x Technic Axle and Pin Connector Perpendicular Double Split

1 x Technic Beam 1 x 11 Thick 2 x Technic Bush

1 x Technic Pin Long without Friction Ridges

1 x Hub, EV3 Brick [Complete Assembly]

2 x Motor, Large, EV3 with White Case

1 x Motor, Medium, EV3 with White Case

2 x Sensor, Color, EV3 with White Case

4 x Technic Bush 1/2 Smooth with Axle Hole Semi-Reduced

There are about 45 parts, with 181 total quantities. The approximate cost of these parts is A$73.77 You can if needed replace the 2 x Wheel 11 x 8 with Centre Groove and 1 x Technic Pin Long without Friction Ridges with a Caster wheel EV3, this depends on what you have! Also 2 extra x Technic Bush 1/2 Smooth with Axle Hole Semi-Reduced and 1 extra Technic Axle 9 or 7 as this is due to some changes I made, this is not included in the cost!

Step 1: Instructions

How to download the instructions to create and build your design:

Step 1: Download the build instructions from this link:

https://rebrickable.com/external/view/?url=http%3A...

If that doesn’t work go to the website Rebrickable and search MOC - "Sirius" EV3 Robot for FLL. This can be opened then by LEGO Digital Designer.

Then you can get started from there!

Step 2: Making Your Creation

After you get the instruction and materials you are able to start building your creation though I made some changes which will be explained in Step 3.

Also remember that when building it can get quite finicky and you may need to move some parts to fix others, but in the end it came together. One noticeable change was it was very close to the ground which meant it had a hard time moving. At least for me it did.

Following the instructions should be easy so good luck.

Step 3: Changes in the Original Instructions.

I used different parts compared to the building instructions as I didn't have the parts needed or had too little of the material which was needed. This is what made mine different from the Idea I was creating. In the images the photo with the brown or wood floor is one of the other versions as for the photo with the white floor you can see the Caster wheel I added.

Parts changed were:

I added a Caster Wheel on the back where you can go with the original design but I didn't have the pieces so I added the Caster Wheel but you can do either.

I moved the sensors up and this was done simply with as said in materials, 2 extra x Technic Bush 1/2 Smooth with Axle Hole Semi-Reduced and 1 extra Technic Axle 9 or 7, I put it threw the sensors and then moved it, this added support to the sensor and moved them up so they weren't as close to the ground.

If they are too close to the ground it can affect the amount of reflected light which impacts the way it works, and it also helped with the extra edition of the caster wheel.

Make sure the wires are in the right place as well. The sensors should be in Left in 3 and Right in 4 (depending what way you look at it, It should be in a parallel line.) Then the Motors should be the same in a Parallel line. There is one extra wire and that can go into C.

I also removed a part where the Technic Axle and Pin Connector Perpendicular 3L with Centre Pin Hole or Black item with the Technic Axle on both sides, as it mainly was dragging on the floor.

I removed the parts on the opposite side of the wheel which were on the brick and I had no use for them and also didn't have the pieces, but they didn't make any difference from the build.

Step 4: Check It Is Up to Standard!

The wheel can move without hitting anything, it isn't dragging against the floor. The sensors aren't too close to the ground.

Mainly for the build besides the wheel not to be touching the ground. Checking if the wires are in the right place.

A good way to test out the sensors to see if they are up to standard is if the sensor is on black it should be below the number chosen, I choose 15

Plug the Robot into your computer and navigate to the port view at the bottom right. This shows what the input and outputs are of the sensors are in real time.

Get a blank piece of paper and draw a black line down the center of it, hover one of both sensors over the white paper and confirm the reading are above the value you set in the program. Then move each sensor over the black and confirm it drop down the number below the one you have set in the program.

Step 5: Programming With EV3 Software.

If you do not already have the software you can get it by downloading it. Search Download the EV3 Lab Software v. 1.4.5. The default when installing the software should be teacher edition which is preferred for this project and not Student edition. Make sure it is 1.4.5 and not 1.5.3 or something along that line.

As I was looking through multiple sites to see if I could find a program design with two sensors so I could get the build to follow the line, I came across a program but the only problem was it is made for one sensor not two which is what I need. Then looking some more I figured I would do it myself.

I think this website which shows the basics is very helpful and helped me create the two sensor line follower we created. This was created by me and not copied from some website.

LEGO Mindstorms EV3 Programming Basics (wa.gov).

Builderdude35 has a video about Line following/follower for similar builds: PID Line Follower for EV3 - The Ultimate Line Follower! (I didn't use PID, and make sure you don't get confused with EV3 G unless that is what you are using.)

How to Make a 2 Sensor Proportional Line Follower in EV3-G

This didn't help me with my build but it may help you if you check it out!

Step 6: Programming the Sensors

The Program is simple. If the left sensor is on white then the left wheel will turn 10 degrees and it's the same on the other side if the right sensor is on white then it will also turn the right wheel 10 degrees.

If the left sensor is on black then the left wheel will stop and the right sensor would tell the right wheel to turn 10 degrees until they are both on white and this will allow it to continually follow the black line. The loop is there because then it will repeat and not go for one rotation then stop.

How to create it is to create a new project and add a loop so it can go for multiple rotations, After adding a switch which should be in the orange tab. Once you have the switch you will need to change it by clicking on the switch icon --> Colour sensor --> Compare --> Reflected Light Intensity.

Next is adding 2 Large Motors to the switch then the next step is to duplicate this in a second step. I would of like to have run these in parallel but was unable to work out a way to do this. Running them in parallel I feel would of made the robot run more smoothly.

Changing the numbers and letters, first figure out what Letters you are using on your brick. I am using A and D for the motors.

The reason the numbers on the top two Large Motors are 10 is because it shows that in each switch there is a Large Motor for Black colour and white Colour and the reason for it being 10 is it saying if it is on white then move 10 degree and if it is on black then stop and move 0 degrees. The -50 on each is how much power, which controls the speed the wheel turns at, This should stay consistent with the rest. In simple terms it means that each switch is a Large Motor and on both sides if on white turn 10 degrees and if on black then stop. This is also the reason why one side or one switch is A and the other switch is D. The program can't work with only one switch, that changes if you are only doing a one sensor program but that is not the point.

I also included the one sensor program in an image also with the image of the program I created to use two sensors.

The image which looks like it has been doubled is the one I created and the other is featured in LEGO Mindstorms EV3 Programming Basics (wa.gov). I already mentioned this website.

Step 7: Connect the Build With the Code!

After all the programming has downloaded and then has been tested it should be done and you now have a How to Make a Lego Delivery Truck With Two Sensors Using EV3!

!Then Enjoy having your new creation! CONGRATS