Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZB2L3 Battery Capacity Tester #248

Open
TG9541 opened this issue Jan 14, 2019 · 35 comments
Open

ZB2L3 Battery Capacity Tester #248

TG9541 opened this issue Jan 14, 2019 · 35 comments
Assignees

Comments

@TG9541
Copy link
Owner

TG9541 commented Jan 14, 2019

Yes the link you showed is the exact tester. I have 3 of them and use them to validate battery capacity of NiMH as well as my 18650's. I see this as a useful tool 3 buttons, 4 digit LED plus current sense. After seeing this forum, I desoldered the display hiding underneath it was the stm8s along with a TM1650 LED controller. Also hidden by the picture is what appears to be swim connections. I have not had time to further analyse it, but may do that in the future. I just don't have enough time and to many hobbies. Added a pic and noticed that silkscreen on the board states ZB2L3 on my other two that I purchased.
hw-586
@VK6TT

Originally posted by @suskitech in #247 (comment)

@TG9541
Copy link
Owner Author

TG9541 commented Jan 14, 2019

@suskitech:
This board looks interesting - thanks for letting us (and others) having a peek under the LED display!

I guess that the 321 on the silkscreen near the SOT23-5 chip is a generic single OP-AMP. The 8205 might be a Dual N-Channel logic enhancement mode power FET. For the TM1650 I couldn't find a datasheet - I found one e for the TM1651 and there is example code on TM1650 on GitHub.

I'll do the same surgery with my board. Let's see what else it's good for.

@VK6TT
Copy link
Collaborator

VK6TT commented Jan 14, 2019 via email

@TG9541 TG9541 self-assigned this Jan 14, 2019
@TG9541
Copy link
Owner Author

TG9541 commented Feb 3, 2019

@VK6TT saw to it that I got a new ZB2L3 in my mailbox. The first thing I did was to remove the LED display:

20190203_080919

My specimen has a Nuvoton chip (which was designed to be pin compatible to the STM8S003F3P6 and it's an open question if STMicroelectronics compete on the price - Nuvoton certainly does, and it won't go away).

Did anybody trace PD1/SWIM?

@suskitech
Copy link

suskitech commented Feb 3, 2019

Man that is to bad. I ordered 4 more battery testers in hopes that it would still have the STM8 in them.

I have traced everything on the board, but did not have a chance to put it in nice format. Here is what I do have:

STM8S003F3P6 Signals
Pin	STM	Connected to
1	PD4	<-> TM1650 3 SDA
2	PD5	
3	PD6
4	NRST <- (ICP header pin 3)
5	PA1
6	PA2
7	VSS	GND
8	VCAP 105 capacitor to GND
9	VDD
10	PA3	-> LT8205 N-Channel MOSFET pins 6 and 4 (gates) 
11	PB5	-> A LED
12	PB4	-> Ah LED
13	PC3	-> V LED
14	PC4/AIN4	<- V+ in 10k/51K ratio plus .06V
15	PC5	<- OK switch closes to GND 104 cap debounce
16	PC6	<- + switch closes to GND 104 cap debounce
17	PC7	<- - switch closes to GND 104 cap debounce
18	PD1/SWIM <-> (ICP header pin 2)
19	PD2/AIN3 <- LM 321 OpAmp
20	PD3/AIN4 -> TM1650 2 SCL

I numbered the head pins left to right while reference the board in its nor usable orientation.

1 VCC (left pad only)
2 SWIM
3 NRST
4 GND (right pad only)

I also see that the version you received came with an ET6226M for the display driver instead the Titan Micro Electronics TM1650A, which has drivers in the Arduino environment.

I have to admit that the research I did on the Nuvoton showed qty 1000 pricing of $.25US vs around $.75US so with that kind of cost difference we will see more and more of this transition. There are a few tutorials that discuss programming these, but I just don't have time to learn another CPU.

@TG9541
Copy link
Owner Author

TG9541 commented Feb 3, 2019

The LED driver chip on the new board is an ET6226M

The chip is pin compatible with the TM1650

Here is a Google translation of the functional register description:


ET6226 Control Program Format The ET6226 control program format is shown in the figure below.

The instruction shown below is SYSON.
Start 0 1 0 0 1 0 0 0 Ack 0 0 0 0 0 0 0 1 Ack Stop

The specific control instructions are shown in the table below.

