1) Buy the inexpensive Dataq DI-145 and use their free software for plotting. That's pretty simple! Also see the Meter/Data Acquisition Amplifier.
2) Buy the Dataq DI-148U (on eBay) and use one of the spreadsheets with a macro for reading the Dataq. I prefer the second one below. You can also follow the somewhat convoluted process for putting the images on a web page.
3) Same as #2 but use the DI-145. Modification of the macro will probably be necessary. Right-click on the macro and select "view code" to modify - probably for the more computer-savvy types.
4) Use a microprocessor to measure the desired voltage (I use various PicAXE processors). Have the micro send serial data to a computer, typically over the same connection used to program the micro. Use my AutoHotKey script below to receive the data and send it to a spreadsheet or other program.
5) Build a Keyboard Wedgie and let it type binary data directly into a spreadsheet.
6) Build a V/F converter, connect its output to the sound card and use Spectrum Lab, Argo, or another FFT program to plot the frequency.
Dataq to Excel Spreadsheet with Macro uses lines to make plots from data taken every 50 seconds for 24 hours (1728 points). Start macro at 30 seconds until 0:00 UTC to avoid a retrace line. Set rate to .02 Hz when asked. Other rates may be set and the total time to fill the spreadsheet will be 1728 / rate, in seconds. (1728 / .02 = 86,400 seconds or 24 hours)
Make sure to download and install the driver WinDaq/XL when using the Dataq device with Excel.
New Dataq to Excel Spreadsheet with new Macro that takes data every 10 seconds for 24 hours (8,640 points). Use points to make the plots on your graphs to avoid retrace lines. The large number of points will give relatively smooth curves. Set rate to 0.1 when asked by the new macro. Other rates may be set and the total time to fill the spreadsheet will be 8640 / rate, in seconds. (8640 / 0.1 = 86,400 seconds or 24 hours) These macros are rather simple and the user will probably have to modify them. Right-click on the object in the macro editor and select "view code." In there you can change the port # to the one assigned to the Dataq device (default is 5) and make other changes.
1X Magnifier that uses shift-arrow keys to position window (for use with an image capture program). Just resize the window and move the view to suit your purpose. This new version shows the location and size of the window in a toolbar balloon. Both a ready-to-run .exe and the editable AHK files are in the zipped folder.
But wait! The new Irfanview 4.36 will do timed saves of a defined rectangular region. You can manually determine the size and location of the rectangle but it's much easier to use the new 1X Magnifier above to get the desired view and transfer the window information from the toolbar balloon into Irfanview. In Irfanview go to Options/Capture/Screenshot... and choose option 7. Set the capture to Automatic with just a couple of second delay and select Show captured image in main window. Enter the position, width, and height and hit Start to see how you did. After you have the image you want in Irfanview you can slow down the sampling speed ( I use 300 seconds for the SID plot) and save the image to a Dropbox folder as I describe below.
These files are Excel spreadsheets with macros that can read a DI-148U from Dataq and enter the data into columns. (Run the macro from the "tools" menu.) The first 8 columns have data from the 8 inputs and there are 8 plots scattered around the spreadsheet - just delete the ones you don't need, or put them on other sheets.
The ninth column has the time the measurement was made. There are cells for inputting gain and offset for each channel to scale the data for the graphs to get desired units. The macro records data in a 24 hour loop, determined by the rate and number of samples. The first spreadsheet records 1728 data points and the second records 8640. The time axis on the graph is a little hard to set up because the indexing amount to get the right number of minutes per row is a strange number (basically 1/number of divisions. For a 24 hour plot with time printed every 2 hours, that would be 1/12 or .08333333 for the major axis, and 1/24 or .04166666 for the minor axis). Set the sample rate to use up the number of points in the desired time. For example a sample rate of 0.02 Hz (50 seconds) will use up 1728 points in 24 hours and a sample rate of 0.2 would fill the same number of points in 2.4 hours - the time axis of the graphs may be changed accordingly to display the data in the best format.
The DI-148U became obsolete within weeks of my buying it - that's always how it goes for me! Anyway, the macro is fairly easy to understand and it should be straightforward to modify it to work with their newer products, like the DI-145. It has four channels instead of eight, so a little modification of the macro is in order. Hopefully, it is clear what I did, but I'm open to questions. I used a sample macro from the Dataq website as a guide to make this macro, so I'll be the blind leading the blind, if you need help.
I use this macro to generate my online charts. Microsoft Excel makes the chart, and Irfanview captures the image in the magnifier every five minutes (your choice) and saves it to a local Dropbox folder, and Dropbox makes the image available to my website.
You may wish to build a Meter/ Data Acquisition Amplifier for your Dataq device. I'd use a 74HC14 in place of the CD40106 for a little more current, and use a low-power quad op-amp to make a four-channel version for the DI-145.
AutoHotkey Scripts for Serial to PC data transfer
If any of this sounds hard, it's my wordiness - this is really easy to get working.
Here's a zipped folder with a couple of AutoHotkey scripts. The .exe versions will run without any other software and the .ahk versions require AutoHotkey (but then they can be edited). These programs receive serial data, say from a PicAXE microprocessor, or anything, really, and send the data to any program, in the case of the "any" versionr or to an Openoffice.org spreadsheet in the case of the "calc" version. The "calc" version attempts to open an openoffice.org spreadsheet and then waits for you to "save as" to start. (Don't Forget to "Save As" or it will just sit there!) The "any" script prompts you with a pop-up window, giving you a few seconds to click where you want data to go, and will let the external device send data to any program, blindly - it just starts typing!
You will need to know what serial port your device is using. To start, hook your serial device to the computer, typically a USB device or USB adaptor, then go to "Devices" and see what COM port was assigned, and remember that port. (If you are using a PicAXE, you can also discover the COM port by running the PicAXE editor and selecting "options" then "serial.") Run the script and answer the questions. If you are using a PicAXE's programming serial port, set the baud rate to 4800 and leave the other settings as-is.
PicAXE and other serial devices have a short list of "commands" available in the script for navigating the spreadsheet, and these are easily modified or eliminated by opening the .ahk file using AutoHotkey:
My script "hijacks" three direction symbols, replacing them with the desired navigation commands for the spreadsheet. The "up" arrow is replaced with "ctrl-home" to go to the first cell, the left arrow with "home" to go to the first cell in a row, and the right arrow with "tab" to jump one cell to the right. I did that to make the PicAXE programming easier. Those 'if' statements could be easily stripped or commented out from the .ahk version of the script, if the symbols are needed for some other application. The PicAXE editor recognizes "CR" and it is unmodified by the script. It is used to drop down to the next row in the spreadsheet. A description of the function of these altered characters in an openoffice.org spreadsheet appears when the script runs.
This can be a cheap setup! If you buy a simple PicAXE, make your own programmer (two resistors, basically), and buy a cheap serial to USB converter, this just might be the cheapest way to get data from your experiment directly into a spreadsheet or other program. I think I could start from scratch and do the whole task for under $15. And, the spreadsheet has all sorts of features for making pretty charts and graphs, not to mention embedding the data into documents.
Here's a little PicAXE program that sends 3 columns of numbers for 20 rows, then starts over - just for testing out the system. In your project, those variables would contain data, instead of a sequence of numbers. There are comments in the listing that explain how it works. Here's how to use it:
Install Openoffice.org on your computer, if you don't already have it.
Plug the PicAXE serial cable into the computer, go to "Devices and Printers" to learn what COM port was assigned to the serial interface (or select "options" and "serial" in the PicAXE editor).
Load the PicAXE program into a suitable PicAXE chip.
Close the PicAXE editor program so that it releases the COM port.
Run the AutoHotkey .exe script on your computer, using 4800 for the baud rate and using the COM port you discovered for the serial interface.
Select "save as" in the spreadsheet and the data should start to appear. You might have to say whether or not to write over an existing file, if one already exists.
The "any" script is similar in function, except that you click on "start" then quickly click where you want the data to go, perhaps in a cell in a spreadsheet or on a page in a text editor. (You don't have to be quick if the serial device isn't sending data yet.)
Notice that you program the PicAXE over the serial cable, then it immediately starts sending data back over the same connection! It does mean that you have to close the editor or the spreadsheet so that they don't compete for the same port. Don't worry, the computer will remind you.
Keyboard Wedgie takes 10 bit data and types it directly into a spreadsheet. The "deluxe" version features some "fun" ideas.
This device simulates a keyboard and could be used with just about any operating system or computing device. A drawback is that the device requires the complete attention of the computer; it will start typing data into whatever application has the focus. It's great for dedicated setups, where installing software is out of the question. I use mine all the time because I can simply plug it into any computer and off I go. You will need to "gut" a keyboard to get the PCB.
This is a pretty strange data logger. It uses my ratiometric voltage-to-frequency circuit to make a wireless data logger for a PC. The output of the V/F drives an infra-red LED and a photo-transistor at the computer receives the signal and analyzes it using an FFT spectrum analysis program like Spectrum Lab or Argo. Those programs have features for automatically saving plots and Spectrum Lab is a treasure-trove of other features, making this data-taking scheme quite versatile. The FFT program can accommodate lots of signals so adding channels is as simple as building more converters and aiming the new IR LEDs towards the photo-transistor receiver. The circuit is quite inexpensive, employing a cheap quad comparator and a couple transistors:
(Don't choose subs for the MPSA18 and 2N4403, if possible. The 'A18 has very high gain, even at very low current and the '4403 has a zero temp-co saturation voltage when biased as shown.)
The front-end of the V/F accepts 0 to1 VDC and convert it to 1 to 2 kHz. The output of the converter drives an IR LED to transmit the signal across the room. Alternately, an optocoupler or audio transformer could be used. A direct connection will work but computers tend to have electrically noisy grounds. The accuracy and linearity of this circuit are surprising. With the 560k linearity resistor, the overall accuracy is probably about 0.2% of full scale. Selecting the linearity resistor for best performance can yield 0.05% linearity or better, depending on one's patience and equipment. All the resistors are 5% types in the prototype and the accuracy is achieved by tweaking the emitter resistor for the proper gain and adjusting the "position" control to place the trace at the desired spot on the display, typically the screen of a program like Spectrum Lab. Here's a small screen from Spectrum Lab:
I made those steps by hand with a 10-turn pot, hence the squiggles at the edges. By instructing Spectrum Lab to subtract 1 kHz from the spectrum display, the frequency in Hz corresponds to millivolts. The converter is accurate beyond the ability to resolve on the screen, even when it's full-size. The V/F was on a bench across the room and held down by a heavy battery (just for the mass):
The V/F is the little board with the blue gain pot. The big pot is the "position" or zero offset control. I don't have the resistors in each end of the position pot so it's a bit sensitive. The IR LED is pointing at my desk where the photo transistor resides.
At this point the receiver is nothing more than an infra-red photo-transistor with the collector tied to the tip and ring and the emitter tied to the ground of the microphone input. The microphone input supplies the power for the transistor. The signal is huge, even without any IR filter material over the photo transistor. I'd recommend using a black plastic IR photo-transistor since they have built-in visible light filtering. Just for kicks I tried a program called Argo using a mode called QRSS 20 with and offset of -1 kHz:
Receiver phototransistor and a close-up from Argo
The little plot on the right shows the results of a 1 mV step on the input. It jumps around at the transition because I'm trying to set it by hand with a ten-turn pot. I think you can see the wires in the pot on the plot! My voltmeter was reading 610 mV before I adjusted it down to 609 mV. That's some nice resolution! The plot is quite impressive when it fills the screen and the accuracy and stability of the V/F shines.
It's a slower data taker that would lend itself to weather instruments, radiation measurements, propagation plots, and other slow-moving data. The audio format makes data logging as simple as grabbing a voice recorder or a smart phone with an app. The signals from several V/Fs could be transmitted along a common wire if the IR link isn't practical. Single channel links could use a tiny AM or FM transmitter to a suitable receiver; it's just audiio.
Here's my original circuit that shows a few optional front-ends. This version produces 0 to 10 kHz with surprisingly good performance at very low frequency. When using an FFT program it's best to restrict the frequency range to a single octave to avoid harmonics appearing on the plot. So I'd offset the input to have a minimum frequency that is 1/2 full-scale, as is done with the open switch in the optional input circuit schematic to the left.
Here's a list of advantages to this ratiometric V/F:
More measurement resolution is easily had by simply counting longer (4.5 digits in 1 second and 5.5 digits in 10 seconds for a 10 kHz V/F), or by using a high resolution period measurement or fractional cycle measurement.
Ratiometric response rejects excitation voltage variations when using bridges or voltage dividers. Simply run the V/F and sensor on the same voltage.
The signal is inherently averaged over the full measurement interval.
Open-loop design gives very low jitter at low input levels, giving steady readings and making high-resolution period measurements possible.
Frequency output can be directly plotted using FFT software, such as Spectrum Lab or Argo.
Linearity adjustment can remove some non-linearity from the source as well as the reset non-linearity.
Not shown is that a transistor may be added to pull pin 2 down for an external sync, greatly reducing the tendency for the last digit to jump around in simple digital counter applications. The gate signal simply turns on the 2N4403 until the counter is ready to count again, making the circuit start at the same point for each count period. (Not needed when using FFT analysis.)
This open-loop design relies on key components' stability for precision, but the lack of feedback gives it remarkably low jitter, especially at low input levels. The input signal is compared to a divided-down version of the power supply, so the frequency output is proportional to the ratio of the input voltage to the power supply voltage. This ratiometric response gives added stability when measuring voltage dividers, or bridges, even after amplification, including typical strain gauges, pressure sensors, and potentiometers. Since there is no feedback, it would be expected that the finite width of the reset pulse would cause the frequency to read low as the input voltage increases. That little error can be corrected by making the reference voltage track the input voltage slightly, which is accomplished by the linearity resistor. Mathematically, the correction is perfect and the linearity can be tweaked to better than 0.01% of span for a full-scale frequency of around 10 kHz.
The 1000 pF capacitor is critical, and should be an COG (NPO) or similarly stable capacitor. Film types are fine for lower frequency work in a lab environment. The MPSA18 connected to pin 1 is also critical and only very high gain types will work well. Precision metal film resistors are recommended for best stability, but carbon film types are fine for the experimenter's lab.
It's hard to adjust the gain and linearity without a precision voltage switchbox, maybe with 1 volt steps from 0 to 5 VDC. The voltages can (probably should) be simply divided down from the power supply, thanks to the ratiometric response, but use high-precision or matched resistors for maximum accuracy. Just a string of matched resistors across the power supply connected to the input with a clip lead will suffice. It's practical to get over four digits of accuracy with a good setup and care.
The output of several V/Fs could be combined through fairly large resistors of different values to plot several variables on one chart. The different value resistors will present different amplitudes to Spectrum Lab, so each trace can be made a different color.
Here's briefly how it works: The first op-amp and MPSA18 sink current in proportion to the input voltage. The capacitor voltage ramps down at a rate determined by the input voltage. When the capacitor voltage drops below the reference voltage on pin 9, the comparators change state, and the PNP discharges the capacitor very rapidly. The discharge is so fast, that it is completed before the comparators have time to reset. The 2N4403 has a very low saturation temperature coefficient when biased as shown, so it makes a stable reset switch, albeit with a little offset voltage which is calibrated out during initial adjustments. This little marvel also has a zero saturation voltage temp-co when biased as shown. The reset pulse is quite short, so the last comparator is added to generate a square wave output.
Serial Port A/D - 12 bits, no power, cheap!
Here's a cute but obsolete way to use an old serial port's handshake lines to get data into a Windows 98 and earlier computer. The circuit toggles a 12 bit counter, driving a 12 bit D/A, and uses a comparator to detect when the D/A output passes the input voltage. It works really well, but good luck getting Qbasic to run!
24 Line Parallel Interface for the PC (or just the schematic)
This is a really old parallel port for the PC, back when Windows 3.11 was all the rage.