Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How code 90 degree turn for a line maze solving robot?

Status
Not open for further replies.

Anical

Newbie level 6
Joined
Jun 29, 2015
Messages
13
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
133
I am building a robot which follows a black line on a white surface to solve user defined and re configurable maze. I have decided to go with

Micro-controller: Arduino Uno
Algorithm: Left-priority Wall Follower
Motors: 2 servo motor
Sensors: IR sensors

I am having difficulty with writing a code for 90 degree turn. I can't get a clear idea on how to write it. Can anyone help me?

P.S.: As i am using Arduino Uno, my coding language would be Arduino C. I am not professional with it but i can survive it as its my first time with an Arduino product. Thank you in advance. :)
 

Hi

It depends on the distance of both driven wheels.
Consider it as the radius. If one wheel makes (Pi x distance) more movement than the other it should give a 90 degree turn.
(If I calculated right)
The easiest way is to stop one wheel and only move the other wheel.

Klaus
 

Or if the wheels are on the geometric center, turn them in opposite directions and it should rotate on center. This won't work if the drive wheels are fore or aft of center.
 

Re: How to code 90 degree turn for a line maze solving robot?

Hi

It depends on the distance of both driven wheels.
Consider it as the radius. If one wheel makes (Pi x distance) more movement than the other it should give a 90 degree turn.
(If I calculated right)
The easiest way is to stop one wheel and only move the other wheel.

Klaus

When i stop one wheel and move only the other wheel, then the bot doesn't come to the same position. It gets shifted or diverted from the line.

There is an attachment where i have drawn a rough sketch on where the wheels and the sensors would be.

How would the bot know that it has completed 90 or 180 degrees turn?
The things i brain stormed about are in the attachment too.
 

Attachments

  • Ideas - Copy.pdf
    71.7 KB · Views: 105

Hi,

When i stop one wheel and move only the other wheel, then the bot doesn't come to the same position. It gets shifted or diverted from the line.
There is no "same position" when turned 90 degrees.

The math that I gave should be correct
Did you test it?

Code:
How would the bot know that it has completed 90 or 180 degrees turn?
The writer of the software should know... not the bot.

Moving two wheels is math and physics.

Klaus
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top