BUFFERS/ISOLATORS FOR DrDAQ/1012/1016 DATALOGGERS PART 2

Post discussions on projects you are working on
Post Reply
Glovisol
Advanced User
Advanced User
Posts: 0
Joined: Sat May 11, 2013 10:03 am
Location: San Marzano Oliveto, Asti, Italy

BUFFERS/ISOLATORS FOR DrDAQ/1012/1016 DATALOGGERS PART 2

Post by Glovisol »

8 BIT BUFFER/ISOLATOR

The readers who have seen the posts on the DrDAQ (Analogue) Universal Buffer, will be surprised to see that the new (Digital) buffers are far simpler to construct, as the parts count has been drastically reduced by the Micro’s presence. This feature has been made possible by the previously mentioned capability of the Picolog DA’s to read PWM directly as a DC voltage proportional to the duty cycle: in other words the DA’s read the photocoupler outputs directly at a very low impedance, doing away with low pass filters, operational amplifiers and the negative PSU needed for the Op Amps.

All that follows applies to isolators implemented with Arduino UNO Micros, which, although with a read capability of 10 Bit, have a PWM output capability limited to 8 Bit. In future posts I shall illustrate Isolators implemented with Arduino ZERO Micros, which can be set for a PWM output capability of up to 16 Bit, far exceeding the resolution of the DA’s under consideration.

Referring to the blocks diagram, the Micro accepts 6 Analogue inputs A0, A1, A2, A3, A4 & A5. When working with I2C, inputs A4 and A5 are used for I2C communications and the analogue inputs reduce to A0, A1, A2 & A3. The connection between an input pin and any of the PWM capable output pins is determined by the software written in the sketch to be uploaded.

The Micro is a 5V device and the PWM is a variable duty cycle square wave with an approximate amplitude of 4.5V (5V nominal) which is too much for the DA’s. Each Micro’s output is connected to an Optocoupler which has two functions:

(1) it isolates the output common ground from the input ground and
(2) it translates the PWM level from 0-5V (nominal) to 0-2.5V, suitable for the DAs.

Therefore the Micro system amplitude and resolution are referred to 2.5V. The blocks diagram shows a precision/high stability reference (derived by the USB 5V) connected to the AREF pin of the Micro. To produce a 2.5V PWM, the Optoisolator output transistors must be fed with 2.5V. This voltage is obtained by an adjustable regulators which is fed by the separately grounded USB +5V coming from the System Operation Laptop, which reads the DA by means of the Picolog software.

Thus the Digital Buffer/Isolator is extremely simple: one Micro, one precision zener, one small voltage regulator IC and a few Optoisolators: 3 or 4 for the DrDAQ and 6 for the 1012/1016 DA's.

With reference to the schematic diagram, the Micro has 14 output pins. All these pins are digital and handle either ON/OFF signals or PWM signals: therefore the PWM ouput pins must be selected as follows.

Pins 0 (Rx) and 1 (Tx) cannot be used, because they are in parallel to the USB handling hardware. Anything connected here would interfere with the USB uploading and Serial Port communications with the controlling PC.

Pins 3/11, 5/6 and 9/10 (in red) are software programmable, are controlled by the Micro’s three Timers and are those with PWM capability. Without any special software provision for the Timers, the PWM output frequency is 475 Hz approx. on four pins and 900 Hz approx. on two pins. These low frequencies are perfect for the inexpensive Optocouplers used, which would distort the output waveform, introducing errors, at higher frequencies.


Precision zener D1 outputs the precision 2.49V reference to the AREF pin. A System Testing PC is necessary for loading the sketch into the Micro and for checking initial operation. For normal use the Micro will retain the software even when off and can be fed by a standard 5V USB PSU with an USB connector.

PWM output pins 3, 5, 6, 9, 10 & 11 drive as many Optocouplers as required by your DA’s application. Resistors R3 to R8 have the relatively low value of 150 Ohm, to force a high current into the internal LED diode and to preserve a good waveform shape by heavily driving the phototransistors. The Optocoupler phototransistors are used as emitter followers. This choice is extremely important. The emitter followers have the drive capability necessary for a low value load resistor of 180 Ohm, thereby swamping the the transistor's junction capacitance, producing an undistorted square wave output and, most important, providing a very low impendance drive to the Data Loggers. This feature is essential for the DrDAQ, because it drains the error current (and minimizes its effect) due to the internal pull-up resistors of the EXT.inputs.

We have seen that sensors are connected to the A0 - A5 Analogue inputs. These are true Analogue inputs (e.g. served by an Analogue to Digital Converter) with 10 Bit resolution, which is referred to our accurate and extremely stable EXTERNAL +2.49V REFERENCE (LM336 IC). Therefore the input resolution on each channel (A0 to A5) is: 2500/1024 = 2.44 mV.

Unfortunately Arduino’s digital outputs (with standard setup of the Timers) can assume only 256 discrete PWM duty cycle states and hence the output resolution (e.g. the overall system resolution) degrades to 8 Bit, e.g. 2500/256 = 9,8 mV.

In the PC screen shown, two DrDAQ EXT.inputs read fixed voltages, while the third reads a variable voltage.

More in the next post.
Attachments
Buffer/Isolator schematic diagram
Buffer/Isolator schematic diagram
Buffer/Isolator Blocks Diagram
Buffer/Isolator Blocks Diagram
Buffer/Isolator in operation connected to the DrDAQ & showing the three EXT. channels
Buffer/Isolator in operation connected to the DrDAQ & showing the three EXT. channels

Post Reply