Description: To enable a robot to detect objects in its surroundings, an ultrasonic sensor is recommended. While infrared (IR) sensors are inexpensive, their operational range can fluctuate due to ambient light changes, resulting in inaccurate range measurements. Ultrasonic sensors operate based on the principle of radar (Radio Detection And Ranging). A radar system transmits an electromagnetic pulse towards a target and receives the echo reflected from that target. The distance to the target is determined by the time delay between the transmitted pulse and the received echo. Typically, microwave and ultrasonic frequencies are utilized in radar systems.
The operation of an ultrasonic sensor involves several steps:
1. Set the "Trig" pin of the sensor high for 10 µs to initiate a sensor cycle.
2. The sensor's transmitting piezo transducer sends out 8 pulses at a frequency of 40 kHz, after which the "Echo" pin transitions from low to high.
3. The emitted 40 kHz sound wave reflects off the nearest object and returns to the sensor.
4. Upon detecting the reflected sound wave, the Echo pin returns to a low state.
5. To interface the sensor with the AT89S51 microcontroller, two I/O pins are required: one for an external interrupt pin (INT0 or INT1) to measure the pulse width at the echo pin, and another pin, such as P3.5, for the trigger.
6. Configure TIMER0 of the 8051 microcontroller in 16-bit mode with the GATE bit enabled. When the GATE pin is enabled and the timer run control bit TR0 is set, TIMER0 will be controlled by the INT0 pin. TIMER0 starts counting when INT0 is high and holds its count when INT0 goes low. The TMOD register should be loaded with the value 00001010 (0x0A), as referenced in 8051 documentation.
The ultrasonic sensor's design and implementation in a robotic application involve careful consideration of the interfacing with the microcontroller, as well as the timing and pulse width measurement for accurate distance calculation. The use of TIMER0 allows for precise timing control, essential for effective distance measurement. By enabling the GATE function, the timer can be synchronized with the interrupt signals, ensuring that the timing of the echo pulse is accurately captured. This method of operation provides reliable object detection capabilities, making ultrasonic sensors a preferred choice for robotic applications requiring environmental awareness.If you want to make your robot sense the objects in it`s surroundings i suggest you to go for an ULTRASONIC sensor. Though the IR based sensors are cheep, their working range may vary due change in ambient light and won`t give accurate range values.
In case of ULTRASONIC sensors they work based on the principle of RADAR(RAdio Detection And Ranging). A RADAR transmits electromagnetic "pulse" towards the target and receives the "echo" reflected by the target. Then the range of the target is determined by the "time lagging" between transmitted pulse and the received "echo".
Generally microwave and ultrasonic frequencies are used in RADARS STEP1. Make "Trig" pin of the sensor high for 10 µs. This initiates a sensor cycle. STEP2. 8 x 40 kHz pulses will be sent from the transmitting piezzo transducer of the sensor, after which time the "Echo" pin on the sensor will go from low to high. STEP3. The 40 kHz sound wave will bounce off the nearest object and return to the sensor. STEP4. When the sensor detects the reflected sound wave, the Echo pin will go low again. STEP6. To inter face the sensor to AT89S51 microcontroller we need two I/O pins. One of them is external interrupt pin(INT0 or INT1) for measuring the pulse width at the echo pin. and any other pin say P3. 5 for trigger. STEP3. Configure the TIMER0 of 8051 in 16 bit mode with GATE bit enabled. If the GATE pin is enabled and timer run control bit TR0 is set, the TIMER0 will be controlled by INT0 pin.
When INT0 is high then the TIMER0 starts counting. Whenever INT0 goes low TIMER0 holds its count. So load the TMOD register with 00001010=0x0A; (better refer to any book of 8051).
This circuit measures the distance covered during a walk. The hardware is housed in a small box that can be slipped into a pocket. The display is arranged such that the leftmost display, D2 (the most significant digit), shows distances...
This is a digital calendar circuit that utilizes a microcontroller to display the date, day, and month on an LED display. The entire system is managed by an 8-bit microcontroller, which operates based on a program embedded in its ROM....
This circuit measures the distance traveled during a walk. The hardware is housed in a small box that can be placed in a pants pocket. The display is designed as follows: the leftmost display D2 (the most significant digit) shows...
Embedded systems serve as the core of most electronics-based systems, enabling data access, processing, storage, and control. While some simple electronic circuits can be designed without a microprocessor or microcontroller, this approach is often economically impractical, except for basic passive...
The following circuit illustrates the sensor circuit of an analog line follower robot. Features include control by a microcontroller and a sensor circuit.
The sensor circuit for an analog line follower robot is designed to detect the presence of a line...
Microcontrollers are merely silicon wafers until programmed to perform specific tasks based on user requirements.
Microcontrollers serve as the fundamental building blocks in modern electronic systems, acting as the brains that control various functions within devices. They consist of a processor...
A Microchip PIC12C508 8-pin CMOS microcontroller controls a night light, turning it on and off at preset times every day. It is designed to save energy, produce no electromagnetic interference (EMI), and operate without batteries, featuring a built-in lamp fixture...
The defect that cannot be overcome exists in certain circumstances with traditional distance measuring methods. For instance, the measurement of liquid levels is a type of range measurement where traditional electrode methods involve the placement of electrodes to measure liquid...
The 8051 microcontroller gained significant popularity after Intel permitted other manufacturers to produce and sell various versions of the 8051, provided these versions maintained code compatibility with the original 8051.
The 8051 microcontroller is an 8-bit processor that was developed by...
We use cookies to enhance your experience, analyze traffic, and (if you allow) serve personalized ads.
By clicking Accept All, you agree to our use of cookies.
Learn more