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





 

September 2004, Issue 170

Multilab
Build a Z8 Encore!-Based Multipurpose Test Instrument


by Brian Millier

PULSE GENERATOR

The Z8 Encore!’s timers are extremely versatile (including a PWM function), so I decided to include pulse generation capability in the design. The only additional thing required was a bit more firmware. All of the hardware was already there.

The 16-MHz system clock acts as the timing reference, giving a resolution of 0.0625 µs on the fastest range. Both the pulse period and pulse width are entered as 16-bit values, giving a wide timing range. Using the Timer0 prescaler, with its division rates from two through 128, you can extend the range from microseconds to seconds, as shown in Table 2.

When in use, merely enter the period and width values, using the appropriate units (seconds, milliseconds, and microseconds), and the firmware picks out the correct range and sets the prescaler accordingly. The Z8 Encore! PWM function can produce either active-low or active-high pulses. So far, I have only allowed for active-high pulses in the firmware. 

HIGH-RES DC VOLTMETER

Another feature I thought would be useful in the MultiLab is a high-resolution DC voltmeter. The timers and display were already there, so all I had to add was a suitable A/D converter. For high-resolution use, it’s hard to beat the tried-and-true dual-slope integration method, which is what is used in most DVMs. In the past I’ve successfully used the ICL7135, but Microchip now makes the TC500, which is a higher resolution (16-bit) analog front-end device. The TC500 is small, inexpensive, and somewhat more suited to this application.

The TC500 is basically a precision bipolar dual-slope integration A/D converter with a built-in auto-zero function. All you have to add to complete the design are three capacitors and a stable voltage reference. The MCU must provide two digital I/O signals (control A, B) to control the four-phase conversion sequence that the device uses. Also, the MCU must accurately time both the integration and deintegration phases and monitor the state of the TC500’s comparator during the former phase. I used the Z8 Encore!’s Timer1 to handle the timing. I also used two other I/O lines for the control and comparator monitoring function. To provide for good power line noise rejection, the integration phase is set to 16 power line cycles, or 266.66 ms.

Figure 4 is a timing diagram for the circuit. To match common DVMs, I used a 10-MW input divider chain and implemented three input ranges: 1, 10, and 100 V. The voltmeter circuitry is shown in Figure 1. 

(Click here to enlarge)

Figure 4—This is a conversion timing diagram for the TC500 analog front-end device. I chose an integration time of 16 PLCs to minimize the 60-Hz noise pick-up.

DC VOLTAGE REFERENCE

I often need an accurate DC voltage reference source. Generally, this is in the 0- to 10-V range, but I occasionally need to simulate a thermocouple that produces signals in the low millivolts range.

I chose a Burr-Brown 12-bit SPI DAC to provide this voltage reference source. The DAC7611 comes in an eight-pin DIP and contains its own voltage reference. I added an op-amp output buffer and a 1000:1 voltage divider to provide for 0- to 10-V and 0- to 10-mV output ranges.