Go Down

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

arishy

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

jremington

#31
Nov 05, 2016, 04:21 pm Last Edit: Nov 05, 2016, 04:22 pm by jremington
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?

MrAl

#32
Nov 06, 2016, 12:27 am Last Edit: Nov 06, 2016, 12:28 am by MrAl
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 !!!





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?



arishy

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.


jremington

#34
Nov 06, 2016, 05:02 am Last Edit: Nov 06, 2016, 05:09 am by jremington
Quote
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.

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

arishy

Quote
What do you mean by this and how did you determine it?
1- If I monitor RX  from the device I get nothing
2. The manufacturer software asks the user to press a button to activate the port BEFORE sending the meter reading either for display or recording the meter reading (this is the hand shaking part)

And this what I want to capture

gpsmikey

Request To Send (RTS) is a separate pin on the RS-232 cable - I don't think it is using the RTS to initiate the communication.  Monitor the TX line going to the meter from the pc - what is being sent when you "push the button".  It may be using RTS for flow control, but most of the RS-232 stuff I have seen these days just uses the TX, RX and ground lines for communication.
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

arishy

I am setting up this little project to be able to give you hard facts.
If you help in setting it up from the arduino site as I proposed above, I will be able to provide you with these hard facts.

I need to SEE this handshaking process...Can I do it with you help ?

MrAl

#38
Nov 07, 2016, 03:03 am Last Edit: Nov 07, 2016, 03:08 am by MrAl
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.


Hi,

You seem to be mixing something up here.

Forget about what port the Arduino is on, that only works with the serial monitor.  Forget that.  When you turn the serial monitor on in the IDE you get information you send to it from the Arduino using the capture software.

The capture software reads the com port for the meter.  You connect at least one i/o pin to one RS232 pin of the meter com port so you can read the RS232 signals going to the meter.

Does that make sense?

The Arudino pin say pin 5 does not connect directly to the RS232 pin however.  It has to go through at least a 1k resistor because the signal might go plus and minus.  A Schottky diode clamp to ground is also a good idea, placed on the Arduino pin to ground.  So the resistor limits the current and the diode clamps negative voltages to ground.  This helps to ensure that the Arduino only sees positive pulses.

So instead of a scope you use the Arudino set up to read the RS232 port of the meter, and that gets displayed on the serial monitor from the IDE.

You will need to try to read several pins on the RS232 port, whatever pins you think the meter and software are using.  You can do one at a time, and see if you get reasonable pulse timings on the serial monitor.

Understand this so far?

Again:
1.  RS232 pin from the meter to the Arduino pin (with resistor and Schottky).
2.  Arduino sketch to read pulse timings, display on the serial monitor of the IDE.
3.  Not just one RS232 pin however, you may have to look at several pins to see what they are all doing.  For example there are the Tx and Rx pins, you'd have to check those.

Most likely you will look at one pin (Tx or Rx) when you press the 'start' button in the software.  Either pin should show something unless it is the RTS pin or another pin.  Since the meter requires a signal from the software, there should be at least one pin that becomes active after the start button is clicked.
If there are no pins active then that means only the software itself needs to get that start button click, not the meter.  From what you said in the past however it should like the meter needs a signal from the software first though, so look for that first.

Do you understand the setup for this now?
It's like using a second meter to monitor the first meter RS232 port, that's all it is.  With a second meter you would just place the probes on the RS232 pins and look for activity.


Basic signal conditioner:
Code: [Select]

RS232 pin o---1k---+------o Arduino i/o pin
                   |c
                   D1
                   |a
                   GND

and a Schottky diode catchode to that "+" and anode to ground on the Arduino.

Southpark

#39
Nov 07, 2016, 05:10 am Last Edit: Nov 07, 2016, 05:36 pm by Southpark
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.
Sometimes it's like that. If there is a lack of documentation, and if there is some need to reverse engineer the system in order to do something with it, then it's necessary to use approaches like observing the signals on the serial link (while your winxp system is operating) - to try figure out what commands are being sent. Another option is to try getting in touch with the manufacturer of the device, to find out what commands are needed, and other hardware details.

TomGeorge

1- If I monitor RX  from the device I get nothing
2. The manufacturer software asks the user to press a button to activate the port BEFORE sending the meter reading either for display or recording the meter reading (this is the hand shaking part)

And this what I want to capture

Hi, shouldn't you be monitoring the Tx from the device with your Rx?
Tom... :)
Everything runs on smoke, let the smoke out, it stops running....

MrAl

Hi, shouldn't you be monitoring the Tx from the device with your Rx?
Tom... :)
Hi there Tom,

My suggestion is that he monitor all the pins of the RS232 port to see which ones are being used, as two or more could be in use.  Once he knows which ones are being used, then he can start to determine the actual timing of each pin.  It may even take a dual channel pulse catcher sketch using two i/o pins of the Arduino.

gpsmikey

Hi there Tom,

My suggestion is that he monitor all the pins of the RS232 port to see which ones are being used, as two or more could be in use.  Once he knows which ones are being used, then he can start to determine the actual timing of each pin.  It may even take a dual channel pulse catcher sketch using two i/o pins of the Arduino.

Or just use 3 jumpers to connect TX, RX and ground from the RS-232 cable to the meter - if that still works, then we know the others (CTS, DCD, RTS etc.) are not being used for handshake  :)
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

arishy

MrAl.....This what I call proper handholding....

I will do it as you clearly explained, and report back

KeithRB

While it might be a pain at the hardware level, I still think that IEE488 is great for controlling instruments. I don't think any other bus will allow you to simultaneously trigger multiple instruments.

Go Up