Arduino robot STRAIGHT Driving

Hi everyone. I am trying to drive an arduino controlled autonomous robot (REX 2WD) for predetermined path as in the figure attached. robot needs to stop at every square (50 cm apart)

I am trying to achieve straight driving such that robot does not deviate. so here are my questions:

1: I consider using MPU6050 gyro&acc. and a P contoller for straight steering as in Making a 2WD Arduino Vehicle Drive Straight - Hackster.io . Do you think that would be useful?

2: Well, I need turns, so how can ı make these intetional turns, after the turn how can ı use gyro

3: my advisor suggests me to use encoder. However, i have no experince, two disc encoder, and one rotary encoder. Would encoders be more feasible solution?

4: I consider usin ultrasonic distance sensors to correct the position before turns such that the robot is not outside the playing field. How can i employ these

5: any other suggestion that makes the project easier.

6: if i use atmel avr C language that would be awesome

Please post a link to the REX 2WD robot product page.

If you can get and mount motors with encoders, maybe something like this, then it is very simple to program the robot to drive straight.

Two motors. Measure the difference in distance each motor travels for a given period to be used to calculate the steering error when both are commanded forward at same rate.

Three ways:

  1. Command one motor forward and the other motor backwards (center of drive remains constant)
  2. Command one motor to stop and the other motor forward (arc formed about stopped wheel, center of drive half "car" length "high")
  3. Command one motor to stop and the other motor backwards (center of drive half "car" length "low")

This measures the true travel of each wheel/motor by counting notches in the disc, so you know how many "slices of pie" your wheel has travelled.

What if you are in an open area? (answer: no return echo)

Don't assume two motors will behave exactly the same. Do a lot of physical measurements and trials, and make your system provide lots of useful feedback to be re-used inside the process before moving the vehicle.

Lot's of "Rex" out there, but none rex-on-two-wheels.. maybe ROS? Is this the robot?

Maybe you could use mecanum wheels?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.