Windmill Data Acquisition Software Logo
27 July 2015

Windmill Software Ltd
Data Acquisition Intelligence
Call now: +44 (0)161 833 2782


Monitor - ISSN 1472-0221
The Newsletter for PC-Based Data Acquisition and Control
Issue 204, July 2015

Welcome to Monitor, the data acquisition and control newsletter. In this issue we explain what you need to know about analogue-digital converters, discuss connecting a Mettler balance to a computer and give tips on using Excel with Windmill.

I hope you find the newsletter useful, but should you wish to remove yourself from our mailing list, go to Monitor Newsletter

You can download Monitor as a pdf file from http://www.windmill.co.uk/monitor/monitor204.pdf.

Follow @DataAcquisition on Twitter Google+ Data Acquisition News Feed (RSS)

Contents

* Understanding Analogue-to-Digital Converters
* Windmill Questions: Interfacing a Mettler Toledo Balance
* Excel Corner
* DAQ News Round-up


Understanding Analogue-to-Digital Converters

Web link: http://www.windmill.co.uk/analogue-to-digital-converter.html

Data acquisition systems capture real-world signals and convert them into a format that a computer can understand. Many signals - such as temperature, pressure and strain - will originally be analogue. These need converting to a digital signal before being transferred to the computer. This is done by an analogue-to-digital (A/D) converter.

Analogue-to-digital converter symbol

This article explains the meaning of the terms that hardware manufacturers use when describing their analogue-to-digital converter.

Range

The input (or gain) range refers to the maximum and minimum voltage that will be digitised by the A/D converter. An input may be bipolar, covering a range of -10 mV to +10 mV for example; or unipolar, perhaps covering a range of 0 to 10 volts. Many systems offer a choice of ranges, and you can select the most appropriate using software like Windmill. It's best to choose the smallest range that encompasses your signal, as this optimises the resolution.

Resolution

The resolution of the A/D converter is the number of steps into which the input range is divided. The resolution is usually expressed as bits (n) and the number of steps is 2n-1 (which equates to 2n values). A converter with 12-bit resolution, for instance, divides the range into 212, or 4096, values. In this case a 0-10 V range will be resolved to 2.5 mV, and a 0-100 mV range will be resolved to 0.025 mV. Although the resolution increases when you narrow the range, there is no point in trying to resolve signals below the noise level of the system: all you will get is unstable readings. Some A/D converters have a choice of resolutions (offering 12-, 13-, 14-, 15- and 16-bit for example). You can choose the most suitable for your application, balancing speed against accuracy.

Successive Approximation Converter

A technique used in some types of analogue-to-digital converters to quickly measure a momentary value of the analogue signal. It compares the signal with progressively smaller values, each step getting nearer to the actual voltage. The converter first compares the signal against a voltage which is half the input range. It keeps the half if the analogue input signal is above that level and adds a quarter of the input votage before comparing again. Twelve such steps will give 12-bit resolution.

Successive Approximation Analogue-to-Digital Converter
Successive approximation analogue-to-digital converter diagram

Conversion takes place in four stages

  1. The analogue signal is frozen in the sample and hold circuit
  2. It is converted to a digital number
  3. The order in which the two bytes required for this number will be sent to the computer is selected
  4. The two bytes are placed into either a pipeline or buffer store.

A pipleline store lets the converter do another conversion while the previous data is transferred to the computer. A buffer lets values accumulate to be read by the computer when convenient. This frees the computer from having to deal with the samples in real time, allowing them to be processed in batches without losing any data.

Sample and Hold Acquisition Time

A sample and hold circuit freezes an otherwise varying analogue voltage at the moment the sample is required. This voltage is held constant whilst the A/D converter digitises it. The acquisition time is the time between releasing the hold state and the sample circuit settling to the new input voltage. Sample and hold circuits are not used with integrating converters.

Flash Analogue-to-Digital Converter

Like the successive approximation converter, this works by comparing the input signal to a reference voltage. A flash converter though, has as many comparators as there are steps in the comparison. So an 8-bit converter has 28 or 256 comparators. This makes an extremely fast converter.

Integrating Analogue-to-Digital Converter

An integrating A/D converter averages the analogue input signal over a period of time. This helps to reduce noise. It is a slow method of conversion and is suitable when the signal to be measured fluctuates slowly, as in the case of a temperature monitored by a thermocouple.

