Sonar Fish Detection and Measurement System with PIC16F873

DOI : 10.17577/IJERTV4IS060453

Download Full-Text PDF Cite this Publication

Text Only Version

Sonar Fish Detection and Measurement System with PIC16F873

Mbaocha, Christian C.1

Department of Electrical/Electronic Engineering Federal University of Technology Owerri, Nigeria

Chukwuemeka I. Egbunonu3

Electrical and Computer Engineering University of Uyo, Akwa Ibom State, Nigeria

Orji, Williams Ukaegbu2 Department of Electrical/Electronic Engineering Federal University of Technology Owerri, Nigeria

Amaefule Christian4

Department of Electrical & Electronic Engineering, Imo State University, Owerri, Imo State, Nigeria

AbstractThe SONAR (Sound Navigation and Ranging) Depth Measurement System is an efficient way to measure the distance/depth of unreachable objects such as fishes in the water regardless of color, texture, size and other physical factors. It is based on sending ultrasonic waves through a specific medium and observing the returning echoes to measure the distance from the device to the Target. The system is implemented using PIC16F873 microcontroller because of its excellent data capturing features and accurate and fast analog-to-digital conversion ability.The system architecture of the Ultrasonic Range Meter is cost effective and has less power requirement with optimum performance. Apart from its application in medium scale fishing, It can be used in the areas of Robots, submarines, automobiles and in power lines protection system.

Keywords Navigation, Sonar, Target, Ultrasonic, Echo, Depth, Measurement,