High 8 bits low 8 bits function
48 00 Off display
48 01 On display (eight-segment mode)
48 09 Turn on display (seven-segment mode)
48 04 Turn on sleep
48 X1 Turn on the display, keyboard, X-level brightness X=1, first-level brightness; X=4, four-level brightness; X=0, eight-level brightness, the rest
68 XX digital tube position 0 display, XX is 8 bits of data, the highest position is punctuation
6A XX digital tube position 1 display, XX is 8 bits of data, the highest position is punctuation
6C XX digital tube position 2 display, XX is 8 bits of data, the highest position is punctuation
6E XX digital tube position 3 display, XX is 8 bits of data, the highest position is punctuation
4F Get button, return button code

The Control Register description is sketchy but it appears to be consistent with the more detailed description in the TM1650 datasheet:

  MSB LSB  
  B7 B6 B5 B4 B3 B2 B1 B0 Function Description
  ×  0  0  0  -  ×  ×  -  Brightness setting 8 levels of brightness
  ×  0  0  1  -  ×  ×  -  1 level brightness
  ×  0  1  0  -  ×  ×  -  2 brightness
  ×  0  1  1  -  ×  ×  -  3 levels of brightness
  ×  1  0  0  -  ×  ×  -  4 brightness
  ×  1  0  1  -  ×  ×  -  5 brightness
  ×  1  1  0  -  ×  ×  -  6 brightness
  ×  1  1  1  -  ×  ×  -  7 brightness
  ×  -  -  -  0  ×  ×  -  7/8 segment display control bit 8-segment display mode
  ×  -  -  -  1  ×  ×  -  7-segment display mode
  ×  -  -  -  -  ×  ×  0  Turns the display bit on/off off
  ×  -  -  -  -  ×  ×  1  on display

@TG9541
Copy link
Owner Author

TG9541 commented Feb 3, 2019

@suskitech thanks for the pin description! I inserted some Markdown formatting, I hope you don't mind
:-).

The good news is that PD1/SWIM can be used as a communications interface just like that. An interesting observation: these guys didn't even bother to use the I2C GPIOs PB4 and PB5.

@suskitech
Copy link

suskitech commented Feb 3, 2019

I appreciate the reformatting please feel free to do so anytime. It was after midnight my time and did not want you to have duplicate my effort tracing the pins. I am new to GitHub and formatting with markdown code is another thing I need to look into.
We need a cheap source of STM8S103 chips. I can get them for about $1 each on eBay, but most of the China and HK vendors are on vacation until Feb 11 celebrating their New Year.

@TG9541
Copy link
Owner Author

TG9541 commented Feb 3, 2019

The best price for an STM8Sx03F3P6 I've seen in a while is $0.32@10pcs. I guess it's best to order some now, they won't go bad :-) Sometimes STM8S103F3P6 breakout boards are cheaper than single STM8S003F3P6 chips.

On the other side, I think that we all have at least one board with an STM8 chip, and unless you're really in a hurry, it will take some time until the board is fully supported.

@TG9541
Copy link
Owner Author

TG9541 commented Feb 3, 2019

I made a start by flashing the SWIMCOM binary to a ZB2L3 board - I'm trying to use M.Mahlows VOC-I2C demo in the examples folder. So far, I still get the error message I2C: ACK missing?. Maybe there are no pull-up resistors and I need to set internal pull-ups and the proper GPIO mode?

@VK6TT
Copy link
Collaborator

VK6TT commented Feb 4, 2019 via email

@VK6TT
Copy link
Collaborator

VK6TT commented Feb 4, 2019 via email

@paulcrawford
Copy link

I ordered 10 pieces last October and paid CDN$5.56 including shipping. The same vendor is only CDN$4.42 today including shipping https://www.aliexpress.com/item/Free-Shipping-10pcs-lots-8S003F3P6-STM8S003F3P6-TSSOP-20-New-original-IC-In-stock/32919745220.html?spm=a2g0s.9042311.0.0.99794c4dgWvW62. The site Thomas quoted above is right now CDN$8.51 including shipping. The shipping is slow, 70-90 days to Canada, but if you are not in a rush...

@TG9541
Copy link
Owner Author

TG9541 commented Feb 4, 2019

@VK6TT Richard, thanks for the code! In the far past I wrote several bit-banged I2C interfaces that were used at industrial scale, and I also learned quickly that timing is critical.

LCSC looks interesting (e.g. STM8S003F3P6 for 0.285 @10pcs) but they add $3 for handling and at least $5 for shipping... I agree that if one's business depends on the delivery that's a small price to pay.

@ildar
Copy link

ildar commented Oct 29, 2019

Greetings!
1st, I found this great video on how it works (analog part).
2nd, TM1650 datasheet is found on the vendor site.

@TG9541
Copy link
Owner Author

TG9541 commented Oct 29, 2019

@ildar thanks for reviving the discussion!
The video is indeed very useful.
Maybe I'll find some time working on this during the winter break - if you'd be willing to push support for this board I'd be willing to provide support.

