avalon102

New to coding, need help with the EV3 robot

Recommended Posts

 

Hello, I was curious if someone could help me with a task. My teacher told me that this was my task for the EV3 robot:

Quote

Assemble the codeblocks and make sure the logic is correct, make sure all the reset info is there for each part (”Reset angle”, ”Reset ultrasonic sensor”, etc.) examine whether the Robot is operating and is functioning as it should, check that the wheels don't slip, and so on.

 

This is the task that I was assigned for the project that I am doing with my group, and I have no past experience coding before, but the rest of the group does, so I am in a difficult position. I would like some help from any of you guys. Could someone give me their tips and estimation of how difficult my task will be, and links and other useful stuff to know? I don't want to disappoint my group and give them more stuff to do.

Below you will find the entire project task, just to give you an overview of what should be done.

  • The project task is to build a Lego robot that will deliver a book. The robot will be driving in a corridor. The width of the corridor is at least 1.2 m and at most 12 m.

    • The walls are mainly smooth, but there may be electrical outlets, glazed areas, skirting boards and other things that cause the width to vary. However, the width is always within the given minimum and maximum dimensions.

  • The robot must start approx. 0.3 m from a wall in a corridor in a random direction (i.e. in a direction that you do not get to choose yourself). The robot must be able to carry out four different tasks with the following specifications:

    • Deliver a package to a location 2m to the right along the wall, 0 - 0.3m from the wall.

    • Deliver a package to a location 2m to the left along the wall, 0 - 0.3m from the wall.

    • Deliver a package to a location 2m to the right, across the corridor, 0 - 0.3m from the wall on the other side of the corridor.

    • Deliver a package to a location 2m to the left, across the corridor, 0 - 0.3m from the wall on the other side of the corridor.

This picture shows the assignment in an overview (in Swedish).

  • After completed delivery, the robot should return to the starting location, so that the robot is ready for the next delivery.

  • Just before each new mission starts, someone from the project group gets to place the package on the robot. The package then follows the robot to the right destination according to the mission. At the destination, the robot must unload the package and leave it on the floor.

Edited by avalon102

Share this post


Link to post
Share on other sites
35 minutes ago, Carsten Svendsen said:

Have a look here for code block functions: https://racingbrick.com/powered-up-code-block-guide-full/

The robot is an EV3 !

 

@avalon102 is the robot already there? With all motors an sensors?

Then you have to seperate it into different tasks:

i.E. Move through the corridor witthout getting stick, as a first substask.

How would you describe this in words?

- Start driving

- check distance to walls

- if to near : correcct direction

What does that mean:

15 hours ago, avalon102 said:

The package then follows the robot to the right

This is hard to solve

16 hours ago, avalon102 said:

After completed delivery, the robot should return to the starting location,

Without any knowledge about set physical setup it is nearly impossible to help.

16 hours ago, avalon102 said:

”Reset ultrasonic sensor”,

Never done that, what does it mean?

Which programm do you use?

Share this post


Link to post
Share on other sites

You will need to start with a robot design first. 2motors for tank steering/driving, 1motor for unloading. An ultrasonic sensor to measure distance to the wall (preferred to have 2 of them, 1 on the right side, 1 on the left). And if possible a sensor at the front to detect the wall when crossing.

You will need to make a flow chart, with all needed tasks to be done by the robot, like this;

At the start you don't know the direction the robot is at so;

  • Part 1: Finding where you're at:
    • Tank steer around untill you have visibility <50cm on the right side sensor (it should have started within 30cm of a wall, so you will be able to find it, and you'll know it's now on your right side.
  • Part 2: Start driving to position 1:
    • Now start driving for 2 meters straight on, but have a little correction depending on the right side distance sensor. if distance >30cm steer little right, if <10 steer little left. This should keep it alongside the wall.
    • When finished the 2meter, tank steer 180° and drop off the package.
    • Now use the left side sensor to drive back 2m and have a new book loaded.
  • Part 3: Drive to pos2:
    • Now keep using the left side sensor to stay within 30cm, and drive for 2m more, turn 180° and dropoff package 2.
    • Return 2m and pickup load 3.
  • Part 4: Drive to pos3:
    • Tank steer 90° at the start location, and back up into the wall (need a flat rearend for this), this should straigthen out the robot.
    • Drive in a straight line without compensation to cross the potentially large distance.
    • When the wall is found at the other side, rotate 90° and go to the dropoff loc.
  • Part 5: etcetc.

 

Start with the robot making, and test each 'part' of the flowchart one by one. Find out howlong you need to drive for 1 meter. Find out how much you need to tanksteer for 90° etc.

Share this post


Link to post
Share on other sites

Anyone know how this MINDSTORMS robot (pictures in the link) can be modified for increased stability for the task?

Right now the book is too heavy for the motors. It was moving very slowly. That's probably because of the gears, right? Could one solution be to swap the place of the 40-tooth gear and the 8-tooth gear, so that the 8-tooth one is connected to the motor? Because we'd then be using a gear ratio of 8/40 = 1/5, giving us a much stronger torque.

 

Share this post


Link to post
Share on other sites

Maybe if I swap the gears so that the small gear is driving the large gear? That thing will then be able to move mountains (but slowly), or experiment with different gears other than the 8t and 40t. 8:40 is one of the most extreme ratios one could choose in technic, possibly there are many alternatives available to us by choosing different gears.

http://gears.sariel.pl/

Share this post


Link to post
Share on other sites

The mounting of the motors seems unstable, and upgearing with a heavy robot should not be done. Like you said yourself, use direct drive or downgear if the torque is still not enough.

 

Make sure to attach motors in a firm position so they do not move under load (you will lose accuracy).

A 3wheeled robot will potentially tip over if the wheelbase is not wide enough and to short.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.