circuitcellar.com
Magazine Support   Digital Library   Products & Services   Suppliers Directory 
 
 





 

June 2006, Issue 191

Earth Field Magnetometer
Cypress PSoC High Integration Challenge 2004 Winner


HARDWARE

The CY8C22213 microcontroller at the heart of the magnetometer controls the feedback loop from the fluxgate sensor to the Helmholtz coil. It also interfaces with an external 16K × 8 I2C EEPROM, a 2 × 16 LCD, an RS-232 serial port, and a five-pin ISSP connector.

Figure 1 shows the system as well as the CY8C22213’s internal module configuration. All of its three analog and four digital blocks are used along with the I2C hardware. Figures 2 and 3 (p. 67) show the digital and analog sections.

(Click here to enlarge)

Figure 1—The CY8C22213 microcontroller is at the heart of the system. The fluxgate signal conditioning was performed outside the CY8C22213 to minimize noise and offset.

(Click here to enalrge)

Figure 2—The digital circuitry is straightforward. The LCD shares some pins with the ISSP port, so it must be unplugged when programming the CY8C22213 microcontroller to avoid interference.

(Click here to enlarge)

Figure 3—The driver supplies a square wave to the sensor as well as a sync signal to enable the integrator input only when the drive coil is saturated. The Helmholtz coil is fed with an adjustable offset to compensate for the local static field (VR2), a programmable offset from the PSoC (R22), and the sensor feedback signal (R23). R22 and R23 should be ratio-matched to within 0.1%.

 

The RS-232 interface uses a few transistors for level conversion rather than an interface IC. It’s powered entirely by the serial port, which lets it wake up the system on incoming serial data without using any standby power. The interface is half duplex, which was fine for this application. The I2C port uses the CY8C22213’s internal pull-up resistors, which work only for slow-speed (100-kHz) bus transfers.[3]

The system is powered by a 9-V battery, which drives a 5-V regulator feeding the CY8C22213 and an 8-V regulator powering the fluxgate drive coil. An output pin switches power to the LCD. Another output pin controls the analog circuits. The system needs about 80 mA while taking a measurement, 1.5 mA when driving the LCD, and less than 0.25 mA when asleep.