@ildar
Copy link

ildar commented Oct 29, 2019 via email

@DrSaad77
Copy link

Can somebody provide the soft to calibrate this tester please??
it seams that the IC lost the stuff, so when I plug it now, the 3 led blink and device turn off, so maybe I need to re upload the soft/code to the IC?? Thx for any help

@ildar
Copy link

ildar commented Apr 16, 2020 via email

@TG9541
Copy link
Owner Author

TG9541 commented Apr 16, 2020

@ildar I didn't quite manage to get to it during the winter break, sorry

@ddodge40
Copy link

Has anyone worked out how to read data from the SWIM port to log the data from the ZB2L3?

@TG9541
Copy link
Owner Author

TG9541 commented May 14, 2022

@ddodge40 I'm still waiting for someone to write some specs:

  • what do you expect the board to do so that a replacement software can be designed
  • be inventive, e.g., remember that you don't need the buttons to control all of the behavior if it can be done with a script
  • what kind of data do you expect to receive

@ddodge40
Copy link

ddodge40 commented May 14, 2022 via email

@TG9541
Copy link
Owner Author

TG9541 commented May 14, 2022

@ddodge40 what you've described is the use case, not the specs of a software so that it can be designed. Unfortunately, I can't do the reverse engineering of the original firmware. Someone else will have to do that :-)

@ddodge40
Copy link

ddodge40 commented May 14, 2022 via email

@FBMinis
Copy link

FBMinis commented Jan 17, 2023

Yes the link you showed is the exact tester. I have 3 of them and use them to validate battery capacity of NiMH as well as my 18650's. I see this as a useful tool 3 buttons, 4 digit LED plus current sense. After seeing this forum, I desoldered the display hiding underneath it was the stm8s along with a TM1650 LED controller. Also hidden by the picture is what appears to be swim connections. I have not had time to further analyse it, but may do that in the future. I just don't have enough time and to many hobbies. Added a pic and noticed that silkscreen on the board states ZB2L3 on my other two that I purchased. hw-586 @VK6TT

Originally posted by @suskitech in #247 (comment)

Which load do you use to test your NiMH?

@wolf-t-me
Copy link

I bought this board recently but he micro USB port broke off after very limited use and I was unable to re-attach it.
I identified tat I could power the board by soldering a severed USB cable's + and - wires directly to two exposed solder points on the rear of the board.
It works fine but it will not allow me to enter calibration mode, which would normally be achieved by pressing and holding the three micro-switches while powering up the board.
It would seem that the physical insertion of a micro USB male to the original port provides an additional trigger to initialise the calibration function.
Can anyone suggest a way of entering calibration while the unit is being powered in my unconventional way?

@selevo
Copy link

selevo commented Oct 11, 2023

it's now others mcu and other pinout
ft61f135-rb
The era of quick and easy modification of ready-made devices is history

IMG_20231007_210807_edit_331079661148959

@ddodge40
Copy link

ddodge40 commented Oct 11, 2023 via email

@TG9541
Copy link
Owner Author

TG9541 commented Oct 11, 2023

it's now others mcu and other pinout
ft61f135-rb

Here is FT61F13X datasheet - the device appears to be PIC16-like and it has just 3K words ROM and 256 bytes. That's what I call "old school" and "frugal".

The era of quick and easy modification of ready-made devices is history

Yes, that appears to be the case.

@dumaster
Copy link

it's now others mcu and other pinout ft61f135-rb The era of quick and easy modification of ready-made devices is history

IMG_20231007_210807_edit_331079661148959

I have this new version 3.0 of the HW-586, it does not enter calibration mode using the method used in older versions, which is to press the three buttons simultaneously and connect the power to USB, has anyone found out if they changed the method for entering calibration mode Or if in this v3.0 there is no way to enter calibration mode ???

I will be very happy and grateful if anyone can help !!!

Thanks
Edward

@selevo
Copy link

selevo commented Jan 22, 2024

I have this new version 3.0 of the HW-586, it does not enter calibration mode using the method used in older versions, which is to press the three buttons simultaneously and connect the power to USB, has anyone found out if they changed the method for entering calibration mode Or if in this v3.0 there is no way to enter calibration mode ???

I will be very happy and grateful if anyone can help !!!

Thanks Edward

Almost all of them now have no calibration.
It's just a terrible copy of what came before.
Programmers with crooked hands and brains did not add a calibration mode; it is also impossible to view the cut-off voltage in operating mode, only once after turning off the power, by re-installing it.
The modules also do not remember settings after being disconnected.
I think there are still older versions somewhere, but they are more expensive and do not compete.
And sellers on Aliexpress don’t understand anything about this, they buy what’s cheaper, even if it’s 0.01 cheaper

