logging voltage reading from Multimeter

Thanks MrAl for you input, the challenge I am facing now is actually prior to receiving the data. By that I mean The REQUEST TO SEND command from the software is not known.

I cannot communicate with the meter unless a code is send first TO THE DEVICE.

arishy:
Thanks MrAl for you input, the challenge I am facing now is actually prior to receiving the data. By that I mean The REQUEST TO SEND command from the software is not known.

I cannot communicate with the meter unless a code is send first TO THE DEVICE.

Hi,

Yes, but dont you have the original software? You can set it up to keep reading and reading and at the same time view the data stream. That's the only way unless you can find the protocol info on the web or something for that meter. You can also view the initial contact info that the software sends.
That will also verify that the meter still works properly with RS232.

If I use the software I will have to be in WXP or VM. The software is capable of logging into excel format.!!!
What I am trying to do is REPLACE the software with an Arduino Sketch. From all the above it seems a very challenging job, but you are right IF I need to dig deep I should start monitoring the WXP software on WXP machine. Something I hate to do.

You indicate "the software is capable of logging into excel format !!!" -- for what it's worth, CSV is a format that Excel understands very easily, so saving the data in a format that Excel can import is no big deal (CSV is Comma Separated Values). You only need to monitor the software long enough to find out what it is sending to get the meters attention and tell it to send data - then, you use that in your Arduino code.

arishy:
If I use the software I will have to be in WXP or VM. The software is capable of logging into excel format.!!!
What I am trying to do is REPLACE the software with an Arduino Sketch. From all the above it seems a very challenging job, but you are right IF I need to dig deep I should start monitoring the WXP software on WXP machine. Something I hate to do.

Hi again,

Yeah i hear ya :slight_smile:

