Upload
arya2arya
View
220
Download
0
Embed Size (px)
Citation preview
7/28/2019 The Project Aims to Build a Dynamic Water Pump Controller
1/8
The project aims to build a dynamic water pump controller, that monitors a
tank of water and supply line continuously and keeps the tank topped up.
Selection of Pressure Sensor: The sensor I have selected is a differential
pressure sensor. A differential pressure sensor has generally two ports and are
used to measure pressure differences. In this case one port will be left open to
atmosphere, while the other port would be connected to the drain/supply line.
The advantage is that such an arrangement eliminates variation in pressure
due to changes in atmospheric pressure.
Now lets delve into the mathematics of pressure .Static Pressure exerted by a still column of water is given by the equation
Pressure(P)= fluid density (?) x gravitational acceleration(g) x
height of fluid column(h).
Hence pressure exerted by a water tank of 2 meters height =
P=1,000 kg/m3 x 9.81 m/s2 x 2 = 19.62 kPa (kiloPascals)
7/28/2019 The Project Aims to Build a Dynamic Water Pump Controller
2/8
Now above is a very basic equation valid only for a sensor placed at the bottom
of a tank. In real world scenario it is quite likely that the sensor will be
connected at the end of a pipe. Lets consider the following case.
A 2 meter high filled water tank is placed on the roof of a building
30 ft high. The sensor is placed at the bottom of the tank on a 1in
dia pipe.
In such a case above equation are no longer valid as the head changes. I am
still lingering in the realm of static pressure and have not catered for dynamic
pressure.
The new water head= 2 mtr + 30 ft =11.14 mtr.
Hence pressure exerted = 1,000 kg/m3 x 9.81 m/s2 x11.14 = 109.2834 kPa(kiloPascals)
Hence I have selected MPX2100 from Freescale Semi for the sensing pressure
from the main tank.
Selection of Micro-controller: This is a no-brainer. Since the contest is
sponsored by guys at Texas Instruments and they have shipped me a MSP430
development board Launchpad. I already have 3 launchpad boards and this
one adds one more to their company.
Amplifier Design: The MPX2xxx series differential pressure sensors can be
approximated to a resistor (Wheatstone) bridge. Hence the output is a
7/28/2019 The Project Aims to Build a Dynamic Water Pump Controller
3/8
differential voltage. The span of the differential voltage demands a sensitive
instrumentation amplifier. Ti guys have been kind to ship me samples of their
instrumentation amplifiers. To keep the power supply or the circuit simple, I
would be designing my circuit around a single supply instrumentation
amplifier.
Characteristics of MPX2010 and MPX2100:
Excitation
Voltage Min Span (mV) Max Span (mV) Min Offset (mV) Max Offset (mV)
10 V 38.5 40 -1 1
5 V (scaled) 19.25 20 -0.5 0.5
9 V (scaled) 34.65 36 -0.9 0.9
12 V (scaled) 45.6 48 -1.2 1.2
15 V (scaled) 57.75 60 -1.5 1.5
MPX2100DP
Excitation
Voltage Min Span (mV) Max Span (mV) Min Offset (mV) Max Offset (mV)
10 V 24 26 -1 1
5 V (scaled) 12 13 -0.5 0.5
9 V (scaled) 21.6 23.4 -0.9 0.9
12 V (scaled) 28.8 31.2 -1.2 1.2
15 V (scaled) 36 39 -1.5 1.5
MPX2010DP
Offset and Span considerations:
What is Span? Span, put simply is the the max output of the sensor minus
7/28/2019 The Project Aims to Build a Dynamic Water Pump Controller
4/8
the min input.
What is Offset?Offset is the output of the sensor without any applied
stimulus. For our sensor according to data-sheet Offset is defined as the
output voltage at the minimumrated pressure.
Considering the analog input characteristics of MSP430 devices, the desired
offset is 0.5V and the desired span is 3V. 3V is the maximum analog input
voltage for MSP430G2x53 devices.
Gain Calculation:
Maximum Gain (GMax) = Desired Span(V) ?Sensors Minimum Span
Maximum Gain (GMin)= Desired Span(V) ?Sensors Minimum Span
Excitation
Voltage MPX 2010 GMax MPX2010 GMin MPX 2100 GMax MPX 2100 GMin
10 V 125 115 78 52
5 V (scaled) 250 231 156 104
9 V (scaled) 139 128 87 58
12 V (scaled) 104 96 65 53
15 V (scaled) 83 77 52 35
Gain Calculations
As I mentioned earlier, to keep the overall circuit simple and costs low, I
would be using a single supply instrumentation amplifier from Texas
Instruments. I would be using INA122 from TI for the project.
For INA122, Gain (G) = 5 + (200K ?RG). RG is a gain setting resistor.
Now lets calculate values of R G for different gain settings
RG=200k?(G-5)
Excitation
Voltage 10V 5V 9V 12V 15V
7/28/2019 The Project Aims to Build a Dynamic Water Pump Controller
5/8
MPX2010 1.67K? 820? 1.49K? 2.02K? 2.6K?
MPX2100 2.74K? 1.32K? 2.44K? 3.33K? 4.3K?
RG Values
Excitation
Voltage 10V 5V 9V 12V 15V
MPX2010 1.6 K? 820 ? 1.5 K? 2 K? 2.7 K?
MPX2100 2.7 K? 1.3 K? 2.4 K? 3.3 K? 4.3 K?
RG Values approximated to nearest std. resistor values
Schematic Diagram for sensor-amplifier interface
Man Machine Interface I would be using a 204 HD44780 LCD display
and a detented rotary encoder for making the man machine interface. This
interface This I anticipate would take bulk of my coding time. There are two
major obstacles that I foresee in front of me. The first is the the number of
7/28/2019 The Project Aims to Build a Dynamic Water Pump Controller
6/8
pins available on microcontroller to interface the LCD.
The LCD in 4 bit mode requires a minimum of 6 pins to
interface with a MCU and the rotary encoder will use 3. Thus ,using 9 pins
from 16 available is going to cause an acute shortage of pins for any additional
use. However yesterday I successfully interfaced the MCU using a shift
register 74HC164. This has had 2 major positive impacts. The code overhead
required for LCD routines has decreased significantly and also has caused
reduction in number of pins from 6 to 3.
7/28/2019 The Project Aims to Build a Dynamic Water Pump Controller
7/8
First obstacle ..overcome!
The second obstacle is wring the routine for the menu itself. This is going to be
a long and buggy process as I would require the MCU to be state aware andthus write a state machine for menu function.
7/28/2019 The Project Aims to Build a Dynamic Water Pump Controller
8/8