Products > Test Equipment
Using Voltcraft M-3650D MM with sigrok for hours/days-long data acquisition
(1/1)
al777:
Hi folks,
I've recently come across a challenge where I'd need to hunt down (and out hopefully) a potential voltage sagging that seems random as it may happen/not happen over many hours or days. And when it happens - it lasts minutes if not longer.
Additional challenge was that it is an on-site situation... far from on-my-bench... So, I needed a portable solution to gather voltage measurements across few days potentially. Having a PC running at the location is not a problem.
As this job is of no commerical interest for me - I had to invent a solution using what I have on hand. Looking at my collection of mutimeters gave me a flashback from nearly 30 years ago - a trusty 2,000-counts Voltcraft M-3650D, from mid 90's. It does have serial port (with internal optocouplers) allowing remote reading, but I never used it and never had the original cable. But it is supported by sigrok-cli. Looked promising. Hence this little project that I want to contribute here, maybe it will help someone with similar needs (and similar vintage MM!).
Hardware needed: one CP2102-based USB-to-TTL UART module, just search on AliExpress - they are < $3CAD a piece. A module with CH340G would also work, but those are inherently bigger (e.g. they need an external oscillator = bigger PCB). There are versions available with MicroUSB and USB-C - I went with the latter. A 30-years-old MM, please meet USB-C :-).
And of course, running the MM for long time requires a more robust power source than a 9V battery - I already had it handy, made it long time ago - converted a small non-SMPS wall-wart, added 78L09, works well. In fact a non-SMPS PSU is preferred here, I only measure ~6VAC "phantom voltage" between its output and the mains ground wire. The SMPSes, because of their Y-caps for EMI certification reasons will have much higher, like 10x higher phantom voltage, albeit with very low current available... anyhow I feel better about linear PSU used for any measurement apparatus. I had initial thoughs of adding a small USB-powered PSU to this setup to make it "one cable". It would include an isolated DC-DC step-up module (Mornsun or Hi-Link) plus a few caps and resistors and maybe a Zener as a crowbar protection. But for the reasons described above I decided against that path - I do have multiple devices using isolated DC-DC's which have fairly limited in->out capacitance - but they still exhibit about 20...30V AC in relation to the mains ground.
Schematic for connections between the module and M-3650D is attached in the PDF file. The construction is fairly basic - for the long contacts I've used snipped excessive leads from some 3A diodes used in a recent project. They are 0.8mm in diameter and I believe they are plated/tinned steel, so fairly robust for this use (pure copper may be too soft). They are soldered to a piece of prototyping PCB, same size as the CP2102 module, then the two are glued together. And a thin plastic sheet is heat-formed to become a roof over that house :-). Distance between contacts seems to be 1/10th of an inch, so prototyping PCB positions them perfectly. I'm attaching a couple of photos to show how the resulting setup looks.
Now, for the software. A few quirks had to be sorted out here.
First of all, we need driver for the CP2102. I used Silicon Labs' v. 11.3.0.176 (universal VCP driver from their website) - it works well under Windows 11 Pro 23H2 with latest patches. To install these - download them from Silicon Labs, unpack, then go into Control Panel - Device Manager, find CP2102 there, "Update Driver", choose from local disk (point it to the folder to which you've unpacked the drivers).
Once the driver is installed - check in Control Panel which COM port the CP2102 has landed on. Then get PuTTY, configure it for a serial session on that port, 1200bps/baud, 7 bits, no parity, 2 stop bits. Configure cursor to be a vertical or horizontal line (not block), change cursor color to match your session's background color. And give that session a large mono-width font (like CourierNew 96pt) and a window size of 14 characters x 1 line. Save the session, then launch it. Press any button - the MM will respond with one reading, you will see it in the PuTTY window. For fun - press "FUNCTION" button on the M-3650D several times until "COM" shows on the LCD screen. Now those readings don't need to be invoked by pressing any buttons on the PC - you've got a remote display for your 3-decades old MM! :-). Close PuTTY window now, to release the COM port.
Now, install sigrok-cli and make sure it works. This command (in sigrok-cli's folder): .\sigrok-cli.exe --list-serial will show you the COM ports it sees.
Here is the problem causing the need for a PowerShell script. It seems that sigrok-cli is supporting acquisition from the M-3650D with the following options: sample X times -or- keep sampling for Y seconds. In both cases sampling is done at the maximum possible speed (about 3-4 readings per second for this MM). If we need to take one sample every let's say 60 seconds... sigrok-cli seems to be unable to do that alone. PowerShell to the rescue!
The script (attached zip file) is doing this simple logic: capture the timestamp, call sigrok-cli to take exactly one sample, write all of that to the target log, wait out the set delay (e.g. 300 sec = 5 min), repeat... until Ctrl-C is pressed.
This script is pretty self-explanatory - there are some paths that you will need to update & make yours, the COM port name needs to be updated (same as for PuTTY above), delay between samples needs to be set to whatever you need, in seconds. The resulting target log currently mimics Linux syslog format, but timestamping can be easily modified, just read a bit about UFormat in PowerShell. As it stands now - the log can be easily ingested into Excel with space character as field separator. And beautiful charts can be produced from that :-).
I hope this will help someone. My hunt continues :-).
BILLPOD:
Good Morning Al777, Since the voltage sags last for minutes, several handheld DMMs have recording capabilities, and if a reading was taken once a minute, then they can record for quite a while. For example my 121GW can record on an on-board Micro SD card that can be up to 65Gb, which would record for many days'
just the battery power of the meter has to be supplemented. :-DMM
al777:
Thank you for the reply, BILLPOD!
Yes, I am aware of logging capabilities of MANY multimeters out there... alas there are none other than the M-3650D within my immediate reach, hence this work was done. Of course I **could** use this as an excuse to buy another MM... but prudency had to prevail :-). The M-3650D-based solution should work out for me in this use case. Thanks again for the suggestion!
Navigation
[0] Message Index
Go to full version