Index TermsEchoes, Depth, Measurement, Navigation, Sonar, Target, Ultrasonic

  1. INTRODUCTION

    An active sonar system is an apparatus used for obtaining information about underwater objects and events by transmitting sound waves and observing the return echoes1 The sound waves produced by sonar systems used for fish detection and biomass estimation are of the same nature as those produced by musical instruments, moving vehicles, machinery, human speech organs, etc. However, the human ear has a restricted range of perception of sound limited approximately to frequencies between 50 and 12000 Hertz (cycles per second, abbreviated Hz). Sonar systems used in fisheries utilize ultra sounds, i.e., the sounds of frequency 12000-500000 Hz, (i.e., 12-500 kHz) which are not detectable by the human ear. The operation of sonar systems used in fisheries work is quite simple. Sound is generated in discrete pulses, and after each pulse the system waits for a certain period when a timer (usually part of the display device) activates an electrical transmitter for a fixed period of time. The electrical oscillation of the transmitter is converted mechanically into pressure oscillations (i.e., sound waves) in the water at the vibrating face of the transducer, which continues to generate sound until the timer switches off the transmitter. The result is a

    sound pulse of a certain duration travelling through the water away from the face of the transducer. Any target (e.g., fish) in the path of this pulse will return an echo to the transducer, which in the waiting mode performs the reverse of its function in the transmitting mode, i.e., it converts pressure oscillations at its face (the echo) into electrical oscillations that are picked up by a receiver, amplified, and converted into some visible sign on the display device. The processing of echoes returned by a target requires translating the reflected sound wave that reaches the transducer face, into a form suitable for obtaining information about the target. For example, one important piece of information to be obtained from echo- sounding is the presence or absence of targets. The presence of a target gives a high peak of voltage on the transducers terminals, and then at the receivers, compared with a low background voltage. The background voltage is the electrical noise or static inherent in the system. It is usually called self-noise. Assuming that the sound velocity in seawater is a known constant, the distance between the target and transducer can be obtained by measuring the time interval between transmitting pulse and the echo from the target. As mentioned above, information about underwater targets is received in coded form as an echo signal; the main function of a processor is to decode the signal to obtain the required items of information. In order to obtain the echo signal independent of range from the transducer the transducer or the echo-sounder is connected to a special signal processing unit which is called the Time Varied Gain amplifier.

    1. Acoustic Reflecting Properties of Fish.

      When a sound wave transmitted by a transducer and propagated through a medium meets an object of a density different from that of the medium itself (e.g., a fish in seawater), part of its acoustic energy is absorbed by the target and the remaining part is reflected. Each target (i.e., reflecting object) has characteristic reflective properties which can be expressed by the ratio between intensities of incident and the reflected sound wave.

      I

      s

      t Ir i

      (1)

      sensor converts the input pressure to a voltage. The microcontroller measures the delay between the transmit pulse and the received pulse. The distance estimate is inferred from the speed of sound and the delay between the transmitted and

      Where Ir = intensity of reflected sound waves, Ii = intensity of incident sound waves. The ratio in equation (1) expressed in logarithmic units (decibels) is called target strength, which is given by:

      TS = 10 log t S (dB) (2)

      The other magnitude which characterizes the acoustic properties of the target is its equivalent cross section, and can be expressed as:

      received pulses. This is then outputted to the display as results.

    2. Transmitter Unit.

      The Transmitter consists of the Driver section and the Ultrasonic Sensor. The circuit diagram is shown in fig 2. The driver supplies an alternating voltage to the Ultrasonic sensor which then converts it to 40 KHz ultrasounds. The Ultrasonic pulse thus created is driven by the Hex inverter. Resistors R16 and R14 forms the pull-up-configuration. The basic function of this is to ensure that given no other input, the tied inverter inputs assumes a default value, a high. Transistors TR5 and TR4 are used as digital switches. Logic state 1 (5V) goes to

      4 Ir

      Ii

      (3)

      transistor TR5 while Logic state 0 goes to Transistor TR4. Outputs of both sets of parallel inverters are applied as a push pull drive to the ultrasonic Transducer. The positive going

      Experiments with fish species with swim bladders have

      shown that about 85 percent of the sound energy is reflected by the swim bladder. Species lacking swim bladders reflect less acoustic energy than those with swim bladders. In general, the reflecting directivity pattern, and the relationship between fish size and scattering cross- section, can be determined for species in both categories. For this application, the required components are PIC16F873, Hex inverter, operational amplifier, multiplexed 7-segment displays, transistors, some discreet components and the 40 KHz ultrasonic sensor pair.

  2. HARDWARE IMPLEMENTATION

    This entails a systematic and accurate combination of the various physical electronic components, maintaining the correct circuit theorems and standards while ensuring acceptable hardware reliability in the design.

    Fig. 1: System Block Diagram

    The system block diagram is shown in Figure 1 above. The system is controlled by a microcontroller, which creates a burst at the resonant frequency of the device. The burst is sent electrically to he transmit node, which amplifies the signal and hence creates an output pressure wave. The signal propagates and reflects to the receive node acoustically, and the receive

    pulse is applied to one of the terminals of the ultrasonic sensor and the same pulse after 180-degree phase shift is applied to another terminal. At this point of ON/OFF the transducer now produces and transmits 40 KHz ultrasonic Sound.

    Fig 2: Transmitter Unit

    1. Receiver Unit.

    This consists of an ultrasonic Receiver sensor and the Signal amplification unit. The receiver signal is amplified by two stage operational amplifier.

    Fig. 3. Amplification Unit

    to effectively calculate the distance to a target. If transmission and reception is carried out at the same time, there wont be any delay, therefore the transmission must be held during reception.

    The circuit works with a single power supply of +9 V which is fed through the positive input of the operational amplifiers (See fig 3). Resistor R1 is a pull down resistor which prevents charge accumulation along the input line.

    E. The PIC.

    Fig. 4. A Holding Circuit

    Capacitor C1 is a blocking capacitor which removes DC and the combination of Capacitor C1 and Resistor R2 serves as an external frequency compensation which lowers the gain at high frequency. It prevents the amplifier from entering its saturation region and keeps it linear. Through the non-inverting inputs of the amplifier, half of the power supply voltage 4.5V is applied as the bias voltage. This ensures that both half of the alternating current is amplified equally. Resistors R7 and R6 are used as voltage divider network.

    At the PIC, signal is processed and results are displayed.

    V 9V 10k 4.5V

    b 20k

    (4)

    Detector is part of the receiver unit. It detects high- frequency signal. The detection is achieved with Capacitor C3, Diode D1 and Diode D2. A Comparator is used to compare the received ultrasonic signal and the minimum threshold voltage or called the reference voltage. The reference voltage can be computed as

    Vrf

    47k 9V 1M 47K

    0.4V

    (5)

    If the rectified ultrasonic signal becomes more than

    0.4 V the computed reference voltage, the output of the signal detector becomes the H level (Approximately 9V) but when it is less than 0.4V, it is considered as a noise input or false alarm.

    D. Holding Circuit.

    A holding circuit is incorporated and shown in fig 4. It is an IC (IC3 4011) configured to function as a D flip-flop. The aim of this D-FLIP FLOP is to hold the transmission while reception is going ON. The entire Circuit works by utilizing the delay between the transmission and reception

    Fig. 5. PIC Configuration

    PIC diagram is given in figure 5 and output pins are 3, 4, 5, 21, 22, 23, 24, 25, 26, 27 which are invariably connected to the seven segment display. Pins 1 and 20 are the power supply pins and are connected to the 5V line. Pin 2 is connected to 5V via a 1k variable resistor to adjust the sensitivity of the system. Pin 9 and 10 are connected to the crystal oscillator with two parallel 30pf capacitors. The quartz crystal produces a train of continuous square waves pulses which controls the program of the PIC whereas the capacitors helps in achieving the two distinct timings required at the separate pins (Pin 9 and Pin 10); TIMER1

    and TIMER2. From the PIC diagram, the signal coming from the D flip-flop makes the CCP1 either high or low. When a signal echo is received and passed down to the PIC, the CCP1 is made high, else, it remains low. Pin 15 (RC4) gives a 5V to logic gate IC3 which controls the Transmitter unit. Pin 7 (RA5) is used to prevent the unit from wrong detection. It sends out a signal to the flip-flop to indicate when a reception begins so as to hold the transmission.

    The number of pulses counted by the timer between the time the voltage signal was transmitted out from Pin 15 (RC4) and time the voltage signal is received by the CCP1 (Pin 13) is calculated by the PIC as the time of flight. This time of flight is multiplied by the speed of ultrasound in air, and then divided by 2 to obtain the distance to an object or a target. This whole counting and calculation is controlled by the program which is resident in the PIC. Three 7 segment LEDs are used for 3-digit display (ANODE COMMON type). All the segments (a-g) of each three-3 digit are connected in parallel and are connected from PIN21-PIN27 of the PIC (output pins). The common anode of each three-3 digit is tied to the PICs output PIN RA1, RA2, RA3 i.e. PIN 3, 4, 5 via transistors used as digital switches. The complete design diagram is shown in fig 6.

    Fig 6. Schematic Diagram of Complete Design

  3. SOFTWARE IMPLEMENTATION

    The software implementation for this project is carried out in stages. The program is an assembly language program. The source code is written and compiled with the IDE compiler to obtain the HEX file. The HEX file is programmed into the micro-controller using the USB programmer. The operation of the software is repeatedly executed. LED display processing is executed in parallel with this operation.

    Fig. 7a. Initialization Routine

    Figure 7b. Initialization Routine

    Fig. 8. Program Flowchart

    1. Program Flowchart.

      The program for this process occurs in stages and starts with the initialization process. In the Initialization process the ports and timer F are all initialized as shown in figure 7 and the program now enters the waiting loop. This is called the Initialization routine. After the Initialization is the transmission interrupt which starts up the Timer, first there is a one bit shift in delay and if the delay is up to 39 counts, the LED is toggled and transmission is started. If not the process is ended and initialization is started all over again. Transmission is carried out for a period of 0.5msec before it is stopped. Timer C is initialized and counting starts. The program ends. This whole process is illustrated in figure 8 below. After the transmission interrupt the counting process is stopped and the total count is checked. This total count is displayed to the memory of the PIC and a decision is made. Is the difference in count a small difference? If NO, the whole process is stopped. If yes, shift it by one bit and check. If the match is 5, compute and display results but if not, end the process.

    2. Simulation.

    The design was simulated using Proteus. Transmitter unit in the design produced alternating current as expected and this was shown by an oscilloscope. The Bias voltage of 4.5V for the Receiver unit was confirmed using the voltmeter. Amplifier stages were tested as simulated input signal was applied. The reference voltage of 0.4V necessary for comparison was verified using voltmeter and the output is confirmed.

    Fig. 9. Simulation of the Completed Design Diagram

  4. CONCLUSION

