Go Down

Topic: logging voltage reading from Multimeter (Read 5040 times) previous topic - next topic

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.

MrAl

#16
Nov 02, 2016, 07:07 pm Last Edit: Nov 02, 2016, 07:09 pm by MrAl
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.

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.

gpsmikey

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.
mikey
-- you can't have too many gadgets or too much disk space !
old engineering saying: 1+1 = 3 for sufficiently large values of 1 or small values of 3

MrAl

#19
Nov 03, 2016, 02:38 am Last Edit: Nov 03, 2016, 02:41 am by MrAl
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 :-)

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...

arishy

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

MrAl

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 :-)
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 :-)

TomGeorge

Hi,
What model craftsman DMM?

Thanks. Tom.... :)
Everything runs on smoke, let the smoke out, it stops running....

arishy

CraftsMan Professional Model 82324 ( PC Interface AutoRanging MultiMeter )

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

3. Out of this readme file, there is a button TO ACTIVATE the meter !!!And this will give us the Clue.
4. 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

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

3. 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 !!!





jremington

#25
Nov 05, 2016, 02:33 am Last Edit: Nov 05, 2016, 02:55 am by jremington
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:

Code: [Select]
  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: https://sourceforge.net/p/pythonformetexme-21/code/ci/master/tree/metex.py

TomGeorge

#26
Nov 05, 2016, 02:59 am Last Edit: Nov 05, 2016, 03:00 am by TomGeorge
Hi,
The manual  page with 232 info;


Tom... :)
Everything runs on smoke, let the smoke out, it stops running....

arishy

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.....

jremington

#28
Nov 05, 2016, 04:08 am Last Edit: Nov 05, 2016, 04:09 am by jremington
Quote
Now the question what command line needed to initiate the data transmission
Try sending a "D". See reply #25.

arishy

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

Go Up