Perhaps in the future this will be done on disposable programmable microcontrollers.
This will be the next stage of optimization.

This has already happened to some USB testers.

These are the pictures that now have disposable chips installed.
ScreenShot002922

@dumaster
Copy link

it's now others mcu and other pinout ft61f135-rb The era of quick and easy modification of ready-made devices is history
IMG_20231007_210807_edit_331079661148959

I have this new version 3.0 of the HW-586, it does not enter calibration mode using the method used in older versions, which is to press the three buttons simultaneously and connect the power to USB, has anyone found out if they changed the method for entering calibration mode Or if in this v3.0 there is no way to enter calibration mode ???
I will be very happy and grateful if anyone can help !!!
Thanks Edward

Almost all of them now have no calibration. It's just a terrible copy of what came before. Programmers with crooked hands and brains did not add a calibration mode; it is also impossible to view the cut-off voltage in operating mode, only once after turning off the power, by re-installing it. The modules also do not remember settings after being disconnected. I think there are still older versions somewhere, but they are more expensive and do not compete. And sellers on Aliexpress don’t understand anything about this, they buy what’s cheaper, even if it’s 0.01 cheaper

Perhaps in the future this will be done on disposable programmable microcontrollers. This will be the next stage of optimization.

Is it not possible to create firmware for these ft61f135-rb MCUs to include these essential features?

Thanks
Edward

@selevo
Copy link

selevo commented Jan 23, 2024

Is it not possible to create firmware for these ft61f135-rb MCUs to include these essential features?

Thanks Edward

You can do it yourself if you have a lot of time and desire.
To do this, you need to download the development environment from the manufacturer’s website,
Study the documentation for the chip and buy a programmer.

Most likely, no one will do this except you, if only because tomorrow these “blanks” could be made on another microcontroller and all the work will be useless for the community and
almost useless for this person in the future.

You can also write about this on the product review page on Aliexpress.
If no one buys the 'garbage', they will stop producing and resell 'garbage'.

@dumaster
Copy link

Is it not possible to create firmware for these ft61f135-rb MCUs to include these essential features?
Thanks Edward

You can do it yourself if you have a lot of time and desire. To do this, you need to download the development environment from the manufacturer’s website, Study the documentation for the chip and buy a programmer.

Most likely, no one will do this except you, if only because tomorrow these “blanks” could be made on another microcontroller and all the work will be useless for the community and almost useless for this person in the future.

You can also write about this on the product review page on Aliexpress. If no one buys the 'garbage', they will stop producing and resell 'garbage'.

So there remains one last attempt, hardware calibration, perhaps to modify the circuits that generate the signals at the MCU's analog inputs, for example by modifying the SHUNT resistor, or place a trimpot to change the values that arrive at the MCU!!!

But thank you very much for your attention and if I have any news I will send it here in this thread!!!

@selevo
Copy link

selevo commented Jan 24, 2024

Is it not possible to create firmware for these ft61f135-rb MCUs to include these essential features?
Thanks Edward

You can do it yourself if you have a lot of time and desire. To do this, you need to download the development environment from the manufacturer’s website, Study the documentation for the chip and buy a programmer.
Most likely, no one will do this except you, if only because tomorrow these “blanks” could be made on another microcontroller and all the work will be useless for the community and almost useless for this person in the future.
You can also write about this on the product review page on Aliexpress. If no one buys the 'garbage', they will stop producing and resell 'garbage'.

So there remains one last attempt, hardware calibration, perhaps to modify the circuits that generate the signals at the MCU's analog inputs, for example by modifying the SHUNT resistor, or place a trimpot to change the values that arrive at the MCU!!!

But thank you very much for your attention and if I have any news I will send it here in this thread!!!

There is one more point besides adjusting the resistors....
This is the linearity of the ADC of these microcontrollers and the accuracy of the timer.
If, for example, it ticks faster, then in an hour it will calculate more capacity than it is, and if it ticks slower, then less capacity.
If the ADC correctly shows a voltage of 1 volt, then it can show 9.2 volts at a voltage of 10 volts.
You can check this if you have a multimeter and compare.
The accuracy of the timer can be checked by connecting this tester to the power supply and setting any voltage, for example 10 volts. If there are two 7.5 Ohm resistors in series, then the current will be 10\15 = 0.667
After an hour the tester should show 667

That is, I want to offer you two simple checks to make it clear whether such accuracy suits you.
Since the linearity and accuracy of the timer simply cannot be compensated by resistors. :)
But..
The timer can be adjusted by heating or cooling the microcontroller.
This option is for very interested people))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests