Showing posts with label Robotics. Show all posts
Showing posts with label Robotics. Show all posts

Monday, October 29, 2012

0 Arduino Robot 1 - The InsectBot

Hi, guys! I hope you liked my earlier post on making a distance display. So here I am again, and this time I'm going to show you, how to build a robot! Though it's not much of a robot, but I'm sure it'll be fun to watch! Basically the Insect will just squirm it's way around, but if you want, you can actually connect a distance sensor to the arduino and use it for object detection and avoidance!
So let's get started! 

You're gonna need :

  • Arduino Board
  • 2 Servo Motors (I prefer micro servos)
  • Stiff wire ( I used an old hanger wire)
  • 9v battery and it's clip
  • Heat Shrink tubing
  • Glue
  • My tutorial on controlling Servos
So first you need to bend the wire to make it look something like the pic below. Basically this is the structure of the legs.

Then you need to glue the wires to the attachment for the Servo. And it should look something like this.

After that, you need to attach the servos together to make it look like this. These will be the main body of the Insect.

Put in the code for centering the Servos. Then attach the legs to them. You've just created the body for your very first robot! Now attach the servos to the Arduino Board as I showed in  my tutorial, and then program the Insect for the walk. The Code is given below:

//For Centering the servo


Servo fServo;
Servo rServo; 
void setup()
{
fServo.attach(8);
rServo.attach(9); 
fServo.write(90); 
rServo.write(90);
}
void loop()
{
delay(500);
}

//For the Walk


#include <Servo.h>
Servo fServo;
Servo rServo;
int center = 90; 
int frUp = 72; 
int flUp = 108; 
int brForward = 75; 
int blForward = 105;
void moveForward()
{
frontServo.write(frontRightUp);


rServo.write(blForward);
delay(125);
fServo.write(center);
rServo.write(center);
delay(65);
fServo.write(flUp);
rServo.write(brForward);
delay(125);
fServo.write(center);
rServo.write(center);
delay(65);
}
void setup()
{
fServo.attach(8);
rServo.attach(9);
}
void loop()
{
moveForward(); 
delay(150); //time between each step taken, speed of walk
}

Now all you have to do is just plug out the Arduino from the USB, plug in a battery and make the Board a rider on the insect!
Although this was just like a 'Hello World' Project for Robotics, I'll be posting many more progressively projects on Robotics! So don't forget to check in every now and then!
Cheers!








Wednesday, June 6, 2012

0 Body of a Robot


Types of Robots

For most of the robots, especially hobby robots, their body holds all the important parts. It is a superstructure that makes sure that the robot is not reduced to an electronic heap. It houses the major electronic platforms, it ensures that the robot doesn't tip over, protects the vital organs of the robot from wear. So the first thing we're gonna talk about are the types of robot bodies. There are the following major types of Robotic Bodies:
  • Turtlebots - As the name suggests these are small bots which are capable of sitting (or moving) on your desktop and are some of the simplest to make. Their name inspires from the once prominent logo turtle graphics used in the 1970s (we all have learnt it our childhood isn't it?) and also because of the fact that their body resembles a turtle's shell. These bots are used extensively in hobby robotics (partly because they are inexpensive) and are powered by a simple rudimentary brain (BEAM robotics ) or a simple micro controller.
  • Rovers - These are the category of rolling( on wheels ) or tracked robots which are designed for applications which require more power than turtle bots, like mowing a lawn, carrying things, or even searching mars for martians! Owing to this, they tend to be larger in both, brain and brawn. They can have anything between a simple transistor as a brain or a full fledged desktop with windows running!
  • Walkers - A walking robot uses legs, not wheels or treads, to move about. Most walker bots have six legs, like an insect, as the six legs provide excellent support and balance. However, gaining in popularity are two- and four- legged walkers, which are more exciting and look more robotic! Walking robots require a greater precision in building. The design of the typical robot that rolls on wheels or even tank treads is very much simpler than that required for the legs, links, levers, and all other mechanisms used for walking. For this reason, beginners in the robot- building trade should opt for wheeled designs first to gain experience, even if the walking robot looks cooler.
  • Arms and Grippers - Though they are considered as stationary robots, these appendages can be attached to mobile robots, enhancing their functionality. Imagine what we would do (or would not do) without our hands! In the same way, an arm extends the robots usability in a million ways.
  • Humaniod - It's a robot which shares the same architecture as a human - a head, a torso, two legs, two arms, and possibly a brain too! This category of robots is something like a holy grail of robotics. Although we are nothing close to building a robot like Arnold Schwarzenegger (is that spelling right?) in The Terminator ( if one of them asks comes and asks you if you are Sarah Connor, say no!), even a moderately experienced builder can build a humanoid form.

Building Materials

There are literally thousands of materials out there just waiting to be used in your robotic endeavors, but how do you choose which one is better for the type of platform you want to work with? Here I present a list of some materials which you can get easily in any part of the world!
  • Wood - It is an excellent material for robot bodies, especially multi- ply hardwoods, like the kind used for model airplanes and model sailboats. Common thicknesses are 1/8″ to 1/2″—perfect for most robot projects. It is easy to work with, almost any beginner can work with it. But the downside is its strength unless you use a reinforced ply board.
  • Plastic - It boasts high strength, but is easier to work with than metal. You can cut it, shape it, drill it, even glue it, with common, everyday tools. My favorite is PCV expanded plastic. These sheets are available at industrial plastics supply outlets. Cheap and easy to work with.
  • Foam board -  Art supply stores stock what’s known as foamboard (or Foam Core), a special construction material typically used for building models. It’s really a sandwich of paper or plastic glued to both sides of a layer of densely compressed foam. You can cut it with a knife or small hobby saw. Great stuff for quickie- made bots.
  • Aluminum - If you want to go metal, aluminum is the best all- around robot- building material, especially for medium and larger machines. It’s exceptionally strong for its weight. Aluminum is fairly easy to cut and drill using ordinary shop tools.
  • Tin, iron, and brass - Tin and iron are common hardware metals that are used to make angle brackets and sheet metal (various thicknesses, from 1/32″ on up), and as nail plates for house framing. Cost: fairly cheap.
  • Steel - Although sometimes used in the structural frame of a robot because of its strength, steel (and its close cousin stainless steel) is difficult to cut and shape without special tools. Ideal for combat robots.

Locomotion Systems

  • Wheels - They are the most popular medium to provide robots with mobility. Though there aren't any animals that use wheels, we sure can have a hell of a lot fun with it. Wheels can be put on any design and are only limited with your imagination. For a robot builder it's a simple, foolproof and obvious choice. Robots can have any number of wheels - 1, 2, 3, 4 ...... it really is your choice
  • Tracks - This is only a giant wheel driven by, well, .... smaller wheels. It is a very practical design considering that it offers maximum traction. It can be used on snow, sand, a clean kitchen floor, where the wheel design would not work.
  • Legs - Of all types of mobile robots, those that walk on legs present the greatest challenges. But they’re also great conversation pieces! You must overcome many difficulties to design and construct a legged robot. First, there is the question of the number of legs and how the legs provide stability when the robot is in motion or when it’s standing still. Then there’s the question of how the legs propel the robot forward or backward, and— more difficult still!—the question of how to turn the robot so it can navigate a corner. Your walking robots can have two or more legs. The fewer the legs, the more challenging the design. Two- legged (bipedal) robots use unique balancing methods to keep them from falling over. Four- legged robots (quadrupeds) are easier to balance, but good walking and steering can involve adding extra joints and some sophisticated math to make sure everything moves smoothly. Robots with six legs (called hexapods) are able to walk at brisk speeds without falling and are more than capable of turning corners, bounding over uneven terrain, and making the neighborhood animals run for cover. As a result, the six- legged kind are the most popular among robot makers.




Thursday, May 31, 2012

0 Making An H-Bridge Motor Driver

Need of an H-bridge

When driving the motor in only one direction, we only need an on/off switch. But in most of robotics applications, we need to reverse the motion of the motor many a times. This is accomplished by what is called an a Half-Bridge or a push/pull driver.

Circuitry of the H-bridge

2 Switch Bridge

The simplest of the H-bridge uses two switches, which provide a path to either the positive terminal or the negative terminal, due to which the motor is able to turn in either directions. By using only one of the switches at a time, a short circuit is avoided. The other terminal of the motor is permanently connected to the GND.(Ground 0V). If both the terminals of the motor are connected to the positive or negative supply, we obtain a condition known as an Electric Brake.

4 Switch H-Bridge

For the motor to spin, the battery current must flow from the Positive supply, through the Motor,
and to the Ground supply to complete the circuit. To make this happen we must open one switch from each side of the bridge, one Low-side and an opposite High-side—that means we can either turn on S1 and S4 to go Forward, or we can turn on S2 and S3 to go in Reverse. The direction of the current flow through the motor terminals determines the direction that the motor spins. We can manipulate the flow of the current by closing the two corresponding switches together to give us directional control of the motor. If all four switches are open (disconnected), the motor is coasting, meaning there is no path for the current to travel.

Full Bridge Configurations

Shoot Through Configurations ( NOT okay!)

Implementation

The Simplest of all H-bridges


We can make a full H-bridge using 2 three-way (SPDT) switches, a DC motor, and a 9v battery. It can be placed into any acceptable H-bridge state: forward, reverse, electric brake (positive), electric brake (negative), or neutral. Each switch in the circuit has three positions, On/Off/On, and switches the center contact between the two outer contacts (or in this case, the positive and negative battery wires). This method shows the simplicity of a basic H-bridge circuit, but does not provide speed control (it is either on or off). Although this might be a rugged circuit, its use is limited, so it is usually only good for testing and educational purposes.

DPDT (Double pole double throw) Relay H-Bridge

Here we combine the two SPDT switches and use one DPDT Relay, so it can be controlled by the Arduino. Also we can use the Arduino or PICAXE to provide a simple PWM signal for speed control of the motor. The simplest way to do this is to add a Logic-level N-channel mosfet (or several in parallel) to control the entire circuit’s path to ground. By using a PWM signal on the Ground supply to the H-bridge (Relay), we can control the speed of the motor from 0– 100%, whereas the relay switches the motor’s direction. The relay acts as both the High-side and Lowside switches in the bridge, so there are actually two low-side switches in this configuration—the relay used to route the power terminals and the N-channel mosfet used to provide the PWM speed control. This provides complete 0–100% speed control and requires as few as four parts other than the relay: (2) logic level N-channel mosfets, (1) diode (for relay coil), and (1) small prototyping PCB (or you can make your own). Depending on the mosfet, you can expect to carry about 10 amperes at 24vdc with no heatsink or fan; I usually select power mosfets with the highest amperage rating (anything above 75 amps), higher voltage rating than I plan to use in the project (usually 30v–55v is good), and the lowest possible on-state resistance. We can build this circuit with (2) FQP50N06L N-channel mosfets. One mosfet is needed to provide PWM speed control, and the other mosfet is needed to interface the relay coil to the
Arduino for direction control.The relay mosfet can be controlled by any Arduino digital output pin, whereas the speed control mosfet should be controlled by an Arduino PWM output. Next we connect the mosfet Drain pin to the Relay as shown in Figure 3-14, and the mosfet Source pin to the main Ground supply. The prototyping PCB makes this easier to put together and you can add screw-terminals for easy wiring. The voltage and current limits of this circuit are dependent on the mosfet and relay ratings, giving this circuit potential despite using a mechanical relay switch.
The Code for this bridge will be given later.
And don't worry if you do not get this right away! Take your time. You can also build the circuit, and then understand its functioning. 

H-Bridge ICs

To build your own H-bridge, but leave the designing to a professional, you might be interested in an Hbridge
IC. An H-bridge IC is a complete H-bridge circuit that is contained on a tiny integrated circuit
chip. These are usually fitted into a circuit with very few extra components, typically only a few resistors
and a regulated power supply for the logic controls. When using an H-bridge IC, you can usually expect
shoot-through protection, thermal overload protection, and high frequency capabilities. Although these
H-bridge chips are far less likely to be destroyed by user error than a completely homemade design, they
also have much lower power ratings than a homemade H-bridge, typically under 3amps of continuous
current. There are several H-bridge IC chips that include all four switches and a method of controlling them
safely. The L293D is a Dual H-bridge IC that can handle up to 36 volts and 600 milliamp per motor. The
L298N is a larger version of the L293D that can handle up to 2amps (see Figure 3-16). There are a few ICs that can control up to 25amps, but they are expensive and hard to find. There are several H-bridge ICs
that work for some of the smaller projects i will post(hopefully), but the larger bots require a higher powered H-bridge capable of conducting 10amps or more.

Friday, May 25, 2012

0 The Updated DARPA Humanoid - Petman




For those of you who fear the robot apocalypse, here is a stunner. The updated Boston Dynamics robot developed for DARPA and nicknamed just aqcuired the capability to run on the treadmill, climb stairs and do puch ups, in other words has become more humanoid. The machine is developing by the day it seems!

For those of you who just came to realise that the humanoid robots are in such an advanced stages of development, Petman is an anthropomorphic robot which was primarily developed for testing chemical protection clothing. Unlike the previous testers this one will have the capability to walk freely, balance and do other types of suit stressing calisthenics. It will also stimulate the human body temprature variations, and also sweat when necessary.

A modified version of this robotic platform will also be used in the upcoming DARPA robotics challenge which will require teams to write a software for the high tech man. So if you can write a software for this robot DARPA might just let you try it out.




0 The Next Grand Challenge by DARPA, Build Lifelike Robots

DARPA announced its next grand challenge on April 10, and unlike the previous editions it is much,  much tougher. The aim of the challenge is to utilise the grossly unused potential of robots relating to human safety and build humanoid robots to help in the rescue efforts in the situations hazardous to us humans.
This theme was decided in the wake of the recent Fukushima nuclear disaster which was the biggest one after Chernobyl.
The competition will be carried out in a course of two years, the first one of which is in October. The challenges will consist of staged disaster response scenarios in which the robots have to successfully navigate a series of physicals tasks according to the anticipated real world requirements. This is in a way a new concept because traditionally robots are designed to work in environs specifically designed for robots. But in this case the robots not only have to perform tasks in a primarily human environment, they have to do tasks which even a human might find difficult.
The tasks that the robot will be expected to perform are :-
  • Drive any small utility vehicle, controlling ignition steering brakes and other controls.
  • Walk/Run across uneven terrain
  • Clear a path for evacuation
  • Climb a ladder and move across a catwalk.
  • Maintain its balance in tricky situations.
  • Do tasks like drilling breaking open doors.
  • Find and fix a leaking pipe.
  • Replace a small pump
These are just examples, DARPA might make it a little difficult in the competition.
Competitors can take part along three tracks: Track A would involve building a complete system, including software and hardware; Track B could be software only, developed using competitive funds; Track C could be software only, using a competitor’s own funds; and Track D would be a complete system developed at the competitor’s own expense.

Other than capturing the imagination., this challenge if it were successful in its objective would be the holy grail        of robotics as it will provide us with a machine which is as capable (physically) as a human, if not more. And it will not be another one of those robots which are designed for only one purpose. After a little more prototyping they may even serve us like in The Jetsons!

But but but, with all that gain comes a little risk. Imagine a scenario in which a person is lying on the ground with one of his limbs and some ribs fractured (which is not at all uncommon in the event of the earthquake) and the robot approaches him to rescue him. It obviously does not know that the person is fractured and moving him would most probably result in the collapse of his chest of severe injuries to the limb, both of which can prove fatal. Would you prefer this type of a rescue. The robot might as well leave you lying there.
Another one of the risks is in the brain of the robot. Any small flaw in the programming may affect the the decision making of the robot which may prove fatal for someone already in some kind of a danger. There could be a virus too! (unless it has an antivirus installed!)

If you think you can build a robot which will have all the above mentioned features and will perform better than the most ingenious minds working together to create the ultimate robot,  you can go to www.darpa.mil/ to apply.

 

The Engineer's Spot! Copyright © 2011 - |- Template created by O Pregador - |- Powered by Blogger Templates