Humans (or in general any living organism) has to have some senses to become totally autonomous. Humans have five senses – vision, smell, taste, hearing and touch. If so, then what do robots have?
Let me ask you a simple question. What does a robot needs to become totally autonomous? By totally autonomous, I mean that the robot should work on its own without any human interference. Most of you would agree with me that it needs intelligence. This intelligence is imparted by us (humans). But is it enough? Well, of course the robot will work with that, but it will be totally isolated from the outside world. It won’t be interactive and cannot take decisions valid in the real world. In order for it to interact with the real world, we need to implant sensors!
In simple words, a sensor is any device capable of sensing physical parameters (like temperature, pressure, proximity, etc) and then convert into electrical signals so that it can be used for processing. So, what do robots have? Camera, piezoelectric sensors, acoustic sensors, accelerometer, etc.
Now let’s move on to some of the fundamentals of sensors. Starting with the basic question, what can we measure using sensors?Practically anything! Light, motion, temperature, magnetic fields, gravity, humidity, vibration, pressure, electrical fields, sound, and other physical aspects of the external environment can be measured using them. Of course there are different sensors for each purpose like IR sensors, proximity sensors, temperature sensors, tilt sensors, accelerometers, ultrasonic sensors, RADAR, SONAR, etc.
Every sensor in this world has three terminals:
- Vcc – to power up the sensor
- GND – to provide a fixed negative reference
- Output – analog output of the sensor (in some sensors, there may be more than one output terminals)
The following block diagram demonstrates it.
The sensor senses the physical parameters and gives a corresponding output. In most cases the output is analog. Some of the most common sensors used in the field of robotics and embedded systems are as follows:
IR Sensor– This is the most fundamental type of sensor available in the market. The basic concept is simple. There is an emitter which emits infrared (IR) rays. These IR rays are detected by a detector. This concept is used to make proximity sensor (to check if something obstructs the path or not, etc), contrast sensors (used to detect contrast difference between black and white, like in line follower robots), etc. The circuit diagram of a basic IR sensor is given below. So even you can make one by yourself.
You can also put an op-amp (comparator) in the output terminal in order to amplify the signal and also to convert the analog sensor output to a digital one. We will discuss analog to digital conversion (using AVR) later. For more details on IR sensor design and construction, visit this page.
LM35 Temperature Sensor – LM35 is a precision centigrade temperature sensor. It has three terminals – Vcc, Ground and Output – as shown in the adjoining diagram. It has a sensitivity of 10mV/°C. This means that for every degree rise in temperature, the output voltage increases by 10mV. In general, it gives a voltage of 0V at 0°C. Hence, say for an output of 450mV, the temperature is 45°C.
- Apart from LM35, there are many other temperature sensors like thermistors, thermocouples, etc which are widely used.
Accelerometer – An accelerometer is a device which can measure acceleration in any direction (X, Y, Z). MMA7260 is one such tri-axis accelerometer. Even this has three major terminals – Vcc, ground and output (it has three outputs, one each for X, Y and Z). This is a very cool stuff. You can program graphical LCDs using this, you can implement this in humanoids (if you plan to make one) to measure the rate of fall, etc. Here is a short tutorial on using analog accelerometers.
- Camera– To give your robot the power of vision, you can put cameras on them.
The image processing is done using software like MATLAB, OpenCV, LabVIEW, etc and then the data is transferred to the MCU using serial communication. Even this is a cool stuff! In fact I am presently working on this and hope to bring you some exciting concepts regarding Digital Image Processing!
Well, these were just a few of the sensors. There are many other types of sensors used. Of course, the discussion of all of them is outside the scope of this post. So now, you have the fundamentals of the sensors. In the next post, we will discuss how to convert the analog output of sensors to digital signals using AVR.