A step by step adventure of building the diyBMS by Stuart Pittaway.


Solar Batteries, Panels, Chargers, Inverters & Mounts at www.batteryhookup.com Save 5% with coupon code "Powerwalls"

Hello Wolf,

i have on this time 3 Current Sensor at work from Diybms. the next 10 peases i will install.
The problem is the chip ina228. I have by 20 pcs from TI. there are 341 pcs in stock.
Can you help my withe the protocoll for spi?

Best Regards
Michael

1667478722956.png
 
I just checked TI, and there are NOT any INA228 chips in stock. The screenshot above is for the INA229, which Wolf mentioned experimenting with. I haven't seen an in-stock / available INA228 from any of the major suppliers in the last couple of weeks. All my other PCBs are on the way here from China, but the shunt board still has to wait.

Cheers, John
 
Hello DG98,

ok i see. i write it wrong. i mean the INA229 i have yesterday buy 40 pcs. You have right i have also write other companys in poland america and china but the offer what i get is between 98€-144€ per unit.
The 229 have the same details and register but the different is the communication. this is SPI nit I2C.
I need a person what can help me withe the script.

Best Regards
Michael
 
This are the files from INA229.
 

Attachments

  • ina229.zip
    6.9 KB · Views: 32
  • ina228.zip
    7 KB · Views: 29
@Michi2020

As we all are aware that the INA228 chip is on a galactic backorder, which causes a major problem with the present construction of the Current sensing shunt board. There is a somewhat satisfactory off the shelf solution. which Stuart Pittaway describes in this video. Essentially it utilizes a PZEM-017 module, readily available.
View: https://www.youtube.com/watch?v=AnPCe3VOae0


I think this is a cheep temporary solution till the INA228 comes available again or I (or someone else) has had the time to rework the PCB and code with the INA229 in mind.
I have been fortunate as I was able to locate some INA228EVM Eval bords at $65. Still way cheaper than what everyone else wants for the INA228 and they are the genuine chip not a reproduction from china, from where I bought 15 and only 2 of them worked. Lesson learned!
Just hot air the INA228 off of the eval board and solder to the Shunt PCB done. Programing the ATTINY 1614 is then the challenge but I have found the combination and will share it in my next posts.
Mouser has some (113 as of now) INA228 EVM boards. Get them while they are hot.
https://www.mouser.com/ProductDetail/Texas-Instruments/INA228EVM?qs=eP2BKZSCXI7XkubOc/ROiw==

Update: I just got a DHL Express notification on my order from MIKROELEKTRONIKA for 5 Power Monitor Click boards that use the INA228
I ordered 5 of these boards on Sep 04 2022 and delivery is scheduled for Nov 10 2022 with the same Idea to hot air the INA228 off and install it on the shunt board. If you buy 5 they are $18:90 each. way cheaper than the eval boards.
That my friends is the least expensive solution so far. Especially for Europe as they are in Belgrade Serbia.
Wolf
 
Last edited:
Hello Wolf,

yes i have buy 10 pcs on the last year but the PZEM-017 can't meshure the current in load and unloaded. Thats the Problem for me. The SOC is wrong that he can't calculate this.
I take the PZEM-017 in Ebay vor seller.
The DIYBMS to change to INA229 is not the Problem. I think i change the Board for 2 Chips INA228 and 229 and withe welding you can bridge the wire on the pcb.
I hope that one person can help me withe the Programm.

For the last pcb i buy this Board and make the same what do you say.


The Price is only 21€.

Best Regards
Michael
 
yes i have buy 10 pcs on the last year but the PZEM-017 can't meshure the current in load and unloaded. Thats the Problem for me. The SOC is wrong that he can't calculate this.
Yes I know. That is why I called the PZEM-017 a cheap temporary solution till the INA228 comes available again.
I think I have found the least expensive option/solution with the Power monitor click boards.
I am not a professional code writer to quickly write the code for the INA229 replacement into the main code.
Nevertheless when I get time I will work on it. The old saying goes "Necessity is the mother of invention".

I have my INA228 chips some at great cost and some relatively inexpensive. considering the retail price of this flea sized chip is only $6.00 or so.
Wolf
 
Ja, ich weiß. Deshalb habe ich den PZEM-017 als günstige Übergangslösung bezeichnet, bis der INA228 wieder verfügbar ist.
Ich glaube mit den Power Monitor Clickboards die günstigste Variante/Lösung gefunden zu haben.
Ich bin kein professioneller Codeschreiber, um schnell den Code für den INA229-Ersatz in den Hauptcode zu schreiben.
Trotzdem werde ich, wenn ich Zeit finde, daran arbeiten. Das alte Sprichwort sagt: „Not macht erfinderisch“.

Ich habe meine INA228-Chips einige zu hohen Kosten und einige relativ preiswert. wenn man bedenkt, dass der Verkaufspreis dieses flohgroßen Chips nur etwa 6,00 $ beträgt.
Wolf
Ja, ich denke, das braucht lange, bis der Preis runtergeht. Ich werde mit der Platine beginnen und wenn ich die ina229 habe, werde ich auch mit dem Code testen. Ich hoffe, Stuart wird auch helfen. Das ist einfacher, dass Sie 228 oder 229 mit einer Brücke oder einer Schweißverbindung installieren können.
Thanks.
 