In a Dual Slope Integrating Converter for example, the input signal charges a capacitor for a fixed period. The capacitor is then allowed to discharge at a fixed rate and the time to fully discharge the capacitor is measured. This time is a measure of the integrated input voltage.

Another type of integrating A/D converter is a Charge Balancing Converter. Here the input signal charges a capacitor for a fixed period, but in this case the capacitor is simultaneously discharged in units of charge packets. (Meaning that if the capacitor is charged to more than the packet size it will release a packet, if not a packet cannot be released.) This creates a pulse train. By counting the pulses coming out of the capacitor, the system determines the input voltage. A charge balancing converter is also known as a voltage to frequency converter.

Integrating Analogue-to-Digital Converter
Dual slope integrating analogue-to-digital converter diagram

Integration Time

The time over which an integrating A/D converter averages the analogue signal. In countries with a 50 Hz mains supply, a 20 millisecond integration time will average over a complete mains cycle - helping to reduce mains frequency interference. You can use Windmill software to choose the integration time for many data acquisition systems

Conversion Time

The time taken to convert an analogue signal to a digital signal.

Throughput

Throughput is the maximum rate at which the A/D converter can acquire and transfer data values. Roughly speaking, it will be the inverse of the (conversion time + the acquisition time) of the A/D converter. Thus a converter that takes 10 microseconds to acquire and convert will be able to generate about 100000 samples per second.

Throughput can be increased if a second conversion can start while the first is still in progress. Throughput may be slowed down, however, by other factors which prevent data transfer at the full rate. For example, signals which are switched (multiplexed) into the converter may need time to settle - especially highly amplified signals or signals from high impedance sources.

The throughput of an integrating converter however isn't the inverse of the integration time. It also depends on the maximum discharge time.

Linearity

Ideally an A/D converter will convert the input range into equal steps. In practice the steps are not exactly equal, which leads to non-linearity in a plot of A/D output against analogue input signal.

Offset Errors

Offset is where you get a reading other than zero for a zero condition: every reading will be inaccurate by this amount. Offset errors are minimised by including signal conditioning circuits before the A/D converter in the system.

Re-Calibration

Some A/D converters are able to re-calibrate themselves periodically. They measure a reference voltage and compensate for offset and gain drifts. This is useful for long term monitoring as it prevents drifts from accumulating. If the re-calibrations are set too far apart, there may appear to be small discontinuities in the recorded data as the re-calibrations occur.

Drift occurs because of temperature changes, and because component values change over time.

Drift is usually only significant if you are trying to measure low-level signals - a few millivolts - over long periods of time or in difficult environmental conditions. In these cases look for self-calibrating systems.

Further Reading

Understanding Analogue-to-Digital Converters


Questions on Using Windmill

Web link: http://www.windmill.co.uk/mettler.html

Question

I am interested in purchasing a Windmill Software so as to output data from a RS232 port (from a Mettler Balance) to a computer. Is the software able to be used as is or is there a manual? Also, could you send me a quote for the software?

Answer

The software can be used as is and there is comprehensive Help within the software. We also have a web page about the settings to use with a Mettler balance. The software costs £50.

To use Windmill to collect data from a Mettler Toledo balance: download the software then

  1. Run Windmill ComDebug, select Create a new Windmill Instrument File and enter your balance's communication settings.
    com port settings
  2. Run the Windmill DDE Panel, Logger or Chart program to save or display data from your balance.

Any questions on using Windmill you'd like to see answered here, just ask: monitor@windmillsoft.com. You can buy Windmill from https://www.windmillsoft.com/daqshop/rs232-modbus.html. It will collect data from any instrument which can communicate with a computer over RS-232, RS-485, Modbus, Ethernet, Internet or TCP-IP.


Excel Corner

"Is there a command to close Windmill if called from an Excel VBA?" So asked one of our reader's this month.

You can do this from Excel using DDE in a simple macro.

'Create a DDE link to the Windmill program
 ddeChan = Application.DDEInitiate("WINDMILL", "data")

'Close the Windmill program
 Application.DDEExecute ddeChan, "DESTROY"

'Terminate the DDE link
 DDETerminate ddeChan

