Computes Industrial Measurement using Two Sensors
Our background is highly analog, but SRQ Technology also has proven digital instrument design capabilities. Here’s a digital signal conditioner project we recently completed.
For an industrial measurement application our client needed to use inputs from two sensor inputs to compute a value and produce a proportional analog output. We did so, using an 8-bit PIC® microprocessor from Microchip Inc. The application details are confidential, but here’s the concept.
Each sensor modulates a pulse generating circuit, producing pulses whose width is proportional to its measurement. Similar sensors are used for both measurements: the microprocessor design multiplexes the input between them as shown in the figure. The resultant pulse train’s width varies between “A” and “B”. The microprocessor converts the two pulse widths to digital values.
As part of the project, we developed the equations necessary to perform the required function. The microprocessor performs the calculations. Since this application requires an analog output, the microprocessor converts the result to a duty-cycle-modulated output. The resulting pulse stream is filtered and fed to analog circuitry which produces 4/20mA, 0/5V or 0/10Vdc. For other applications, of course, the output could be purely digital.
Best accuracy requires that the finished product be calibrated together with its mating sensors. We developed a computer program using Visual Basic to do this. During factory calibration the sensors are placed under known conditions. The PIC program measures them and sends their readings to the computer, which calculates and returns calibration constants. After calibration the system is ready for continuous industrial measurement applications.
Tests have shown excellent results which, our client believes, are a step above product currently on the market. Our client, who manufactures the sensors, now owns the rights to the design and has the the electronics assembled by a contract manufacturer.
About the Microprocessor
For this digital instrument design we turned to a Microchip PIC16F series microcontroller because of its many features and also because we were familiar with it from a previous project. It includes peripherals (functions beyond the microprocessor itself) which made the design much easier (and less expensive).
The input pulse is measured by one of the three timers in the PIC®: a second monitors for certain failure modes. A Programmable Switch Mode Controller (PSMC – one of three) produces the output. Computer communication makes use of the serial port (UART). The design also uses two analog comparators, the fixed voltage reference, the D/A converter and one of the three operational amplifiers (op amps) on board.
(PIC is a registered trademark of Microchip, Inc.)