Help trying to change firmware on a device

the device linked above is sold all over the show with different brand names. They all appear to be the same.

I have aquired two of them, but they dont refresh the screen very quickly, I would much rather write a firmware for them myself and have it show me volts and amps in real time and not the average over 4 seconds.

has anyone read about anyone being able to hack them by chance?

I suppose I should have started with photos of the pcb and mcu. I will upload some shortly.

in the meantime if anyone has any good links to acheiving this on "arduino compatible" hardware it owuld be great.

thanks in advance

I suppose you analyse the existing design to see what components/chips it uses for the voltage and current measurement, copy that and use your own MCU to handle the inputs, the calculation and the display.
If you are very lucky, the existing MCU is of a type already supported by an Arduino core.

It's usually easier to start-over and design & program something yourself...

You'd have to identify the processor (and the display and other components) and assuming you can't find a schematic you'd have to trace it out and re-create it.

Then you'd need a software development kit for the particular chip, and you'd need a programmer. There might be standard (or simi-standard) programming port, or it might need a custom cable-adapter for the programmer.

The display might need a special library, or you might have to develop that yourself.

This is unlikely with something small like that, but some devices have PLDs or other programmable chips (in addition to the firmware in the processor or flash). Those usually have copy-protection and it can be nearly impossible to figure-out what they are doing or reverse-engineer the programming.

There could be other things I haven't thought of...

The display needs a delay - It doesn't have to be 4-seconds but if it's changing too fast you'll just see a mess of flickering digits/segments. Even an analog meter can move too fast to be useful. Old mechanical analog meters (1) have inertia which means there is always some averaging/smoothing (although sometimes additional smoothing/filtering is used with analog meters too.)

If you are programming it yourself you can make it read peak, average (or RMS) or both, but you will have to hold the display long-enough for your eyes (and brain) to perceive it.

(1) If you know what a VU Meter is (or was), there were very strict response-time specs. ...With digital recording we are more concerned with peaks, and it's a lot easier now to make a peak meter now than whenever the original VU meter was invented (1940-1942).

theres the data sheet for the mcu .
there is what looks like an opamp, labelled 2904 aksll.
the screen is a 1602A type, easily changeable, infact i have several if this one wasnt standard. but im guessing that using the MCU with arduino is going to be a no go.

I wonder if there is a pin comaptible chip out there that can run arduino code?
I suppose I have to look.
i did once get lucky and manage to fit an ATtiny directly into place of the stock MCU in a flashlight i reprogrammed, maybe i will get lucky with this

there is a 4 pin header next to the MCU........ woudlnt it be nice if someone on here knows anything about it

You have the MCU datasheet. Trace the header to the CPU to see what pins they are connected to.


this is what they are connected to , and the negative plane

Looks like it could be serial (RXD1/TXD1) or Wire (SDA/SCL). Not sure what the third line is for. Borrow an oscilloscope to see if any data or clock is coming out of any of those three pins. If you can't get an oscilloscope, use an Arduino sketch to read three pins and write the values to Serial Plotter:

const byte Pin1 = 4;
const byte Pin2 = 5;
const byte Pin3 = 6;

void setup()
{
  Serial.begin(115200);
  delay(200);

  pinMode(Pin1, INPUT_PULLUP);
  pinMode(Pin2, INPUT_PULLUP);
  pinMode(Pin3, INPUT_PULLUP);

  Serial.println("Pin1,Pin2, Pin3"); // Labels
}

void loop()
{
  Serial.print(digitalRead(Pin1));
  Serial.print(',');
  Serial.print(digitalRead(Pin2));
  Serial.print(',');
  Serial.println(digitalRead(Pin3));
}

The data sheet says it is an 8051 based MCU, an ancient classic upgraded.

Find an English translation of the data sheet and you are good to go. There are plenty of 8051 assemblers and compilers to choose from, but of course most of them would not know of the newest features.

im really looking to use the arduino IDE to program it, im not experienced in programming. Ive had great fun making some decent projects with arduino libraries, but never ventured further.

perhaps a tssop20 chip to replace it with would be a good option if the pins match up .

the third line goes through two resistors in series and has a cap to ground before going to the MCU

I tried the code on an arduino, just a constant output of 1,1,1 in the serial monitor

ok , i had no idea serial plotter was a thing!! give me a second and ill upload a pic


this is with analogread , digital read just is a straight line no variation at all

and neither changes in anyway when i disconnect the arduino from the other pcb, so i guess it isnt working

So I guess the three pins are inputs to the PCB. That could indicate that the chip is a Wire/I2C/TWI peripheral. I would next try hooking up Gnd, SDA, and SCL and using an I2C scanner sketch to see if the chip responds to any I2C address.

whereas I didnt get any output on the tests last night, I did manage to bugger the device, it now doesnt read voltage or amperage correctly :frowning:

that may be the end of the road for the project, i dont really want to buy a new device every time I try something new, lol.

I may use it to test for the i2c anyway, nothign to lose now

1.4 System Configuration Registers
The system configuration register (CONFIG) is the FLASH option for the initial conditions of the MCU. It can only be programmed by a dedicated programmer and cannot be accessed by the user
and operation. It contains the following:

  1. DEBUG (debug mode)
    ◆ DISABLE debug mode is prohibited, P21, P35 are used as common IO ports
    ◆ ENABLE enables debugging mode, P21, P35 are configured as debugging ports (DSCK, DSDA),
    Other functions corresponding to the pins are closed

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.