| Products > Test Equipment |
| Data logging with UT61E+ and UT61E question |
| << < (4/4) |
| rsjsouza:
--- Quote from: JenniferG on November 22, 2022, 01:22:02 am ---Here's a quick video of my Arduino reading 14 byte packets successfully from the UT61E. The meter is set to ohms and two leads are connected together directly. I show the packets received when they are connected, and then show the packets received after disconnected, they differ in bytes. --- End quote --- Nice! And good music as well! --- Quote from: JenniferG on November 22, 2022, 01:22:02 am ---In this example, I guess it was unnecessary that I have the Arduino transmit wire connected. :) --- End quote --- The UT61E only transmits data and has no receiver, thus this is understandable. |
| JenniferG:
Reading 130 ohm resistor. removed the useless data from range byte, digits bytes, as well as mode byte. --- Code: ---#define PIN_DTR 32 struct Packet { byte range; byte digit1; byte digit2; byte digit3; byte digit4; byte digit5; byte mode; byte info_flags; byte relative_mode_flags; byte limit_flags; byte voltage_and_autorange_flags; byte hold; byte cr; byte lf; }; struct Packet packet; void setup() { Serial.begin(115200); // coms from arduino to mac // ************************************************************ // Setup Serial Communications with UT61E. // Serial port settings are 19200 bps, 7 data bits, odd parity // and 1 stop bit. The suppied adapter also requires DTR = 1 // and RTS = 0; // Pins 16 & 17 on Arduino Mega 2560 are Serial2 TX/RX. // ************************************************************ Serial2.begin(19200, SERIAL_7O1); pinMode(PIN_DTR, OUTPUT); digitalWrite(PIN_DTR, HIGH); } void loop() { //byte buf[20]; if (Serial2.available() > 0) { Serial2.readBytes((char *)&packet, 14); // remove redundant useless data packet.range = packet.range & B00000111; // bits 7 through 3 are always 00110 packet.digit1 = packet.digit1 & B00001111; // bits 7 through 4 are always 0011 packet.digit2 = packet.digit2 & B00001111; // bits 7 through 4 are always 0011 packet.digit3 = packet.digit3 & B00001111; // bits 7 through 4 are always 0011 packet.digit4 = packet.digit4 & B00001111; // bits 7 through 4 are always 0011 packet.digit5 = packet.digit5 & B00001111; // bits 7 through 4 are always 0011 packet.mode = packet.mode & B00001111; // bits 7 through 4 are always 0011 Serial.print("RNG: "); Serial.print(packet.range); Serial.print(" "); Serial.print("DIGITS: "); Serial.print(packet.digit1); Serial.print(" "); Serial.print(packet.digit2); Serial.print(" "); Serial.print(packet.digit3); Serial.print(" "); Serial.print(packet.digit4); Serial.print(" "); Serial.print(packet.digit5); Serial.print(" "); Serial.print("MODE: "); Serial.print(packet.mode); Serial.print(" "); Serial.println(); } } --- End code --- |
| Gyro:
I just thought this might be a good reasonably current place to share my USB serial mod of the RS-232 adapter. I just used a bog standard USB - serial interface board from ebay, but I think the tweaks to the meter end might be an improvement on some others I've seen. As far as I can remember, it just uses the original parts for the receiver section (eg. Moving Q2 onto the Q3 footprint). I did add a 'TX' LED, in the provided PCB mounting hole (and drilling out the case hole), driven by DTR. This works with a corresponding phototransistor inside the meter, driving the serial data enable pin ('RS232') on the ES51922 chip (trck cut required), so that the meter will perform a normal sleep power down if the logging software isn't running or the adaptor removed. Unfortunately I didn't document the PCB track cuts (and some of them are not visible, but it ought to be reasonably easy to reverse engineer it from the schematic and bare PCB image. Sorry that it's badly documented, but maybe of help to somebody. I've attached modified interface schematic (the original is included in a corner of the UT61E meter schematic available on the web), bare PCB image (found on the web), my modified interface board, and the completed adaptor, (with USB-serial interface shrink sleeved). EDIT: Original RS232 Interface schematic added for reference. +/-12V supplies derived from by DTR and RTS. |
| JenniferG:
--- Quote from: JenniferG on November 17, 2022, 05:51:54 am ---EDIT: I wish my Gwinstek GDM-8251A bench multimeter had ability to send results over RS232 other than TRUE/FALSE; I read the manual and it only seems to send the result of a comparison test.. pass or fail... not the actual ohm reading. --- End quote --- Turns out there is quite an extensive command set to both set the functionality of the meter as well as reading results. Starts on page 99 of the manual. So it looks like I'll be writing a C++ library for the GDM-8251 as well for the Arduino; already pretty much finished the one for the Uni-T UT61A. I see how to set the baud rate but the manual mentions nothing about word length, parity and stop bits; I'll assume it's 8N1 and go from there. Curious if this meter works with Test Controller and/or Sigrok. If not, perhaps I can add it somehow and share the module for the either/both of those programs.. getting my Thinkpad here soon to run Sigrok and Test Controller. (Running Mac Mini M1 only currently.) |
| Navigation |
| Message Index |
| Previous page |