Hardware Design


Home
High Level Design
Implementation
Results & User guide
Useful Links
A 2nd Try
Source Code
Schematics
Acknowledgements

Port Assignments Hardware Design Program Design List of useful IC's

  • Pressure sensor signal conditioning
  • 1-wire bus implementation
  • PS/2 keyboard interface
  • Choice of connectors
  • Video Overlay IC

Pressure sensor signal conditioning

By itself, the Motorola MPX2100A pressure sensor only produces a 20mV output with a voltage supply of 5V. This is not only too small for the MCU to read, it is also a differential voltage output and not single ended as required by the MCU. The reference voltage for the ADC on the MCU is set to 5V, with 10 bit conversion, the MCU can only measure 5V/1024 = 4.8 mV per ADC unit. The variations in the pressure sensor output is less than 0.1 mV at standard pressure. Thus I needed to amplify the voltage output of the sensor.

In order to make the signal from the MPX2100A suitable for the MCU, I had to amplify the differential output and shift it to reference ground. To do this, I needed a instrumentation amplifier. The instrumentation amplifier has two inputs, V+ and V-, it's output is single ended and referenced to ground. An example can be found in The Art of Electronics, Horowitz & Hill, p. 425.

For my project, I chose to use the INA121, a FET-Input, low power, instrumentation amplifier. The INA121 has a 8-DIP package and hence saved me from tedious surface mount work. The low power requirements also made the amplifier compatible with my 5V power supply. Also by varying the value of the gain resistor across pins 1 and 8, I could vary the gain as needed. Calculations for the voltage to pressure conversion can be found in the sensors portion of the program design page.

By using a 500 Ohm resistor, I was able to produce a output voltage of about 2.08 V, large enough for the MCU to detect changes in pressure. With the 500 Ohm resistor the gain of the Op-Amp is about 101, thus a 1 mmHg change in pressure leads to a 2.8mV change in voltage. Since the MCU can measure at a precision of 4.8mV, it can detect changes of 1.7 mmHg. Which is reasonable for my application.

1 Wire Bus implementation

The Dallas 1 wire bus specification states that the bus must be pulled-up when not in use. However when I used the Codevision AVR library for 1-wire bus control, the pull-up for the bus port on the MCU could not be turned on. Hence I had to add a  4.7k resistor to comply with the specifications.

PS/2 keyboard interface

Details on the PS/2 protocol can be found in the program design page.

Most PS/2 keyboards use a 6 pin mini-DIN socket. A good panel mount plug for interfacing with the keyboard can be found at Digikey.com (Digikey no. CP-2660-ND ).

Pin - Description
1 - Data
2 - not used
3 - Ground
4 - +5 V
5 - Clock
6 - not used

The data and clock lines are pulled-up to 5 volts. We only need to connect 2 I/O pins( with pull-up turned on) of the Atmel MCU to these lines.

Choice of connectors

For the ADC input ports, I choose to use banana posts as these are compatible with both banana plugs and wires.

As for the remote sensor, I used a RJ-11 connector. These connectors are common and inexpensive. By using a RJ-11 socket, my project is compatible with any commercially available 4-wire telephone extension cable. Telephone cable is twisted pair, by having a ground line twisted together with the two signal lines some shielding from noise can be achieved.

Video Overlay IC

The diagram above is from the STV5730A datasheet.

In order to reduce costs, I did not use external filters and eliminated the bias resistors for adjusting the luminance of the output. Specifically, I shorted pins (1,28), (24,25), and left pins 23,22 open. Pins 14-17 were also left open because I did not need to generate an external RGB signal.

The BAT42 diode in the suggested application schematic is no longer in production. I replaced it successfully with a schottky rectifier (Digikey 12TQ035-ND). Also, a 2N3904 NPN general purpose amplifier was used as the video output driver for the CVBS out in the above schematic.

Actual circuit used for STV5730A

...

Click here for the full schematic The wires leaving the picture connect to the Atmel Mega163 MCU


Home | High Level Design | Implementation | Results & User guide | Useful Links | A 2nd Try | Source Code | Schematics | Acknowledgements

 Copyright 2002, Use the information on these pages at your own risk.
For problems or questions regarding this web contact Zhi-Hern Loh.
Last updated: 11/11/02.