Site hosted by Angelfire.com: Build your free website today!
 


Water & Temperature Control Unit Project (WTPJ) Block Diagram
 
Microcontroller Board: Adapt11C24DX
Special Features:
  • Compact "DX" form factor (2.8" x 2.1") 
  • Works with any 68HC11 E series microcontroller 
  • Standard version has 8 MHz crystal (2 MHz bus speed) 
  • Turbo version has 9.8304 MHz crystal (supports SCI baud rate up to 38400) 
  • Choice of 8K or 32K EEPROM (or 32K RAM) 
  • 512 bytes internal RAM (on MCUs) 
  • 28K external RAM piggy-backed on some configurations 
  • Hardware Write Protect switch for EEPROM 
  • design includes 68HC24 port replacement unit (PRU) for full 68HC11 port compatibility 
  • 26 general purpose I/O lines (including 3 input captures and 5 output compares) 
  • Pulse accumulator, hardware timer, real-time interrupt, watchdog, 2 hardware interrupts 
  • 8 channel 8-bit analog-to-digital converter 
  • Serial peripheral interface (SPI) port offers virtually unlimited expansion 
  • Serial Communications Interface (SCI) port, with programmable baud rate 
  • RS-232 serial port, utilizing on-chip SCI 
  • SCI compatible with MIDI and RS485/RS422 
  • On-board reset circuit and button, 5V regulator, and RS232 interface 
  • Low power requirements (45 mA nominal); much less in STOP mode 
  • Use programming language of your choice: C, BASIC, assembler, etc. 
  • Compatible with BUFFALO and PCBug11 debug/monitor programs 
  • Easy program-loading via MicroLoad, PCBug11, HCLOAD, XLOAD, ICC11, etc. 
  • All port pins are brought out to standard 50-pin connector pattern 
  • Virtual plug-in interchangeability with all Adapt11 family boards 
  • 11 connector options for the ultimate in modular design capabilities 
  • Low cost-- ideal for educational and embedded applications 
  • Accessories available
2-Way Water (Inlet & outlet valve)
Soild State (Water Level sensor)
Interfacing Analogue Signals

Physical variables such as temperature and pressure are analog in nature. This analog signal must be converted to a digital value before it can be processed by the CPU. This conversion is done by MCU's analog to digital converter.

The key issue of acquiring and outputting data is in five steps sequence:
1. Writing to the ADC's control status register (ADCTL) to initialise the unit and to begin conversion.

2. Accessing the data from a result register.

3. Storing the information in memory.

4. Converting the data from binary to decimal.

5. Displaying the decimal result on the display.
 

Input Range and Resolution

Two basic specifications for an ADC are analog input range and resolution. Input range for an M68HC11 microcontroller is 0 to 5.12V.
Resolution for the M68HC11 is 8 bits. This specification means that the ADC has only one 8 digital outputs (i.e. 28=256 possible binary output values from 00000000 to 11111111. Resolution also gives a measure of accuracy.

The Quantisation error is inherent in all ADC's and can be reduced only by dividing the analog input into more partitions for better resolution. But unfortunately the M68HC11 uses an 8-bit on board converter.

Eg. The 8-bit M68HC11 has an input range 0 to 5.12V

Resolution = 5.12/256  = 20mV

This means the input must change by 20mV to change the digital output code by 1 bit.
 

Signal Conditioning Circuit (SCC)

This is because raw sensor outputs are not always suitable for analog-to-digital conversion. Signal conditioning circuits typically amplify the raw signal from a sensor.

Vcc  =  Vce  +  Ic Rc  + Vled
5 =  0.1  +  25m Rc  +2.3V
Rc  = 104

HFE (min)BC557   =  Ic /  Ib
Ib  =  Ic  /  HFE
Ib  =  25mA  /  125
Ib =  200  uA

Vcc  =  Veb  +  Ib Rb  +  Voh(min)
5 =  0.7  +  200uA * Rb  + 2.4
Rb  =  9.5K

Vcc  =  Vce  +  Ic Rc  + Vled
5 =  0V  +  Ic Rc  +  Vled
5 =  0V  +  10mA * Rc  +  1.2
5 ?1.2 / 10mA   =  Rc
Rc = 390 

HFE (min)BC557   =  Ic /  Ib
Ib  =  Ic  /  HFE 
Ib  =  10mA  /  125
Ib =  80  uA

Vcc  =  Veb  +  Ib Rb  +  Voh(min)
5 =  0.7  +  80uA * Rb  + 2.4
Rb  =  23.75k