When i did one of mine i had to make up a special connector with something like 8 pins because it used a special connector, and i hated to have to do that. I had to use an old wire wrap connector as the 'plug'. I was lucky i still had one of those laying around from years ago when WW was popular (think 1970's).

When i did my remotes i logged every remote i had using the scope and a special pin diode and light duty power source (battery). It was a little difficult to see some of those codes on the scope because they had various patterns for each button and there were a lot of buttons. It took hours, but after that i had the codes for every single remote i had and gained the experience to do more remotes in the future if needed, although i switched a while back to using the Arduino as logic detector/pulse catcher/logger to do the pattern detection.

Once you do it you never have to do it again as long as you document all your work properly. If you do use a scope it helps to take photographs of the waveforms.

Good luck with it...

Talking about challenges.... Here what I am proposing with your help ( I hope):

Fact 1: I can run the software on WXP and login the data on a time line.
Fact 2: The cable (Serial to USB) is working with a driver.

Let us say WXP assign COMx to the hardware (Meter-Cable) and RUNNING software logging away...

If I connect Arduino Uno to WXP and get COMy assigned to it.

Can I write a sketch to MONITOR the ASCII data the software sending AND receiving on COMx from COMy

I know the baud rate, and someone suggested 7 bit ASCII , no parity, 2 Stop bits !!!! (it will be try and error)

BUT I can see the traffic...... Both ways ....on the IDE terminal

Can I do that WITH your help

P.S. I do not have scope

Hi,

I am not sure what you mean.

If you use one pin of the Arduino you can monitor the timing of a pin of the RS232 but you may have to condition the voltage levels because RS232 goes both positive and negative in some cases, unless you are using a cheapie RS232 to USB connector converter which may output only 5v to the RS232 port.

So if you set up one Arduino to monitor the meter connection you can see the pin states as they are generated by the original software and meter.

You probably have to find a sketch to do this if you dont want to make one yourself.

It might take some work of course and probably more work than with my meter because my meter just put out the codes without any command from the software. It just keeps sending the ASCII codes regardless whether the RS232 is connected or not :slight_smile:
So yours may be a little more difficult to understand if your software has to send a command to the meter first. I also dont know your software at all so there is a chance it may even send the signal once per reading. It all depends on how the designer wanted to do it.
Another question that comes up is can you set the meter ranges from the software or just from the meter itself. On my meter the software just reads the meter and can not change ranges or anything like that. If yours can change the ranges then you have to figure out that code too unless you dont want to use that feature (if it is available of course).

Luckily RS232 is usually slow when used with meters, so the Arduino should be able to catch all pulses.

Maybe someone else here knows of a good RS232 to +5v logic converter circuit too in order to condition the signal for the Arduino. I seriously doubt we are the first to ever do this :slight_smile:

Hi,
What model craftsman DMM?

Thanks. Tom.... :slight_smile:

CraftsMan Professional Model 82324 ( PC Interface AutoRanging MultiMeter )

MrAl...I have the feeling that WE can do it......

Let me start with the software ( I can send you a copy ...if you feel it is useful !!). I will try to answer most of your questions:

  1. You cannot change the range by software because it AutoRanging.
  2. I am attaching the readme file ...Extremely Helpful ( I hope you have the time to read it)
  1. Out of this readme file, there is a button TO ACTIVATE the meter !!!And this will give us the Clue.
  2. As for the Converter Cable used It has FTDI chipset and the driver is: CH341SER.ZIP
    It is using USB chip: CH341, CH341A. And as I mentioned before I used it successfully since I do not have com port in any of my computers ( Windows, Mac, and Ubuntu).

As for the Howto remarks....I have some questions:

  1. How do I monitor software actually running on WXP using Arduino.I never did it and I hope you can guide me..... I will provide the sketch that I think can help us:
  1. I do not know how to answer the +ve and -ve wave form your questions above..I do not have a scope

  2. I believe the complexity of the situation is; I have to interact with the software while monitoring it on arduino. How ?? I do not know. It will be really fun to attempt it !!!

That meter looks to be derived from the Metex series (mine is Metex ME-21). The manual for the Craftsman 82342 is here, but does not describe the RS232 interface.

The RS232 serial data format for the ME-21 is 2400, 7, 2, N (7-bit ASCII). You have to send the character "D" to the meter to initiate a reading and data transmission. The meter sends a 14 character string terminated with CR (the 14th character). The actual data are characters 5-9, with the units in characters 10-13.

Note that you cannot read the meter too rapidly or it will stop working. I found that at least 1 second pause between readings was required.

Here is a QBASIC program I wrote for a Windows PC to read the meter and write to a file:

  INPUT "output file? ", f$
    OPEN "com1:2400,n,7,2,rs,cs,ds,cd" FOR RANDOM AS #2
    OPEN f$ FOR OUTPUT AS #3
    PRINT #3, DATE$, TIME$
    a$ = "D": nr = 0
    TIMER ON: ns = 5
    ON TIMER(ns) GOSUB mread
    CLS
    PRINT "any key to quit, timer set to "; ns; "seconds"
10  IF INKEY$ = "" THEN 10
    CLOSE #3
    END

mread:
     PRINT #2, a$
     LINE INPUT #2, in$
     nr = nr + 1:
     LOCATE 5, 5: PRINT in$
     v = VAL(MID$(in$, 5, 6))
     PRINT #3, v
     RETURN

Finally, here is python code to read the meter: Python Scripts For Metex ME-21 / Code / [60d1cc] /metex.py

Hi,
The manual page with 232 info;

Tom... :slight_smile:

Great info.... Now we know 600 ,7,no parity, and 2 stop bits that will save a lot of guessing...
Now the question what command line needed to initiate the data transmission from the meter.
How can I capture it....the million dollar question.....

Now the question what command line needed to initiate the data transmission

Try sending a "D". See reply #25.

I am facing problems with Python program above (ImportError: No module named 'serial') so Until I find a way around it....Can I do it ( sending D I mean ) using Putty or something else

I used Tera Term with the proper Port setting....Sent "D" but no response back !!!!

Was that a "D" followed by a carriage return, a line feed or both? Try all possibilities.
How about the serial lines CS, DTR, etc.? Are they connected and how are they set?

arishy:
MrAl...I have the feeling that WE can do it......

Let me start with the software ( I can send you a copy ...if you feel it is useful !!). I will try to answer most of your questions:

  1. You cannot change the range by software because it AutoRanging.
  2. I am attaching the readme file ...Extremely Helpful ( I hope you have the time to read it)

https://drive.google.com/drive/folders/0B1DW6H_XUkTvZmQxbHN1TGE1eDQ?usp=sharing

  1. Out of this readme file, there is a button TO ACTIVATE the meter !!!And this will give us the Clue.
  2. As for the Converter Cable used It has FTDI chipset and the driver is: CH341SER.ZIP
    It is using USB chip: CH341, CH341A. And as I mentioned before I used it successfully since I do not have com port in any of my computers ( Windows, Mac, and Ubuntu).

As for the Howto remarks....I have some questions:

  1. How do I monitor software actually running on WXP using Arduino.I never did it and I hope you can guide me..... I will provide the sketch that I think can help us:

https://www.arduino.cc/en/Tutorial/SerialCallResponse

  1. I do not know how to answer the +ve and -ve wave form your questions above..I do not have a scope

  2. I believe the complexity of the situation is; I have to interact with the software while monitoring it on arduino. How ?? I do not know. It will be really fun to attempt it !!!

Hi,

If you can not change the settings on the meter via software that's all the better, it makes it less work to do.

By WXP you mean Windows XP?

My first question (ok second) is does the meter still work properly with the original software? That's test #1.

My third question is how much did this meter cost, is it worth the effort?

Since you dont have a scope you'd have to find a sketch of a pulse catcher program for the Arduino. I am sure others here can help probably in the "Programming' section of this forum. Without a scope you'll need this. The programs are not that complicated either.

Since you dont know if the RS232 signal goes minus or not you could use a catch diode to ground to clamp negative excursions to ground. A resistor like maybe 1k in series with the RS232 pin on the computer (try several) and that would feed the Arduino digital pin you expect to monitor with.

If you do not have a com port on the computer then you can try a USB to com converter if you have not done that already. Without some sort of com port that is recognized by the original meter software there is no way to monitor the connection so you're stuck with trial and error experimentation like sending that "D" first. If the protocol is more complicated though you'll have to get a com port from somewhere working with your meter, there's probably no other way around this. If your USB to com port adapter is not the right type it may not work with the software, so you may have to try a better adapter to get it working. Not all USB to com port adapters are the same, some only put out 5v and that does not work with everything as some devices require at least plus and minus 5v not just plus 5 volts.

Here is a rough idea what the procedure would be...

  1. Get the meter working with some COM port, somewhere.
  2. Get a sketch for a pulse catcher/logger for the Arduino.
  3. Connect a Schottky diode cathode to an Arduino pin say pin 5. Connect the anode to ground.
  4. Load and compile the Arduino sketch, upload to the Arduino board.
  5. Start the Arduino, start the serial monitor in the IDE.
  6. Start the meter software, click "Start" or whatever it is that starts the software.
  7. Watch the serial monitor for the Arduino signals to the pin, save the timings.
  8. Try to match the pulse timings to some ASCII code locating any start and stop bits also.

Too bad you dont have a scope this is much faster. Does anyone you know have one you can borrow?

Thank you soooo much for such detailed response.
Just to assure you that we are NOT wasting time; I did setup a windows XP system. ( it does not have a com) but the cable (Com to USB) with a driver IS working.
I installed the Original software on the WXP, AND IT IS WORKING 100%

The objective is to do what this OLD software (ONLY runs on WXP) to work on Windows 10; USING ARDUINO.

The price of the meter was $70 BUT this is not the issue, the issue is: can I communicate with RS232( COM protocol) which is STILL in use today; using Arduino.

There are a lot of devices STILL use RS232 and gaining control of these devices using Arduino is still in need even TODAY.

You and I and whoever responded and shared his knowledge with us here in this forum, been through similar issues. I still believe we need people with "electronics" background to help us out.
So, I will stick with this formum, and I am confident that WE will solve it.

Where we stand so far:

The software is communicating with the device by sending REQUEST to SEND.
All attempts to try and error codes ( like D) failed.

So; we need to CAPTURE this request to send.

The Arduino hardware wiring is still vague to me; so I am suggesting:

The meter is connected to the windows XP AND has a com port say X
The arduino is connected to the windows XP and has com port Y

The IDE terminal is on Y , so the question is HOW DO I CAPTURE what is going on com port X when I activate the running software on windows XP.

The software is communicating with the device by sending REQUEST to SEND.

What do you mean by this and how did you determine it?

Is it setting a logic level on the RTS line of the serial port? If so, you may need another pin on the Arduino to control RTS and a serial adapter that will level translate the line voltages, like this one.

so the question is HOW DO I CAPTURE what is going on com port X when I activate the running software on windows XP.

You will need a multichannel logic analyzer.