DIYBMS v4

maybe this :sweat_smile:

OT as can be, but I couldn’t resist. :grin:

This is what you get when you take “musical relays” to the next level, on steroids, and then some:

1 Like

Today I got an update from Microchip on shipping date of Attiny 1624 for V4.5 cell monitors. Was March, now it is July 2023 :frowning:
Any ideas where to get these chips from ? I need at least 4 of them, the rest can be on July.
I’ll pay any price :wink:

Same in my case
From a delivery scheduled for the end of February, the manufacturer has just informed me of an additional 4 months of delay.
@stuart Do you have any idea how to get attiny1624 before?

No!

When I switched to using the tiny1624, there was plenty of stock, but nothing left.

Octopart can be useful Octopart Search

Its been suggested to me to swap to the STM32 range of chips, which do appear to be in stock, but that would also be a significant switch/amount of effort.
What do people think?

Maybe we could look for some cheap gadget on Aliexpress that could serve as a donor for the attiny, I present it as an idea

STMs are spec’d up to 3.6V, they’ll die above 4.0V so (according to the STM32L051 specs that I just checked) so not very LiIon friendly, and the supply situation is equally iffy.

The LPC802 however might work. While the max is also at 3.6V according to the “general operating conditions” section of the specs, it should work up to 4.6 without dying. It does have a 12-bit ADC, and Farnell has 10k of them in stock (16-pin version).

Attiny1624 - on ebay: attiny1624 for sale | eBay

Please don’t spend £10 on that, they are only worth £1 max.

You could also consider the esp32-c3 in it’s QFN package, you would need a few passives and a 40Mhz crystal. But it should be doable even at lower power.

@Smurfix

You’re correct about the voltage, and that’s why a small LDO should be added to the circuit too

Benefits of switching to STM32:

  • These STM32 MCUs are everywhere, and seems to be easier to source, and eg. the STM32G0 serie is in stock in thousands both at Digikey, LCSC and Farnell

  • Needs a X-tal which will improve the accuracy of the serial communication

  • More code space

10 pounds or €10, as it will turn out that they are cheap, look at the prices of those that have abundant stock,
ironic mode off

Ten of them. That doesn’t bode too well.

You need more than an LDO, there’s also components required for measuring cell voltage – which directly translates to more accuracy, everything else being equal. And frankly if you need more than 16k flash per cell you’re doing something wrong.

It does work without one. Besides, the comm speed is limited by the optocouplers. Any idea for a replacement that’s (a) fast and (b) doesn’t eat >1mA when idle?

We’ll take a little risk, let’s see what the seller tells me. If things go well, I can still supply small quantities (I only need 50 an the minimum ordes is 100) at cost prices to other people

I hope they are genuine!

that is precisely the part of the risky sport, hehehe

1 Like

I never hope thery are genuine. I hope they are working.

And I did the same with my 841.
Startet an enquiry. 3 days later I had about 50 offers of diffrend prices but all immediately available.

I took an offer of:

Cindy.Lin
Sales Manager
Techkey Electronics Limited

10 days later I had 200 Attiny841 in my workshop.
Delivered by DHL from Asia direct.
And including the freight for 398$.
And I had luck. The custom did not ask for an envelope with 200g of black beatles.

In Europe the delivery dates for the chip were late 2023.
All bullshit. If you want something you will get it.

@Smurfix
“It does work without one (X-tal)”

No, you’re wrong.

Serial communication @9600 baud requires a accuracy better than 3.75% between Rx & Tx according to e.g. this technical document if you want to have reliable communication:

Have a look at the datasheet for the AtTiny1624, and you’ll see that it has around 2% accuracy in the normal operation range with voltage and temperature swings, which in theory can mean that you have 4% difference between Tx & Rx between 2 cell modules

Maybe you can get away with serial communication without an X-tal on a node, but only if one of the ends contains a X-tal to get a reliable clock accuracy. But in the case of the cell modules you do not have any accurate oscillators

And regarding the LDO to further improve the stability of both the clocks and other parameters for the MCU, it’s correct that you need something to divide the cell voltage down below Vdd to the MCU

“Any idea for a replacement that’s (a) fast and (b) doesn’t eat >1mA when idle”

A quich check. E.g. the STM32G030 have similar active and sleep power consumption as both the AtTiny841 and the AtTIny1624

Don’t forget that we are not limited to traditional baud rates, which are often poor in modern mcus, even with fractional baud rate generators.

Can we get the same calculation at a division of the core clock speed, like 10,000 or 20,000bps?

Umm, yeah. However, all those ATtinys operate in the same environment thus their clocks all skew in the same direction thus I don’t think this is a problem in practice.

In theory we could sync things up by periodically sending a 0x00 byte and measure the timing, but I doubt that’d help much.

I was talking about replacements for the optocouplers.

Doesn’t matter, the clock delta is relative so whether both talk 9600 or 21212 baud is immaterial.

However, we have one non-relative component in the equation, which is the optocouplers. They introduce a random signal delay that doesn’t depend on the baud rate, thus it’s more significant at higher speeds.