The ability to rapidly assess the fish stocks in deep water remains a daunting task. Current techniques use a combination of trawls and down-looking sonar to see what is directly along the path of a survey vessel. From these sparse measurements, estimates of biomass are created and used for making management decisions. Microcontroller based fish detection system has been designed.. A system would radically change the way that fish stocks are assessed. Fishes could be located and measured much more rapidly, reducing the cost of stock assessment and, at the same time, increasing assessment efficiency. This design uses commercial off-the-shelf (COTS) equipment that is available for fish detection system. This design stresses intuitive use and ease of understanding, in order to achieve the required understanding, in order to achieve the required performance goals. To accomplish these objectives, this system utilizes active sonar techniques. In the sonar sense, different size or species fish reflect a broadband illumination at specific frequencies, just a a wall full of books reflect different colors in daylight. The design challenge is to find components that do not require a destroyer full of equipment to accomplish the task. The prototype system is portable, to minimize impact to the vessels. The transmitter is also less powerful and less costly and operates in non-military frequency regions. Processing of the transmitted and received signal occurs in the Microcontroller.

REFERENCE

  1. P, Sprawls, The Physical Principles of medical imaging, UK,

    Educational foundation publishers

  2. History of Ultrasound, Retrieved March 3, 2012, from http://www.genesisultrasound. com/lazzaro_spallazani.html

  3. History of Ultrasound and Technological Advances Jim Tsung, MD,

MPH New York, USA

[4 ] Fernando Montes-González, 2001, Daniel Flandes-Eusebio and Luis Pellegrin- Zazueta, Action Selection and Obstacle Avoidance using Ultrasonic and Infrared Sensors, Departamento de Inteligencia Artificial, Universidad Veracruzana, México

[5.] Multibeam Sonar Theory of Operation, L-3 Communications Sea Beam Instruments, 141 Washington Street East Walpole, MA02032 1155

  1. Journal on System development Life cycle

  2. PIC16F873 Datasheet, Retrieved September 19, 2012, from http://wikipedia.org/wiki/PIC16F873

  3. W, Manthey, N, Kroena, V, Magon, Ultrasound Science Technology,

    Meas; 1992

  4. J, Tougaard, L. A, Miller, J.A, Simons, Advances in the study of echolocation in Bats and Dolphins, Chicago; Chicago University Press, 2003

  5. Crystal, Retrieved September 19, 2012, from http://wikipedia.org/wiki/crystal

  6. Ultrasonic basis, retrieved September 3 2012, from www.seattlerobotics.org

Leave a Reply