Where "WINDMILL" is the DDE service name and "DESTROY" is the command to close a Windmill program. You can find the program's DDE Service name under DDE on the File menu. "WINDMILL" is the default service name for DDE Panel and "LOGGER" the default for Logger.

Here are all the commands you can send to Windmill from Excel. Commands are shown in uppercase and their parameters in brackets.

DESTROY
Closes the Windmill application.
START
Starts logging or charting.
STOP
Stops logging or charting.
INTERVAL (new interval in seconds)
This command is supported by Logger, the DDE Panel and Graphics. It determines how often the channels are read. For example a 500 millisecond update rate would be specified as:
Interval 0.5
LOAD (setup file name)
Loads a new setup file. You could use this command to change the channels being monitored. For example Windmill Chart may be switched between charting temperature channels to pressure channels, or a Graphics window may be changed to show a different part of the process.
PRINT
This is available with Windmill Chart and Graphics. You could use Print, for example, in an Excel macro to produce a hard copy of a test after its completion.
The printout is sent to the default Windows printer, as set in Control Panel. Areas not visible on the screen will not be included on the print-out.
MAXIMIZE
Makes the Windmill window full screen size. This is not available on Graphics which is confined to the size of the background bitmap.
MINIMIZE
Iconises the Windmill window.
MOVE (x pos) (y pos) (x size) (y size)
Moves and resizes the Windmill window. The co-ordinates are in pixel units and refer to the position of the top left hand corner of the window. They are absolute, not relative to the current position.
You can omit the size parameters if you don't want to change the dimensions of the window. To move the window to the top left of the screen, for example:
Move 0 0
RESTORE
Restores the Windmill window to the size it was before it was minimised or maximised.

Further Reading

For more Excel tips see http://www.windmill.co.uk/excel/excel-tips.html. If you have a question on using Excel please contact monitor@windmillsoft.com


DAQ News Round-up

Welcome to our round-up of the data acquisition and control news. If you would like to receive more timely DAQ news updates then follow us on Twitter - @DataAcquisition or grab our rss feed.

Elephant seals measure oceanic dissolved oxygen

The seal-derived measurements of dissolved oxygen in the Southern Ocean give better results than possible using any other method, conclude French scientists.
Source: SCUBA News
http://news.scubatravel.co.uk/

Elephant seals measure oceanic dissolved oxygen

RFID tagged bees offer insight into insect disease

Bees tagged with Radio-Frequency Identification (RFID) chips have given Australian scientists new insight into how disease affects the communal insects. The team from James Cook University used the wireless communication technology to track 960 bees over their lifetime, half of whom had been infected with a low dose of nosema spores - a fungal gut parasite common amongst adult honeybees.
Source: Engineering & Techonology Magazine
http://eandt.theiet.org/

Global fingerprint sensors market to grow at 17% a year

According to new research, the Fingerprint Sensors Market is expected to reach over 14000 million dollars by 2020.
Source: Markets and Markets
http://www.marketsandmarkets.com/

Terahertz sensor could improve airport security

Researchers have developed a new type of sensor said to be able to detect and identify hidden objects more rapidly than existing technologies.
Source: The Engineer
https://www.theengineer.co.uk/


* Copyright Windmill Software Ltd
* Reprinting permitted with this notice included
* For more articles see http://www.windmill.co.uk/
We are happy for you to copy and distribute this
newsletter, and use extracts from it on your own web
site or other publication, providing the above notice
is included and a link back to our website is in place.

For previous issues by subject see http://www.windmill.co.uk/monitorindex.html

DOWNLOAD DATA ACQUISITION SOFTWARE
As a thank you for subscribing we offer you the ComDebug data logging and Com port trouble-shooting software. Log data over RS232, RS422, RS485 or Modbus. Also included is a month's trial of the Windmill 7 logging, charting and control programs.

SUBSCRIBING OR CANCELLING SUBSCRIPTION Visit http://www.windmill.co.uk/newsletter.html and add or remove your e-mail address.

Windmill Software Ltd, PO Box 58, North District Office,
Manchester, M8 8QR, UK
Telephone: +44 (0)161 833 2782
Facsimile: +44 (0)161 833 2190
E-mail: monitor@windmillsoft.com
http://www.windmill.co.uk/
https://www.windmillsoft.com/
Google+


Subscribe to Monitor

Email:
Format:

Previous Issue Next Issue


Comments