Page 185 - Making PIC Microcontroller Instruments and Controllers
P. 185
THE EIGH' TECHNIQUES IE1
converting them to digital format, ard then interpreting them for display on a twoline
liquid crystal display. With this instrument you can determine the energy llow in most
systems if you lnow the mte of flow a the nass propertles of what is going by.
This projectcontains thebasic techniques you will need to master toprccess analog
signals as opposed to digital signals.
5. AN ELECTRONIC ARTIFICIAL HORIZOI{; SOPHISTICATED
INSTRUMEI'ltS MADE EASY WITH MICROCOiITROLLERS
Parallax sells a very interestiDg gravily sensor that indicates the change in gravity in
both the X and Y directjons as well as the ambiert temperature at lhe instmment as
three frequencies. (We will nol se the temperalure sensor parl in oul experiments )
The sensor can serse up to 2 Cs of acceleration with a surynsingly good resolution of
0.001 G (a milli-G). We will use this device to create a lwo axis table that stays hori'
zontal while the surface it is mounted on is turned every which way (within aboul
20 degrees) relatjve 1o the horizon.
we will be using is the Memsic 21 25. The Parallax company deliv
The accelerometer
ers it already mounted on a tiny board with pins at 0. 1 inches on center lt plugs direcdy
into an experimental breadboard with stdndard 0. I inch on-center holes. Thete are o y
six pins, and two of them are at ground! Three other Lines provide the tbree fiequencies
we are inlerested in, while the sixth pin is the power pin. How simple car this get?1
The signals from this sensor are in the fonn of frequencies that vary wiih the tilt of
the sensor in the X and Y direction (and the ambient temperalule). The sensor is most
sensitive near horizontal. and least sensitivc when the sensor axis is held vertical. We
can tal(e the liequencies received andprocess them so they give us the signals we need
to control a couple of hobby R/C servos. The linkages betweer the servo and table are
to be arranged to keep the lable approximalely level. The final correctlon can be pro-
vidcd in softwdre with a tookup table but that nay not be necessary depending on how
we design the softwar€l
6. THE IOUCH SCBEEI{
The touch screen teaches us how to scan a nurnbel ofsignals to decide what needs to
confolled by the signals. Uselul touch panels can be cre
be done under circumstances
ated to simulate the operatioD of conuol panels for electrcnic devices with minimal
expense.In this exercise, we create a touchpanel that contfols the blinking rate oftwo
LEDS and displays &e conditions at the panel on the LCD.
Simple touch panels can bc placed i n front of simple graphics to create the inpuls we
need to control the instrumenl and controller we are building.
7. THE FII{ISI{ED CONIROLLER
In lhls project, we convert the two temperatur€ themometer into an adjustable thermo-
stat with an exlemal inhibit capability to demonstrate our ability to create a confoller/