ULTRASONIC SENSOR PROJECT

At university I was tasked to design an analogue based circuit, capable of measuring a variable and outputting a continuous 0-3.3VDC voltage proportional to that variable.

I chose distance to be my variable and used an ultrasonic sensor to do so.  


The sensor works by transmitting a cycle of ultrasonic bursts and then receiving them after deflection from nearby objects. This is translated into a PWM voltage with the output high time being proportional to the distance the object is away from the transmitter. The sonic bursts are triggered by a negative edge on the input trigger pin whilst the PWM output is sent to the output echo pin. 

The circuit designed triggers and receives the subsequent waveform, further filtering and amplifying it to meet the specification. It also includes extras that help display the variable. Without a block diagram the circuit can be described as follows:

1 - A 555 timer is used to trigger the sensor

2 - The sensor sends an ultrasonic burst

3 - The sensor receives the ultrasonic burst and outputs the PWM waveform

4 - The PWM waveform is fed through a second order filter and amplifier to reach the desired 0-3.3V across a 0-30cm range

5 - The 0-3.3V output is sent to the ALARM, BARGRAPH & ANALOGUE OUTPUT PIN

ALARM
The alarm system has two modes:
- A VCO outputting a pulsing tone proportional in frequency to the measurand
- A simple proximity detection circuit using an LM311

The variable frequency generator uses a NE556 timer chip to generate a pulsed tone at 520Hz. The 0-3.3V signal is connected to the Control Pin and is used to vary the frequency of the pulse, with the fastest frequency being when the object is closest to the transmitter. 

The proximity detection is simply a comparator setup with hysteresis to take the 556 timer out of standby when the object is within 10cm of the transmitter. 

To switch between the two modes, a momentary push button was used in conjunction with a toggle flip flop to change the control voltage level of a CMOS switch, the CD4066. 

BARGRAPH
The bargraph used has 20 segments each describing 1.5cm of movement within the 0-30cm range. To drive these LED's two LM3914 IC's were used in series, as although they are high cost, the are specifically designed for this type of application. The 0-3.3V signal is fed through a simple potential divider and into the input of the drivers. The circuit was taken directly from the Texas Instruments datasheet

ANALOGUE OUTPUT
This output pin enables the extension of the circuit by providing a buffered output of the 0-3.3V signal. 

The circuit can be found in the schematics/layout section (see tab above).

I designed the PCB in Eagle and tried to include all the options in as small a footprint as possible. Finally, the PCB was manufactured by Ragworm a hobbyist friendly PCB manufacturer in the UK. 




Thanks for looking


0 comments:

Post a Comment