Troubles flashing modules

Hey guys,
Just finished my controller and the first module
Now I plugged the 6 pin cable in one side and on the other side just the upper 3 pins ( with the notch)
But when I try to flash them this error will appear.

Failed, error code 3 FAILED_ENTER_PROG_MODE

I suspect you have the cable at the module in the wrong direction.
Look at the pcb. Red cable is plus. Turn it 180 degrees.
Only at the module…

Look this video: diyBMS New cell monitor module V4.40 - YouTube
Time 12:02.

Its V4.4 of the module with 6 pin connector.
But I think on 4.5 its still the same direction of +/- pole.

You get this message when the module does not answer.
E.g. there is no module at the other side of the cable.
Or you have no contact on a nessasary pin. Bad soldered.

Oh dear. Disregard…

Look at this video: DIYBMS New Module V4.5 with 12bit ADC - YouTube
Time 9:42.

The new Attiny1624 on the 4.5 controller needs a diffrend programming device.
So called UPDI programmer.
The Controller board is not capable to program the new controller chip.
Only the Attiny841.

So you won´t have success with the DIYBMS Controller…

Oh thanks,
I was wondering if there is any tutorial how to use the updi ?
I’ve never done that before…
And sit here with the 4.50 modules without any software on it.

Look for the video of the shunt.
And read the github.

I also didnt know that the system has changed.
I changed to the new controller because it is easy to program the modules.
When this does not work anymore there is no advantage on the new controller for me.

For me it was not difficult to get 841. I ordered them via Alibaba in china.
Took only a few days.
And I have only 1.9f boards.

Best Regards

I used a generic USB UART TTL adapter using the diagram shown here. I use pymcuprog to flash the shunt and would use similar for these modules.

The 2x3 IDC header on the ESP32 controller PCB is only compatible with the ATTiny841 modules.

1 Like


But this is again a system for people who know how.
The advantage of the new controller with AVM programmer was:

  • you need no knowledge about external programmer and programs
  • no knowledge how to use the programs
  • no knowledge about any coding and syntax.
    Only sticking the modules and tell the BMS which firmware.
    Work for noobs.

Now you have to use a programmer and some programs to do.
Some more tasks which can be difficult if you have no experience.

I agree, but unfortunately there is no UPDI programmer that will run on the ESP32 (I tried one and it failed miserably). Additionally the resistor is not present on the controller PCB to combine RX/TX.

The only reason Stuart changed this is because the ATTINY841 are becoming very hard to locate and the price has increased, the new ATTINY1614 is much cheaper and more readly avalaible, I am sure in due course someone will release a video on how to flash it.

1 Like

I say again. I ordered the 841 in China and got it in a week.
Maybe the 16xx is an Euro cheaper.
But it is very uncomfortable to flash.
And the new Controller becomes partly obsolete.

for now. It should be feasible to have an adapter PCB of sorts that adds the missing resistor and a bit of time to sort out issues with the UPDI protocol.

I’m very excited…

I have the same problem, i dont know why. The controller program the module before, now always show the error code like you have on the picture. I’ve checked the pins, they’re in right orientation

Same problem?

You try to program 4.5 modules with attiny 1614 with the new BMS controller?

I did program the attiny1624 with an arduino uno. Therefore the Arduno himself must be programmed with the jtag2updi: GitHub - ElTangas/jtag2updi: UPDI programmer software for Arduino (targets Tiny AVR-0/1/2, Mega AVR-0 and AVR-DA/DB MCUs)

after doing the job with the Arduino I used the AVRDUDESS:

Thank you all!

Thank God I have some crazy order failures here…
Flashed the old board successfully…
Does the tx and Rx cables need the correct polarity?


Yes. They need. But when you put in the cable in the wrong direction: nothing happens.
You only wont have success to flash.

I ment the Rx and tx cables for communication…
Does the just plugs need to be in a specific polarity and work only when a battery is plugged in ?

Polarity of the cable: from left to right.
If you turn the cable 180° it won´t work and it will not harm your cell board.

You are not allowed to have voltage on the cell board.
Will not work and will harm the controller and cell board.


  • no voltage on the cell board allowed
  • plug in the right direction

Thats all.

Hello, what is must setting fuses on attiny 1624 chip? arduino ide default setting is:

--fuses 0:0b00000000 2:0x02 6:0x04 7:0x00 8:0x00

It is correct values?

Looks OK to me:


C:\Users\mgx\AppData\Local\Arduino15\packages\megaTinyCore\tools\python3\3.7.2-post1/python3 -u C:\Users\mgx\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.5/tools/ -t uart -u COM6 -b 460800 -d attiny1614 --fuses 0:0b00000000 2:0x02 6:0x04 7:0x00 8:0x00 -fmodule_fw_V450_5K_ATtiny1624_450_e0_h0_l0.hex -a write -v


C:\Users\mgx\AppData\Local\Arduino15\packages\megaTinyCore\tools\python3\3.7.2-post1/python3 -u C:\Users\mgx\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.5/tools/ -t uart -u COM6 -b 230400 -d attiny3224 --fuses 0:0b00000000 2:0x02 6:0x04 7:0x00 8:0x00 -fmodule_fw_V450_5K_ATtiny1624_450_e0_h0_l0.hex -a write -v