Since we can get the ATTINY841-SSU chips at various prices and I showed you how to source the missing 3.3Ω resistors there are 2 more items.
View attachment 28135
The JST connectors and the programing header. For the programing header, I choose to use the 2x3 6 Pin 2.54mm Pitch Straight Pin IDC Box Header, the black little square connector since it is keyed so when programing the module you can't make a mistake and hook the cable up wrong. One problem that the connecter causes is it covers and interferes with the blue LED ( I did break the flea sized thing but I also replaced it ) so I cut a notch out of the connector to give the LED clearance and it works perfectly.
View attachment 28136View attachment 28137
This picture is getting ahead a bit but as you see with this cable and the indexed connectors no guessing which one is pin 1.

View attachment 28138
The JST connectors you can order at Newark (No sales restriction on that item ) They got almost a million in stock
The Black headers I got at Amazon https://www.amazon.com/dp/B00UBWKQLA?psc=1&ref=ppx_yo2ov_dt_b_product_details

Now this is a first for me and I did a video on how I solder the ATTINY841-SSU onto the Module board..
You can view it here.
View: https://youtu.be/2jHpaEnpQec


For those that don't want to do this PM me and I will be more than happy to do it for you, buy me a coffee someday.
I can knock out 14 in a half hour or so.

Alright that's it for the modules next the controller. Stay tuned.

Wolf
thanks for this. Getting my 66year old electronics tech head around this is fun. You are very good.
 
( translated from German )
Yes, I think it will take a long time for the price to go down. I will start with the board and when I have the ina229 I will test with the code as well. I hope Stuart will help too. That's easier that you can install 228 or 229 with a jumper or weld joint.
thanks
Stuart will also help

I don't think so. If I remember correctly on Stuart's Patreon site ( I am a sponsor ) that question was asked and he had no plans to do any work on it. Maybe that will change. but I doubt it. That responsibility will be left up to the people who need it and absolutely cannot get an INA228 at any price. Fortunately most of us will only need 1 and that is where the eval and/or click boards come into play as a reasonable solution. If you are mass-producing these boards then that's a different story.

Wolf
 
I have not forgotten about this thread and will continue with the programing of the Controller, Modules, and the Shunt.
I have lost my dearest friend my miniature poodle Houdini.
It was a hard time.

1674236670922.png
However as the great spirit in the sky saw fit to bless me with another puppy.
This one is Kaiser, 3 month old, also a miniature poodle and he keeps me very busy so my time is limited.
1674237135738.png
I promise to continue this thread as soon as possible and finish the documentation.
If in the meantime you have any questions PM me and I will answer.
I also have some INA228 chips in stock along with plenty of ATtiny841-SSU.

Wolf
 
Just dropping this here to show that Stuart's diyBMS is very accurate. It's <1% deviation at full SoC compared to the readings of the Victron.

View: https://youtu.be/G0QFKcIsh-k


End of video: He's making another major design upgrade to make it easier to build/use :)
 
Is this project still live by the way, or has Stuart moved on?
Oh its alive and well, however we are only humans and he is doing this on his "own free time".
If you want to check updates and FAQs check out this GitHub repository https://github.com/stuartpittaway
You can also join his Patreon page https://www.patreon.com/StuartP/posts and for a mere pittance of $3.20 a month
you can have general support. and follow questions that have been asked and answer given. you can also ask questions and should revive an answer in a reasonable amount of time. Just make sure you read all the FAQs and research all videos before asking a question that may have been answered already.
I have completed the whole project and tested it, the time to document all the steps and how too in a different more layman format is very time consuming. I have to switch my brain from knowing how to do this to how can I help someone who has never done anything like this to understand the concept of using AVERDUDE to program the Atmel Tiny1614 on the shunt board. That alone took me 2 or 3 days to get it right. Finally found the simplest solution with an USB to TTL Serial Cable that you insert a diode between the RX and TX pins and within seconds programing commenced. OK enough for now here are some pictures and I will try to assist as much as I can.
I will answer questions to the best of my ability and as quickly as possible. Remember we are only human.
Wolf
20220829_003341.jpg20220829_005324.jpg20220905_010919.jpg20220905_005002.jpg
 
I haven't worked on my system in quite awhile. Back when I ordered my PCBs, one of the chips was in perpetually short supply. I can't remember which one, though! Attiny-something-or-other, maybe? I've got a whole tube of them which I still need to air-solder on to my boards. I've already soldered most of the other connectors and whatnot (the easy stuff!) to the PCBs.

I also think there was a specific chip related to the shunt that was unobtainium when I started this -- people were even disassembling other devices to get that chip off of other boards for use in the DIYBMS. I'm not sure if that has resolved. I'm still (slowly) processing cells for the battery I ultimately intend to use the DIYBMS on, but I'm still excited about the possibilities.

Cheers,
John
 
Attiny-something-or-other, maybe?
there was a specific chip related to the shunt that was unobtainium
Yes the "ATMEL TINY841-U for the monitor boards the ATMEL TINY1614N along with the IN228 for the shunt.
Which by the way was available ( when you bought the eval kit through TI ) till I bought them all but 2🤪.
The Tiny841 was a different story everyone had them but could not sell them to the US mainland. So since I was going to Europe to visit my mother I had them send them there.
Somewhat a cluster with import duty even though I was going to leave the country with them . Nevertheless came out just 5 cents cheaper than if I waited for a US delivery.
Everyone wanted top dollar for everything. it was a rough time.

Wolf


1720495310929.png1720494898460.png1720495196268.png
 
Back
Top