Using a PC to control a robot buggy

Associate
Joined
29 Mar 2004
Posts
593
Location
Cambs, UK
Hi All,

I was surfing the internet the other day and came across a website where someone had created a robot that was being controlled by a pc. Sounded and looked cool I thought. So..

Ive been thinking about how to do it and I have come to a point where I am stuck. I know that you can get motors that can be controlled from a pc, so thats cool. What Im stuck with though is the front wheels. The rear driving wheels would be easy as its just forward or back, but how do you get a motor to control steering? This has baffled me.

Any ideas?

Cheers,

Edward
 
I helped my son with a project like this some time ago. We used a programmable pic chip to control the robot. For the steering, we used seperate motors on the rear wheels with a single swivel front wheel, a bit like a castor you find on furniture.
 
edwardcasbon1 said:
Hi All,

I was surfing the internet the other day and came across a website where someone had created a robot that was being controlled by a pc. Sounded and looked cool I thought. So..

Ive been thinking about how to do it and I have come to a point where I am stuck. I know that you can get motors that can be controlled from a pc, so thats cool. What Im stuck with though is the front wheels. The rear driving wheels would be easy as its just forward or back, but how do you get a motor to control steering? This has baffled me.

Any ideas?

Cheers,

Edward



Best to build a differential wheel drive system, just use 2 independent drive wheels to provide momentum. Differential power to the motors will turn the robot, like a tank. A castor ball at the back provides balance, and can be equiped with a hall-effect sensor to measure distance.
This has the great beenefiyt of making a holonomic vehicle which is much easier to control and navigate with. 2 drive + 2 steer wheels is a very bad design and makes life very complex when it comes to navigation.

To drive DC motors you will need somekind of Motor driver IC/ H-Bridge. The easiest way to control the motor driver IC is via a serial connection using the MAX32 chip to convert the TX/RX serial into TTL. USB interfaces can be used but are pricy, as can wireless.

I would equip the robot with a Microcontroller, PIC if you can afford the compiler, otherwise something like AVR microcontrollers are great. Then you can make the robot autonomous and connect sensors and more actuators.


Don't use SLA batteries, use NMh. Use a good Voltage regulator to avoid any nasty explosions. In addition some high and low caps in line with the DC motors helps smooth the voltages.



If you have any specific questions let me know. I'm starting a PhD in flying swarm robotics.
 
Last edited:
If you did want to use a car-like design, then use a servo on the front wheels. You can set an exact position with these and they hold a reasonable amount of torque.
 
How would I be able to use a servo for the steering?

Sorry, Im new to all this engineering stuff, any chance someone could explain what 'Motor driver IC/ H-Bridge', MAX32 chip to convert the TX/RX serial into TTL, PIC, AVR microcontrollers are please.

Thanks again.
 
edwardcasbon1 said:
How would I be able to use a servo for the steering?

Sorry, Im new to all this engineering stuff, any chance someone could explain what 'Motor driver IC/ H-Bridge', MAX32 chip to convert the TX/RX serial into TTL, PIC, AVR microcontrollers are please.

Thanks again.


With a servo you can specify an angle of rotation for the actuator arm, the arm will hold that position indefinitely and will have a certain strength (torque). CF a DC motor, where a certain voltage will rotate the axel at a certain speed (RPM) with a certain torque. Using a DC motor to, say hold a robotic arm at a certain position, requires a constant voltage, but this is suspectible to noise. This, in the end, requires complex PID control.

Motor Driver:
DC motors will be running at something like 12-48 volts, 1-8 amps and need a good power supply. The onboard computer of a robot, or the RC controller or the serial/USB/wireless controller typically runs at 5 volts with very low amps. There for you need something like a relay circuit to drive the motor. Typically you can use transistors. With a MOSFET transistor you can have a gate you can swith with logical voltages (0v or 5v for off/on), the transistor can then output high volts and high currents (24vs etc). The Motor driver also has to be able to reverse directions fotr backwards/forwards, and also provide protection against voltage spikes and high frequency noise from the DC motor. e.g. if the torque suddenly increases due to increased load then the motor will draw a lot more current which can cause damage, a large capacitor can be used to store this required charge. Small capacitors can reduce the noise. Together they form a bandwidth filter. Also importantly, to adjust the speeds of the DC motors you need to adjust the voltages. This isn't eeasy using digital signals (e.g., on/off, 24v/ov, highspeed/stopped). this is achieved via pulse-width modulation- adjusting the pulse width (time) adjust how much "average" voltage the DC motor recieve. Other things to conider is that DC motor may need more advanced forms of control in order to move the robot into an exact position. e.g. Proportional-Integral-Differential (PID) controller, feedback and feedforward control.

Hence DC motor driver range from £1-2000, depending on what it does and what power it can handle.



Serial Control/Max32:
One of the best ways to communicate with electronic devies is through serial connections. Many motor drivers, sensors and actuators, microcontrollers use serial communication. There are 2 different types of serial communication. The type your PC uses has voltages of 0-20v, microcontroller/motor drivers etc use -5-0v So you need a voltage 'doubler' and a voltage 'negator'. Max32 is a IC that does this, just requires a few caps to be soldiered on.


PIC/AVR Microcontroller:
Basiclaly a small basic computer. Usually something like an 8MHZ CPU with 128k ram. All in 1 small chip. These 'computers' can be progrmamed in assembly, C, C++, Basic, even java, depending on the controller. Use this to coomunicate with the motor drivers and any sensors or other actuators, and perform basic intelligent processing, or to coordinate with an RC or wireless module.


http://www.societyofrobots.com/
 
Back
Top Bottom