Subscribe To Robotics | IntroDuction | History | Home


Friends Dont Forget To check the archieve at the left end of the page



Make Your Own Robot Tutoials



Simple Beetle Bot | Wired Robot | Combat Robot | Solar Engine |



Beam Symet | Photopopper | Beam Trimet | Line Follower |

Latest Updates
Driver Less Car | I-Sobot | MotherBoard | MicroController | Artificial Brain |

Camera Sensors Hardware | Remote Control Working

Google

Tuesday, February 12, 2008

Robotics Tutorials For Beginner -Brain and Sensors

Building robots is great fun, but just imagine a robot that can 'think' for its self. Adding a brain to your robot need not be a hard process, and will allow your robot to follow instructions and rules. Basically, robot brains come in two forms, analogue and digital.

ROBOTIC BRAIN

Analogue Brains

It is possible to control your robots actuators (motors etc) using 'hard wired' circuits. By making circuits from capacitors, transistors and resistors you can make robots that can follow simple rules. For example, if they hit a wall a simple switch positioned on the front of the robot would be pressed in and the robot would be able to reverse and turn, hopefully avoiding the obstacle on its next pass.

Analogue brains have their disadvantages though. They require quite a good knowledge of electronics to design, and once they are built are very difficult to change. If you want to change the behavior of your design you will probably need to totally rebuild your analogue brain.

Analogue circuits are generally not recommended for beginners in electronics or robotics.

Luckily for experimental roboticists there is another option: Digital Brains

Digital Brains

Devices called micro controllers make perfect 'brains' for robots. They are small computers on a single chip, containing their own memory and processor, and can be programmed by a PC to control your robot in any way you can imagine.

What makes micro controllers so good is that they can be re programmed again and again with just a click of a mouse. There is no need to get the soldering iron out and start messing with components like analogue circuits.

Programming these chips is fairly easy to learn, but may take a bit of patience to fully understand. Learning to program by sticking your head in a textbook and trying to memorize programs is a very slow and boring way to learn. By far the easiest way to master programming is to have a go, work through a few tutorials and try out some examples. By playing about and trying ideas you'll soon get an understanding of how programs work, and how you can write your own

SENSORS

The world we live in is a complex place. We have many senses to help us to understand our surroundings. In order to safely move around robots also need some way of understanding their world. The easiest way of doing this is to add simple sensors to you robot.

Bump Sensor:

So, you've fitted some motors to your robot and its happily driving around but it probably keeps colliding with obstacles and getting stuck. You need a way for your robot to detect collisions and move around objects. Enter the humble bump sensor:

A bump sensor is probably one of the easiest ways of letting your robot know it's collided with something. The simplest way to do this is to fix a micro switch to the front of your robot in a way so that when it collides the switch will get pushed in, making an electrical connection. Normally the switch will be held open by an internal spring.

Micro switches are easy to connect to micro controllers because they are either off or on, making them digital. All micro controllers are digital, so this is a match made in heaven. Micro switch 'bump' sensors are easily connected to the Robocore, simply plug them into any free digital socket and away you go.

The following diagram shows a typical circuit for a micro switch bump sensor. The resistor is important because it holds the signal line at ground while the switch is off. Without it the signal line is effectively 'floating' because there is nothing connected to it, and may cause unreliable readings as the processor tries to decide if the line is on or off.

Light Sensor:

Light sensors are perfect for making your robot more interesting. With some light sensors you can make your robot follow a light, hide in the dark or even turn on some funky headlights if the light level got a bit low (under a table for example).

Light sensors are basically resistors that change their value according to how much light is shining onto them.

They are easy to connect to the Robocore, with a simple circuit they can be plugged straight into a free analogue socket. Getting results from them can't be simpler. Get the processor to take a reading from the socket that the sensors connected to. A high value means not much light is falling on the sensor; a low value means a lot of light is falling on the sensor.

Motors are one of the most common methods used to move robots around. They can be connected to gears and wheels and are a perfect way of adding mobility to your robot. There are many types of motor, and this tutorial will cover the main ones useful for robotics.

DC Motors:

These are the most common and easy to use motor available. They are connected to a power supply by two wires. The direction of the motor shaft rotates can be changed by reversing the polarity (swap the positive and negative wires) of the motor supply voltage.

Unfortunately motors use quite a bit of current, so you cant just plug them straight into your processor and expect them to work, the processor won't be able to supply the motor with enough current. We need to find a way of turning the motors on and off using the processor. This can be done by many methods, including transistors, relays or a motor driver chip. The Robocore contains two motor driver chips that can control up to 4 DC motors simultaneously. Connecting motors to the Robocore couldn't be simpler. Just connect the 2 wires of each motor to one of the motor outputs on the Robocore and your ready to go. The motor is controlled by 2 output pins on the processor, lets say pin 1 and pin 2. The motors direction can be changed by different outputs of the pins. See table below

Pin 1 Pin 2 Motor Output

On Off Clockwise

Off On Anti-Clockwise

Off Off Motor Off

For help programming the chip to do this have a look at the motor programming guide.

Servo Motors:

Servo motors are perfect control motors, They can be told to rotate to a specific position, making them ideal for anything that requires precision movement. Most servo motors can rotate through about 90 to 180 degrees, some rotate through a full 360 degrees. Servo's however, are unable to continually rotate, meaning they can't be used for driving wheels, but their precision movement makes them ideal for powering legs, controlling rack and pinion steering and much more.

Servo motors are totally self contained. They contain a motor, gearbox and driver electronics, meaning they can be controlled directly from a microcontroller, without the need for interface electronics. The picture to the left shows the inside of a servo. You can see the gears, motor and control circuitry.

Servos have 3 wires connected to them. 2 are for the power supply, usually between about 5 and 7 volts. The third wire is the control wire, which can be connected directly to the processor or micro controller (or an output of the Robocore). The position the servo rotates to can be controlled by sending pulses of electricity to the servo. Changing the delay between pulses directly controls the servos position.

If you want to learn more about servo motors take a look at the intermediate section of the tutorials.

Stepper Motors:

Stepper motors work in a similar way to dc motors, but where dc motors have 1 electromagnetic coil to produce movement, stepper motors contain many. Stepper motors are controlled by turning each coil on and off in a sequence. Every time a new coil is energized, the motor rotates a few degrees, called the step angle. Repeating the sequence causes the motor to move a few more degrees and so on, resulting in a constant rotation of the motor shaft. For example, a stepper motor with a step angle of 7.5 degrees requires 48 pulses for a complete revolution, or 96 pulses for 2 complete revolutions.


The diagram below shows how a stepper motor works. The magnet in the middle of the arrangement is connected to the motor shaft and produces the rotation. The 4 magnets around the outside represent each coil of the stepper motor. As different coils are energized the central magnet is pulled in different directions. By applying the correct sequence of pulses to the coils the motor can be made to rotate.



This design gives stepper motors the upper hand over DC motors. Varying the speed of the input sequence can exactly control the speed of the motor. Also, by keeping count of the sequence the motor can be made to rotate any number of times to any position

No comments: