Cognoscis

Think. Understand. Apply

Archive for the 'Robotics' Category

Simple line follower

Posted by cognoscis on 6th November 2009

I have covered the sensors part in detail in previous posts. Now I will go ahead and describe how to build a very simple line follower (Something I should have done a long time ago). There are a few important things that you must consider before actually building a line-follower. First and foremost, what kind of sensors are you going to use? LDRs are easy to build and very cheap but are not efficient in noisy environment. If the environment in which you intend to use it is noiseless (Has uniform lighting or illumination) then you can go ahead and use LDRs. On the other hand, if you are looking at a sensor that can withstand high noise, then IR sensors are the way to go. The choice of sensor is independent of the rest of the circuit. It is only important from the sensitivity point of view.

Now that you have chosen a sensor, always remember that it will give you a HIGH or a LOW output at the end. Now you can make this high to represent either a presence or absence of a white line (say). It is completely in your control. For the sake of example let us consider a white line on a black background. Now, you place your sensors so that it is on the background, then the sensor sees black. Now set your comparator such that it will output a high when this voltage is fed at its input. A NOT gate can be used to reverse this if you want to. It is completely flexible and in your hands to modify. Next is to decide on a logic circuit to drive the bot. Depending on your logic, the number of sensors will vary. In this example, I am going a use a very simple logic that requires only two sensors. Next, you must consider the placement of sensors. Lastly, the motor driver, meaning, the circuit that will enable you to drive the motors. So, lets start building now.

I will build a white line follower (White line on a black background). For this, LDR or IR sensors can be used. For construction of LDR sensor click here and for IR click here. Now, we have two sensors which are like two eyes of our bot. Using these “eyes” we make it see the line and make it follow the line. Once you have built the sensors’ circuits and tested them individually as explained in those posts, you must no consider their placement. Placement is very very important. Make sure you place them towards the front of the vehicle and they must be on the black background when stationary and not on white line. Now you may wonder why that would be? That is because, its the best way to follow any line. Always, try to locate the background (this I learnt from experience). Refer the figure below to understand it

Placement of the sensors

Placement of the sensors

In the figure, the green circles are the two sensors that hover over the sides of the central white line that is to be followed. The yellow part to which we attach all our circuits, motors and batteries is called the chassis (Pronounced cha-see). Anyway, Now that the placement of the sensors is taken care of, i.e., the eyes have been placed. Now, you need to give it “legs” that being the motors and wheels.

For this purpose, there are many methods that are used. first lets see our “driving force” that is given by the motors. Two important considerations are to be kept in mind. First, what will be the total weight that will be driven by these motors. That will help you in choosing the right torque for the motors. Generally speaking, most of the motors are rated in terms of rpm (rotations per minute). One thumb rule is that lower the rpm of a motor, higher is its torque for the same voltage. So, for starters, I would suggest you to go for 150 – 200 rpm 12 V motors. This will give you reasonable torque and controllable speed for our primitive logic circuit. Second, consideration is the battery power. As suggested above, if you use 12 V motors, you can run them on a 9 V battery, but its rpm and torque will be reduced because the energy supplied by the battery is not what the motor expects for full performance. Of course, you can use 9 V + 3 V to make 12 V and supply it to the motors. That time the motors will run at full speed. But once the battery drains (which is fast if the robot is heavy) the rpm will reduce. You need to consider these things when you start building high precision robots. But for now, we can ignore it for time being.

For wheels, you can use wooden wheels. I use wooden wheel that we got from a wood works shop after a lot of requesting. You can also try toy wheels and use adhesives to fix the wheel to the shaft. You might go for the commercial wheels sold in shops along with the motors if you can access them. When using wooden wheels do remember to put a piece of cycle tube around it for frictional purposes. As for the front, you get Caster wheels wheel that are the best suited for such applications, the ones that are used in movable chairs and stools, but only very small in size. This can be seen in the image below

Ball caster wheels

Ball caster wheels

Then depending on your motors you can use either L-clamp or U-clamp to fix the motors to your chassis. Now comes the electronics part of the robot. Remember, if you use 12 V DC motors, then you will need two separate power supplies. One 12 V for your motors, and the other 5 V for your sensor and control circuit ICs. Since this is not feasible, we will use a “Voltage Regulator” that will take 12 V as input and give 5 V as output. There are many such ICs, we will use the popular LM 7805 voltage regulator (its datasheet can be downloaded from here). The circuit diagram and the image of the IC is as shown in the figure below. The two capacitors are very crucial and must not be omitted from the circuit.

LM 7805 IC with Circuit Diagram

LM 7805 IC with Circuit Diagram

Once we have over come the issue of dual power supply, we can now go ahead and try to run the motors. But, there is a problem, the output of sensors is 5 V but the motors need 9-12 V at least to run. That means, we need to have some kind of a mechanism to convert that 5 V signal to 12 V signal. A number of options are available for this. Pure mechanical relays can be used but these are bulky and not preferred by many. We can then turn to what are called as motor driver ICs which are specially made for this purpose. One more advantage of using them is that we will get some familiarity at the initial stage itself and we will be one step ahead while designing more complex robots as we may require to operate the motors in two different directions (ex. Remote controlled vehicle). That time, these motor drivers come in very handy and will considerably reduce the circuit size. There are a number of motor drivers in the market, many beginners prefer ULN 2003, but I think we can go for L293D motor driver or rather quadraple half H-Drivers as they are called. Datasheet can be found here. Just observe the circuit diagram of the IC in the figure below

L293D internal circuitry

L293D internal circuitry

As seen in the internal diagram, this driver IC has 4 half H-drivers (Triangular buffers in the figure). Each of this driver is made up of transistors to form a H-bridge (totally 6 transistors) that are capable of driving the motors in one direction. So, to drive a motor in both the directions, we need to utilize two such half bridges. As shown above, the pins 4, 5, 13 and 12 are ground pins that must be connected to your circuit ground. Pin 16 is Vcc1 which supplies for the IC. So, we connect it to 5 V as shown in figure below. Now, a 5 V at pin 1 will enable the driver 1 and driver 2 where as a 5V at pin 9 will enable driver 3 and driver 4. In our circuit below, we are using drivers 1 and 4 for the convenience of connection and hence we connect pin 1 and pin 9 to Vcc1 which is 5 V. Since we only go forward following the line, we will use only half the bridge. So, we connect one end of the motor to output of the driver which is pin 3 for driver 1 and pin 14 for driver 4. The other end of the motor is grounded. Make sure that same ends of motor are grounded and the motor is rotating in the forward direction only. If it is rotating in reverse direction, just interchange the connections and you will be able to drive the motors forward all the time. Now, the output of your two sensors must be given as input to these motor driver bridges. That is pin 2 for driver 1 and pin 15 for driver 4 as shown in the figure below. Finally, the most important part is the 12V connection must connected to pin 8 which is Vcc2. Make sure you connect the left sensor output to left motor driver and right sensor output to right motor driver.

L293D with Circuit Diagram

L293D with Circuit Diagram

Thats all! Now just to clarify, for the chassis you can use almost anything. You can use a piece of plywood sheet, or a switch board plate which is a Bakelite plastic or you can use Aluminium sheet or perforated sheets that you gets in some shops. It totally depends on you and what materials are available to you. Now that we are done, its time to try out the line follower. Take a big sheet and paint it black and make a white track. Then calibrate your sensors ( on how to calibrate refer the sensor related posts that here towards the end of the post). Once that is done, just place your robot on the track and watch it go. Once you actually make this first robot, you will become aware of all the practical difficulties that one faces during making a robot work. This is the first step one must take to enter the field of robotics. The first one I ever made, I made it “see” the white line (which I advised you to avoid) and hence it was not very successful when it was presented with obstacle. Watch the 3gp video of the same :D

Any problems, suggestions, broken links; please notify using the comments :)

Tags: , , , , , , , , , , , , , , ,
Posted in Robotics | 2 Comments »

Do-it-yourself robot, iCub

Posted by cognoscis on 10th September 2009

With the world going open source in more than one ways, its time for an open source Super-Robot. RobotCub is a 5 years long project funded by the European Commission through Unit E5 “Cognitive Systems, Interaction & Robotics”. The project had been started back in 2004 and recently the research team unnveiled a prototype that they had  developed. The “iCub” is the most complex humanoid robot capable of learning by copying complex human actions. Right now, the scientists report, the iCub is capable of playing drums, crawl, grab and handle objects in its dextrous hands, it can see and recognize objects using its camera eyes in the head. Due to its cognitive design, it is capable of learning by mimicing the humans and hence the scientists are positive that soon the iCub will be able to negotiate obstacles, walking and other more complex tasks.

iCub handling a ball

iCub handling a ball

The complete details of the hardware and software are made public under GPL so that anyone interested can work on it and help and improve the capabilities of the robots. The complete details on how to build one yourself is given on their website. Meaning, you could actually build it in your garage once you get hold of the equipments needed. The hardware, middleware and software details are given on their site under GPL. This is to bring everyone interested in this research together and improve the design. The research on cognition has always been dominitated by psychologists. But, a research has shown that manipulation plays a fundamental role in the development of cognitive capability. As many of these basic skills are not ready-made at birth, but
developed during the growing period. This has led the way to creating an open hardware/software humanoid robotic platform for research in embodied cognition, and advancing our understanding of natural and artificial cognitive systems by exploiting this platform in the study of the development of cognitive capabilities.

iCub sitting on a chair

iCub sitting on a chair

As cool as it may sound, there is a down side for this. This is not for a hobbyist to build over a weekend. The requirement to understand the complete working is probably a phd in the respective field or you need to spend a lot of time studying all the blueprints and the material. As a part of the project, a few prototypes of iCub were given to some research groups, free-of-charge, so that the interested people could make their own contribution to the system. Also, there will be atleast 3 working prototypes at any given time so that anyone interested can ruin tests on it before going for their own iCub.

Tags: , , , , , ,
Posted in News, Robotics | No Comments »

I SWARM, a swarm of microbots

Posted by cognoscis on 1st September 2009

Researchers from institutes in Sweden, Spain, Germany, Italy, and Switzerland have  vision. They envision a swarm of ant-sized microbots could one day be mass produced and deployed for various purposes such as data aggregation and surveliance. To reach this goal, they have recently manufactured such a bot entirely in a single circuit board. This is in an effort to develop a novel technique whereby swarms of such bots can be produced in cheaper ways. These researchers have used conductive adhesive to attach the components to a double-sided flexible printed circuit board using surface mount technology. The circuit board is then folded to create a three-dimensional robot. The resulting robots are very small, with their length, width, and height each measuring less than 4 mm.

Images of the robots showing their size proportional to various objects. Image credit: Edqvist, et al.

Images of the robots showing their size proportional to various objects. Image credit: Edqvist, et al.

The robots are powered by a solar cell on top, and move by three vibrating legs. A fourth vibrating leg is used as a touch sensor. As the researchers explain, a single microrobot by itself is a physically simple individual. But many robots communicating with each other using infrared sensors and interacting with their environment can form a group that is capable of establishing swarm intelligence to generate more complex behavior. The framework for this project, called I-SWARM (intelligent small-world autonomous robots for micro-manipulation) is inspired by the behavior of biological insects.

As this was the first test of this fabrication technique, the researchers noted that they encountered some fabrication problems. The single largest problem was to connect the naked integrated circuit to the flexible printed circuit board by the conductive adhesive. Also, some solar cells did not stick due to weak adhesion. At this stage in the production process, the robots were folded manually, but the researchers hope to design a tool to enable a faster and more accurate alignment when folding. Many of these complications could likely be corrected, with the important result being that the microrobots can be assembled using a surface mounting machine, whereas prior robots have usually been manually assembled with a soldering iron. With new techniques being devised, the future of these robotic bugs looks promising.

Tags: , , , , , , ,
Posted in News, Robotics | No Comments »

Robotic search and rescue

Posted by cognoscis on 25th August 2009

The humanoid BEAR (Battlefield Extraction-Assist Robot) can locate victims in a mine shaft, battlefield, toxic spill, or earthquake-damaged structure. And then it can lift them up and then carry them over long distances to safety and it does this without risking any more lives. The patent-pending BEAR is Vecna Robotics’™ flagship program. The Vecna Robotics™ BEAR project has won key funding from the US Army’s Telemedicine and Advanced Technology Research Center (TATRC), a part of the US Army Medical Research and Material Command (USAMRMC).

The BEAR’s patent-pending technology is a marriage of three elements: A powerful upper body controlled by hydraulics; an agile mobility platform that features two independent sets of tracked “legs”; and dynamic balancing behavior. The robot is able to balance itself while on the balls of its “ankles.” In fact, the BEAR can remain upright whether balancing on its ankles, its knees, or even its hips. The tests in the video show that this technology does a good job in various terrains. That is a remarkable feat achieved by the designers of this bot.

The BEAR is currently in proof-of-concept development stage and is the ninth version. A prototype of the BEAR has been built and outfitted with a powerful torso and arms, together with a dynamic balancing system on its unique tracked legs. Vecna incorporated explosion and fire-resistant treads, a ruggedized, high speed, high
energy drive system, intrinsically safe battery cells that are highly resistant to explosion and fire, enhanced dexterity (22 degrees of freedom), and independent, articulated legs for enhanced mobility.  Vecna also completed and now utilizes its comprehensive physics-based simulation and modeling system that enables engineers to design and test robotic control systems quickly, inexpensively, and without risk to people or hardware. Together, the robot prototype has been able to demonstrate standing while holding a fully-weighted human mannequin, and carrying the mannequin around in its arms while dynamically balanced in an upright position. The robot has also stood up from a kneeling position to look over walls, or to lift its payload onto a high shelf.

for more details download this pdf

Posted in Robotics | No Comments »

High Speed Robotic Hands

Posted by cognoscis on 7th August 2009

Amazing high-speed robotics arms that are activated on Visual feedback are being designed at the Ishikawa Komuro Laboratory. They use 1000 FPS cameras and high speed motors to achieve this feat. They use sophisticated robotic vision and sensor integration called Sensor Fusion to create the robots with capabilities that are poised to outsmart humans

Tags: , , ,
Posted in Robotics | No Comments »

Robots that scavenge for food (Energy)

Posted by cognoscis on 2nd August 2009

What is the first major step towards complete autonomy of a robot? It is providing the robot with the capability to re-fuel itself. Robotic Technology Inc is already working on such a robot that can re-fuel itself. Energetically Autonomous Tactical Robot (EATR) is the ongoing project sponsored by Department of Defense of USA. As the name sounds, this robot re-fuels itself by “eating” biomass from its environment. Inspired by the living organisms, EATR can find, ingest, and extract energy from biomass in the environment (and other organically-based energy sources), as well as use conventional and alternative fuels (such as gasoline, heavy fuel, kerosene, diesel, propane, coal, cooking oil, and solar) when suitable. Though it is still on paper and the prototype is yet to be built. The proposed system looks somewhat like the one shown in the figure below

(Credit: Robotic Technology)

(Credit: Robotic Technology)

The basic functioning can be explained as follows

An array of sensors will act as its sense organs to identify the “edible” materials and lets it handle them so that these material can be broken down into proper sizes using its manipulator system consisting of robotic arms and end effectors and then fit into its “stomach” which is a hybrid external combustion engine system provided by Cyclone Power Technology Inc. This engine, which is a steam engine, can virtually take any fuel to run. Hence, the biomass that is “ingested” can be used as fuel. The steam engine then generates electric power using the energy from fuel and will recharge the battery pack which supplies energy to its electronic and mechanical parts.

This definitely is a very complex interface and is expected to yield commercialization of EATR for military and civil application as well as the development of the Hybrid engine for civil and military automotive applications. The potential “food” for this robot is termed bio-mass. Speculations fly high that in a battle field, corpse would be attractive biomass and it is being viewed as a threat more than a marvel. Safety precautions must be taken in order to protect humans and animals that may come under its “favourites” list. None-the-less, this is one more step further into the future of autonomous, self sufficient Robots. More details of the Project can be found here

Tags: , , , , , , , ,
Posted in News, Robotics | No Comments »

The machines are indeed rising!

Posted by cognoscis on 29th July 2009

One of the most hot topics in Science-Fiction is Robots going bad and taking over the world. Countless times it has been made into books, movies, sitcoms, cartoons and articles. Today’s advancements in terms of Artificial Intelligence does provide a fair chance of the fiction turning into reality. If on one side there are robots being built that resemble humans, on the other side robots are being programmed to do jobs as simple as opening doors to finding power outlets to recharge themselves or giving them night vision or arming them so that they can drop bombs on enemy territories. All these are definitely still under complete human control. But, the kind of research that is going on in the field of AI is quite fascinating and unnerving. Complex algorithms to simulate human traits are being developed and the ultimate goal of making a robot autonomous in true sense seems quite conceivable. Research is also going on to place a chip in the human body so as to control the environment. It works by using the RFID signal from the chip and the environment responds in the programmed way when the signal is encountered. It may be automatically opening the door when you approach it or switching on the lights when you walk into a room and so on. Then there are the brain waves that can be used to signal a machine to do what you are thinking.

Movie : Terminator 3

Movie : Terminator 3

There always has been apprehension associated with anything new. Possibilities where human brain being targeted using the above technology in reverse is not only possible, but also being predicted by researchers. A time when a machine that can simulate human traits gains full autonomy, what it might do will be very hard to predict. A killer robot on the loose is always man’s greatest fear since we have spent millions to make it invincible in the first place.  Recently, a group of leading computer scientists, artificial intelligence researchers and roboticists met at the Asilomar Conference Grounds on Monterey Bay in California to discuss this issue. They were of general opinion that highly centralized superintelligences and the idea that intelligence might spring spontaneously from the Internet is absurd as of now. But, they agreed that robots that can kill autonomously are either already here or will be soon.

The recent feat in genetics where a group of scientists programmed E. coli to solve a complex mathematical problem is yet another proof that we can never really draw a boundary while assessing threats from our own inventions. There are wide number of issues that need to be considered here. Advancements in robotics, though a boon, will definitely result in unemployment which has always been the premier concerns of common man. Self-driving cars, service robots replacing daily wage workers and nannies, Personal Assistant programs that would prove to be very efficient than humans will replace them. Other concerns would be the fact that criminals will use the technology as they have used every other technology in the past. Viruses are yet another concern when highly powerful systems are made. Worms and Trojans of today are much more powerful and the programmers have access to immense amount of resources to make these worms even deadlier. As we move ahead in terms of technology, we must also make sure that we do not loose our morality. Advancement in any filed must always be driven by needs and guided by ethics that are globally accepted and approved. Man has always been attracted to destruction, but we must not turn blind eyes on the ramifications of our actions in the near future.

Tags: , , , , , , , , , , , , ,
Posted in Robotics, Uncategorized | No Comments »

How to make a PCB at home

Posted by cognoscis on 4th July 2009

I think this is a redundant topic. But what the hell, cyberspace is being wasted on useless subjects, so repetition of something useful wouldn’t hurt. Breadboards are the best way to learn or test a circuit. Then, you want to make a more permanent circuit, so you go for one of those general purpose PCBs. I dont have anything against the general purpose PCBs, but as the circuit becomes more complex, you become entangled in a mess of wires that can drive you crazy. Completely nuts. Debugging the circuit will become very difficult, irritating and time consuming. To give you some example just look at the pictures below. The breadboard has a circuit to generate 38 kHz IR signal for modulated IR sensor explained in my previous post. The second picture is a part of LDR sensors I made for my line follower robot. The picture has a comparator circuit and a motor driver circuit and you can see the mess the wires have made. It still has the LEDs and the LDRs going around the robot. The best way to eliminate this mess is to make your own PCB so that you can eliminate the wires and make really compact connectors from one board to another. So, lets see how this process goes

IR Tx on breadboard

IR Tx on breadboard

General purpose PCB mess

General purpose PCB mess

First of all, you need to design the circuit to draw on the copper clad plate. I personally feel that ExpressPCB is good enough for this purpose. Lets face it, even though there is an option for double side design, we hardly use it. Soldering SMDs is a bit more complicated so a single side design is more than enough even for moderately complicated circuits. You can freely download the software from here and use it to design the circuits. The software has both a schematic and PCB designer. You can make a schematic in ExpressSCH and generate a netlist and then import this to the ExpressPCB to generate a PCB design. But I think its better to design the PCB ourselves so that we can optimize it better. Few tips to help you make better designs

  • Keep the connecting paths about 1 mm so that they remain intact when handled roughly.
  • Use as less space a possible. This is one of the prime reasons we make PCBs in the first place
  • Start designing with the copper in top layer and make the PCB in the normal way. After it is completed, transfer it to the bottom layer to obtain the mirror image of the circuit.
  • After you design the entire circuit, you will be left with a lot of empty space. Fill as much of this space as possible and connect that huge area to the ground point and/or the Vcc. There is also an option to just fill the empty space without connecting it to anything else. This is done to reduce the amount of Copper that needs to be etched. Less the amount, faster the etching process will be. Also you will save the etching agent. An example circuit is shown below. Its for 4 modulated IR transmitters with its own power supply and switch
IR PCB

IR PCB

Once you have your PCB design, you can print out that circuit. Make sure it is inverted (Mirror image) as you can see in the picture above. After the circuit design, there are two processes that can be followed. In this post I will describe the one with the iron box. For this process, we need to get the print out of the circuit on a paper. Glossy paper is preferred, but even normal white paper will do. The most important thing is that the printer must be a LASER printer. This is vital because, we will transfer the ink on the paper to the copper-clad plate. To transfer the circuit, follow these steps

  • First, properly clean the copper surface so that there is no dust or any other impurity and completely dry it.
  • Carefully place the circuit on the copper and place a hot iron box on top of it. As soon as you do this, the paper will stick to the copper.
  • Keep ironing the paper for about 10 min. Dont be in a rush, let it take its time. After about 10 min, gently peel off the paper. If done properly, the circuit diagram will have transferred onto the copper plate.
  • Use a black marker to fill out any places where there is little ink. You may also want to draw the lines that look dim. Be careful near the holes. The finished product will look somewhat like in the picture below

dirty copper clad plate. Needs to be cleaned

dirty copper clad plate. Needs to be cleaned

Circuit transferred onto copper plate

Circuit transferred onto copper plate

After transferring the circuit you need to remove the excess copper from the plate. This process is called etching and we will use Ferric Chloride as the etching agent. Its easily available salt and should be carefully handled as it is very corrosive. Keep all the good dishes away from it and use some old plastic trough. Make a solution of ferric chloride in the trough. The concentration of the solution need not be precise. Just mix the salt in little amount of water till the solution becomes opaque and reddish brown (colour of rust). Dont use a lot of water, it will be just waste of the salt. If possible, warm the solution a bit. This is not necessary, but it will speed up the process. Dont heat it, just warm it. Then insert the Copper plate into the solution and eep stirring it. Normally it will take about half an hour for the copper to come off. Be patient and keep stirring, it will speed up the process. After the copper is etched, you will get a PCB something like the one shown below

After etching

After etching and drilling

After the etching is done, we need to drill the holes to place components. I used 0.8 mm drill bits to make the holes. The above picture was my first attempt and you can see that I have messed it up. But, its really not that difficult. You may need one or two practise rounds. But, you need to be really careful when drilling the holes belonging to ICs. The holes must lie in a straight line else you will have a really hard time placing the IC. Trust me, I know from experience. Now, these drill bits are definitely available in the hardware shops, but a bit difficult to find. If you live in Bangalore, then you can definitely find it in SP road. Thats where I bought them. You cannot use 1 mm drill bit, it will be VERY big. You can see the hole above C3 in the PCB. Thats from 1 mm drill bit. Use 0.8 mm, its optimum. To get an idea, below is the picture of those bits and to compare, I have place a 0.5 mm lead between them.Also, I used these bits with the normal heavy duty Drilling machine without any problem. They will fit correctly and be careful as they can break if not handled carefully

0.8 mm Drill bit with 0.5 mm lead in the middle

0.8 mm Drill bit with 0.5 mm lead in the middle

With the drilling, you have now come to the final stage. Not it is soldering time. You can follow my soldering guide to solder the circuit elements. Always use IC holders in the circuit. The finished product will look as shown in pictures below. I have not soldered everything, but you can see how neat and organized the circuit is. This circuit holds 4 modulated IR transmitters along with its own power regulator.

Soldered PCB (Bottom Surface)

Soldered PCB (Bottom Surface)

Soldered PCB (Top surface)

Soldered PCB (Top surface)

I really apologise as all the snaps are not of the same PCB. I did not take any snaps during the maing of the last one. So, I had to use the older pics. But it gives you the idea of each and every step. Please feel free to share anything other than what I have put up and please do ask for any clarifications.

There is one more process; the one using UV light. I have not yet tried it. I think I will try it and share the outcome

Tags: , , , , , , ,
Posted in Robotics | 1 Comment »

Modulated IR sensor

Posted by cognoscis on 3rd October 2008

You want better quality sensors that are immune to noise and have a good range too. All the conventional methods yield low range. Hence, we go for the modulated IR sensors. Modulation is a process of imposing the message signal on a “carrier”. Anyways, lets not get deep into it. For the context, its just that we use a particular frequency to transmit and receive the signal that is used in the sensor. Now, I am going to discuss the circuit that works around a IR receiver IC called TSOP. This receiver works at 38kHz frequency, hence the transmitter must be woring at the same frequency. So, lets design an IR transmitter for the same.

As shown, we use 555 timer in the astable mode to get the required frequency and supply it to the IR LED. The operation of the timer is pretty straight forward. The relevant equation is given below

f=1/(0.693 x C2 x (R1 + 2 x R2))

The values I have given are just an example. You can try out different combinations so that you will be able to place resistors that are close to the calculated values(meaning, we dont get resistors with value 111? so choose the value carefully). The reisitors R3 and R4 are current limiters and the transistor 2N2222 is used as a switch. You may use any other transistor as a switch. Now, lets come to the tricky part

The LED will always need more cooling time. You cant pump in more current into the LED than what it can take. If you dont take care of that, the LED will overheat and will be spoilt or worse generate very high noise. Hence, be sure of the current it can take and set a suitable value to R4. of course you can calculate the current flowing through the LED by considering the branch from VCC-R4-transistor-LED-ground. Usually the drop across the transistor will be 0.2V (It depends on which transistor you use) and the drop across the LED is around 2V (Again it depends on your LED). So, 5V for VCC minus 2.2V which leaves 2.8V across the resistor R4. So, 2.8/47? ? 60 mA .

This is the same current that flows through you LED!! Simple right? Now, depending on your LEDs you can increase the current flowing. Varying R3 will increase the current too so you may use that to tweak your power. Also, you can send the 38kHz as bursts for short time. This will allow the LED to cool between bursts. By doing this, we can increase the current that is driven through the LED thereby increaing the power output. More power means, more range. But be careful NOT to send more that 125% of the rated current calue through your LED. A simple burst circuit may consists of two timers, one at 38kHz and other at 1kHz and these are given to AND gate. Hence, the output will be burst of 38kHz waves for 0.5ms(50% duty cycle). You can use 2 LEDs in the same circuit, but you need to decrease the resistance R4 appropriately. But more than 2 is not recommended.

Now lets look into the receiver part. TSOP is an IR receiver module. It has many series that work at 38kHz and 40kHz. Lets consider the 38kHz(Since I have used it, I am considering it. You may try the other receiver modules as well, there are plenty of modules available in the market).

Its a 3 pin IC as shown and the pin that is away from the other two is pin number 3. Pin 1 in ground and pin 2 is Vcc. Pin 3 is the output of the sensor which will be a logic 1 or logic 0. Please read the datasheet for more details. Anyways, this receiver IC makes our life much simple as we dont need to break our head to build a receiver circuit and get digital output from it. The simplest way to connect the circuit is as shown below

Simple right? Anyways, you need to orient your sensor and transmitter correctly so that you can receive the reflected wave efficiently. So, mounting is very important of both your LED and TSOP. The receiver has a directivity of 45°. So, you might want to see to it that you will keep it aligned as straight as possible. To use this IC efficiently, as mentioned earlier, use two timers and AND gate to send burst of signals. That will eliminate noise and the efficiency and accuracy of the receiver will improve. As said in the data sheet “After each burst which is between 10 cycles and 70 cycles a gap time of at least 14 cycles is neccessary.” Hence, by sending bursts, you will be able to improve the range also. This circuit must give you a range of 30 cm from transmitter and receiver.

Any suggestions, corrections or queries please comment :)

Tags: , ,
Posted in Robotics | 7 Comments »

An example of line follower

Posted by cognoscis on 14th June 2008

[youtube=http://www.youtube.com/watch?v=Dq3ayZBjfmI]
Okay, I explained about the sensors in my two earlier posts. But, having a good algorithm is also as important. Have a look at how this bot works

Tags: ,
Posted in Robotics | No Comments »