Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Moving Robo Straight.

Status
Not open for further replies.

Vikky

New Member
Hi all,

I am developing a robot which will move in any of the direction and can even turn 180degreee at the same place. The Robo will get the movement information from the remote control. All the things have been worked out and even we have build its first prototype successfully. The Robo is moving in the particular direction after getting the command.

The problem i stuck is, it is not going straight in line i.e if i givet he command to move forward and backward the robo is tilting from its path my 20 - 25 degree leading it to be at wrong palce.

I check the motor (DC geared ) and found that at the same voltage input the motors are moving at differen speed. I tried to control them with the PWM signal from the microcontroller and even succeded in it. But after some time when the battery start discharging aroung (10 - 15 min later ) it again tilts.

So need help to move the robot straight with minimum degree of tiltation.
 
hi,
Its close to impossible to control the steering by simply driving the motors with the same power.

You need some form of feedback from the driven wheels to actually give a signal to how far each wheel has turned.

A common solution is a slotted opto encoder disc on each driven wheel, that closes the control loop.
 
Last edited:
hi eric,

I ahve kept this option too in the initial phase of the design. But due the complexicities that arrived at the later stage of the project due to RF signal handling and controlling other parts i have to drop that one.

One thing i came across is the controll via a voltage regulator. The regulator would never supply voltage more than adjusted at the factory. The reference would be the speed of the slow motor. I have even tested it on the breadboard. But these regulators would be controlled from the H-Bridge since the robo have to move or turn in any direction. The 0 output of H-Birdge does provide the ground to the other pin of the motor.

Need review on this method if it seems to correct.
 
This is not as good as Eric's suggestion about using closed loop speed control, but if you feed both motors each with its own regulated voltage you can get it to run quite straight at all battery voltages.

One typical fix is to use 2 LM317 adjustable voltage regulators, and 2 trimpots to set the 2 voltages. You can put the regulators before the 2 hbridges.

I've also seen some people get useable results just putting a resistor in series with the fast motor, which works better than I would have thought.
 
Last edited:
Can you please post the block daigram of the system?? i.e, how to connect the voltage regulator and the H-Birge. Becous i tried myself earlier and end at moving the motors in one direction only, not in the other direction.
 
Can you please post the block daigram of the system?? i.e, how to connect the voltage regulator and the H-Birge. Becous i tried myself earlier and end at moving the motors in one direction only, not in the other direction.

hi,
Post the circuit of the way you had it connected, we can perhaps suggest ways of fixing it.:)

I also expect you want to be able to turn the 'vehicle' sometimes as well as hold a straight line.?
 
Here i am posting the motor control part of the schematic.

The H driver used is MCP17C724.
 

Attachments

  • Robo..pdf
    7.6 KB · Views: 401
Here i am posting the motor control part of the schematic.

The H driver used is MCP17C724.

hi,
Consider if the upper LM317 is ON, supplying current to the motor, are you expecting the lower LM317 to sink the motor current, it will not work.

What is the 'H' driver circuit.? thats shown on the leftside?
 
The H-Driver circuit is very simple.

The IC MCP17C724 is used as per given in datasheet of it and its input terminals are connected to microcontroller unit turning them either high or low according to the instruction received.
 
The H-Driver circuit is very simple.

The IC MCP17C724 is used as per given in datasheet of it and its input terminals are connected to microcontroller unit turning them either high or low according to the instruction received.

hi,
Downloaded the datasheet for the H.

Its already a 400mA motor driver, whats the purpose of the two LM317's.
You cannot use the H driver and LM317 in this configuration.

Do you have you have one or two motors on the vehicle.?:)
 
The robo is consisting of 2 motors.

Each motor drive either left or right wheel. My specification of the design says that the Robo should turn either left or right my 90 degree without / minimal change in its initial position. Even it should turn 180 degree at the same place. For achieving this i have make one motor running in forward direction and other in the opposite of the previous one.

The two LM317 is used because the motor should work in both the direction and should make the Robo travel straight. So for the forward direction one LM317 will control the voltage across the motor and in the reverse direction the other.

If you have any other better option with minimal electronics kindly let me know. Even we are at a stage to respin our PCB due to RF signal problem.
 
The robo is consisting of 2 motors.

Each motor drive either left or right wheel. My specification of the design says that the Robo should turn either left or right my 90 degree without / minimal change in its initial position. Even it should turn 180 degree at the same place. For achieving this i have make one motor running in forward direction and other in the opposite of the previous one.

The two LM317 is used because the motor should work in both the direction and should make the Robo travel straight. So for the forward direction one LM317 will control the voltage across the motor and in the reverse direction the other.

If you have any other better option with minimal electronics kindly let me know. Even we are at a stage to respin our PCB due to RF signal problem.

Hi,
I believe that Roman's [RB] suggestion of using two LM317's, was to place them BEFORE the H Bridge drivers
and so each H Bridge will have its own regulator.

I still consider the only way, as you also want to steer the vehicle, is to use a wheel rotational sensor on both driven wheels.
 
Last edited:
Yah,

I even tried that method too. The problem is that the H driver is using two Vcc input. One for working the H driver IC itself and other to pass on the laod connected. So if i connect the LM317 before the H driver all the output of the H-driver get the same voltage leading to the same problem of tilting from its path.

I would like to have system which can provide A voltage to motor 1 and B Voltage to motor2. (Where A != B)
 
Yah,

I even tried that method too. The problem is that the H driver is using two Vcc input. One for working the H driver IC itself and other to pass on the laod connected. So if i connect the LM317 before the H driver all the output of the H-driver get the same voltage leading to the same problem of tilting from its path.

I would like to have system which can provide A voltage to motor 1 and B Voltage to motor2. (Where A != B)

Hi,
The reason for using a H Bridge for each of the two driven wheels, is so that you can vary the drive current to each motor in order to move in the direction intended, also by using PWM to control the speed of wheel rotation the direction can be controlled.

In order to control the direction you must have a closed loop.
ie: sensing of the driven wheels rotation.
OR
Do you intend to manually control the vehicles direction by eye.??
 
I am controlling the movement on the time basis i.e. if command A is received then the motor 1 and motor2 will move in particular direction for a fixed amount of time.

This time is been contolled by the timer inside the microcontroller which will stop the signal to the H-driver after the terminal count has been achived.
 
As already suggested, you can't move it straight unless you have some kind of positional feedback.

An easier 'solution' is to use stepper motors, which will give you a far better straight line - but even that isn't perfect, any slippage on the ground will make it veer off course.
 
If you have to pen point your target use a beacon
As for at the wheel or axle good ideal but you still need to see if the motor turned
They make motor controllers that have feedback built in
They use them in copiers I have saved about 20 motors most use a encoder disk on one end of the motor

Oh Nigel the robot wheels may be rolling and you need to brake
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top