Another UT61E modding thread - Page 1
Forum section: electronics / testgear

author: melka
author_rank: Newbie
timestamp: May 15, 2014, 03:47:22 pm
content: Hi all, new member on the forum here.Since I'm cheap and don't do high end electronics, I ordered a UT61E on aliexpress. It cost me 35.88€ with free shipping to France, and I received it about a month later.For anyone interested, the current listing ishere, at $48.5 / piece.The meter came with the RS232 cable, so I tried using it right away, but the lack of MacOS software limited me to testing a few stuff on a Ubuntu VM. Seemed to work, but I will not be booting another OS just to get readings from the meter.- First problem came from my old dumpster-diving saved USB-Serial converter. It's based on the Prolific PL2303 chip, and the drivers from the vendor were just spouting nonsense, the messages seemed to be formatted well but there was an encoding problem of some sort... I used theNozap PL2303 drivers, and I could get the data in a serial terminal soft (CoolTerm) without a problem.- Second : there's a blatant lack of MacOS DMM software. QtDMM can run, but it doesn't include the protocol decoder for the ES51922 chip the meter uses. I tried recompiling it but having never worked with Qt, what I could gather is that it was made with Qt3, then ported to Qt4, and the current version is Qt5. I spent a few hours on it but I then abandoned, being faced with numerous compile errors and stuff. I then tried to run UltraDMM with Wine, but once again, no go. Sigrok under Ubuntu was able to connect and spout some data from the meter, but I couldn't find a GUI for DMMs, just PulseView (which, if I'm correct, is only for logic analyzers), and I wasn't able to compile sigrok-cli under MacOS or install it with brew either...So I started coding a small utility under Java / Processing. It still needs a shitload of work, but I'll try to make it cleaner, less buggy and put it on GitHub if people are interested, just let me know.- Third, I put a small DIP ATTiny2313 in there to retain the yellow / blue button original functions, but also add switches for max/min, RS232 and backlight. Currently (when it works, looks like my soldering is not up to par and I got shorts or something once I closed the meter back), a long press (> 1 second) on the yellow buttons switches the backlight, long presses on the blue switchs through the max / max / maxmin / maxmin off functions, and an extra long (> 2 seconds) on the blue switches the RS232 output. The code is done using the arduino tiny core, running at 8MHz on the internal oscillator. I'll try to take pics of the solder points etc... but the wiring is mostlythe same as mjlorton's project. Tiny was programmed using an chinese USBASP.Heres my shitty code with broken interrupts and way too much overhead :Code:/*UT61E.inomelka@blaste.net===============================Small sketch to use the blue and yellow button to switch various "blocked" functions.For the backlight to work, use a NPN transitor (BC547) in this configurationVB+|_| |RES|_||_VLED 1|_VLED 2|ES51922_BKOUT (might need a resistor) ---|<BC547||GNDWIRINGTINY 2313–––––––––x||VCC+3Vx||xx||xx||xx||BLUESELECTOUTPORTB.4Pin 4 SELECTIN ORANGE||REDVAHZOUTPORTB.3Pin 5VAHZBINBLACK||YELLOWRS232PORTB.2x||GREENMAXMINPORTB.1x||WHITEBKLITPORTB.0VB-GND||x–––––––––*/#define BKLIT PB0// WHITE#define MAXMIN PB1// GREEN#define RS232 PB2// YELLOW#define VAHZOUT PB3// RED#define SELECTOUT PB4// BLUE#define SELECTIN 4// ORANGE#define VAHZIN 5// BLACK#define SWITCHDELAY 50// Delay in ms for pulsing the outputs#define OFFDELAY 1100// Delay in ms for switching off the maxmin functionboolean RS232_ENABLED = false;// Vars to hold the state of the 2 input buttonsint stateSELECT = HIGH;int shortSELECT = LOW;int longSELECT = LOW;int extraSELECT = LOW;unsigned long startSELECT;unsigned long endSELECT;int stateVAHZ = HIGH;int shortVAHZ = LOW;int longVAHZ = LOW;unsigned long startVAHZ;unsigned long endVAHZ;// Function to pulse the outputs to LOWvoid switchPIN(uint8_t PINNUMBER,int DELAY) {PORTB &= ~_BV(PINNUMBER);delay(DELAY);PORTB |= _BV(PINNUMBER);}int MAXMININDEX = 0;void cycleMAXMIN() {if (MAXMININDEX <= 2) {switchPIN(MAXMIN,SWITCHDELAY);MAXMININDEX++;} else {switchPIN(MAXMIN,OFFDELAY);MAXMININDEX = 0;}}// To switch RS232 on, the RS232 pin on the ES51922 must be pulled LOW,// and left high to disable it.// TODO : check if pin high disables the auto power off, in which case,// make output floating.void switchRS232 () {if (RS232_ENABLED) {RS232_ENABLED = false;PORTB |= _BV(RS232);} else {RS232_ENABLED = true;PORTB &= ~_BV(RS232);}}// Interrupt function for the yellow buttonvoid ISR_VAHZIN() {if(digitalRead(VAHZIN) == LOW && stateVAHZ == HIGH) {startVAHZ = millis();stateVAHZ = LOW;}if(digitalRead(VAHZIN) == HIGH && stateVAHZ == LOW) {endVAHZ = millis();shortVAHZ = LOW;longVAHZ = LOW;if((endVAHZ - startVAHZ) > 30 && (endVAHZ - startVAHZ) < 500) {shortVAHZ = HIGH;} else if((endVAHZ - startVAHZ) >= 1000 && (endVAHZ - startVAHZ) < 2000) {longVAHZ = HIGH;}stateVAHZ = HIGH;}}// Interrupt function for the blue buttonvoid ISR_SELECT() {if(digitalRead(SELECTIN) == LOW && stateSELECT == HIGH) {startSELECT = millis();stateSELECT = LOW;}if(digitalRead(SELECTIN) == HIGH && stateSELECT == LOW) {endSELECT = millis();shortSELECT = LOW;longSELECT = LOW;extraSELECT = LOW;if((endSELECT - startSELECT) > 30 && (endSELECT - startSELECT) < 500) {shortSELECT = HIGH;} else if((endSELECT - startSELECT) >= 1000 && (endSELECT - startSELECT) < 2000) {longSELECT = HIGH;} else if ((endSELECT - startSELECT) > 2000) {extraSELECT = HIGH;}stateSELECT = HIGH;}}void setup() {// Set ports as output and pull highDDRB |= B00011111;PORTB |= B00000111;// Set buttons pins as Input and use internal pullups, then attach interruptspinMode(SELECTIN,INPUT_PULLUP);attachInterrupt(0, ISR_SELECT, CHANGE);pinMode(VAHZIN,INPUT_PULLUP);attachInterrupt(1, ISR_VAHZIN, CHANGE);// Wait for the DMM to bootdelay(2000);}void loop() {if (shortVAHZ == HIGH && longSELECT == LOW) {switchPIN(VAHZOUT,SWITCHDELAY);shortVAHZ = LOW;};if (longVAHZ == HIGH) {switchPIN(BKLIT,SWITCHDELAY);longVAHZ = LOW;};if (shortSELECT == HIGH && shortVAHZ == LOW) {switchPIN(SELECTOUT,SWITCHDELAY);shortSELECT = LOW;};if (longSELECT == HIGH && shortVAHZ == LOW && longVAHZ == LOW) {cycleMAXMIN();longSELECT = LOW;};if (extraSELECT == HIGH) {switchRS232();extraSELECT = LOW;}}

author: simonmc
author_rank: Contributor
timestamp: May 15, 2014, 08:29:56 pm
content: This looks interesting. I'm expecting a ut61e in the post soon, as well as a ut136b for my daughter. I had a vague feeling the arduino enviroment could be used to program other amtel chips, but this post made me actually have a look how. This seems it could be very useful to me. Thanks for making me 'get off my butt' and look it up!

author: melka
author_rank: Newbie
timestamp: May 16, 2014, 08:08:46 am
content: Hey simon, glad to hear my post was useful in some way.As I said, you can flash a shitload of different AVRs with ausbasp. I bought mine for something like 3$ shipped on ebay a couple years ago, and it still works... This thing is pretty handy if you want to use a smaller IC like a tiny85. Since a couple versions at least, the Arduino IDE supports uploading your code with the usbasp, but if you want to work with smaller chip, you'll need to install thetiny-core& you might need to check the fuses with another tool (command line avrdude, or on macosx, AVRfuses, a nice little GUI for avrdude) before your first upload. Don't remember the exact details but I think it's something about small chips like the tiny being set with a low clock or something at the factory, and it's too slow for burning the flash, something like that, don't remember...Oryou can just use your Arduino as a programmer.Just to get you a bit more fired up, for non-timing critical projects, you can just use the IC with power, a decoupling capacitor, and that's about it... When you start working with small 8 pin SOIC chips (hotplate soldering FTW), it becomes real interesting

author: simonmc
author_rank: Contributor
timestamp: May 16, 2014, 10:14:57 am
content: Funnily enough an usbasp is one of the next things im getting. i will have to look into the fuses and such like.

author: redpanther
author_rank: Newbie
timestamp: August 02, 2025, 04:35:03 pm
content: QtDMM is now qt6, complies on mac and supports ut61e. You can find current version herehttps://github.com/tuxmaster/QtDMM