INA icon indicating copy to clipboard operation
INA copied to clipboard

INA228 Support

Open Agilitytime opened this issue 3 years ago • 50 comments

Hi Zanduino,

thank you very mutch for the Libary. Is it Possible to Integrate the INA228 ?

here are the Specs 85-V, 20-bit, ultra-precise, I2C output current/voltage/power/energy/charge monitor with alert. https://www.ti.com/product/INA228

The Cool think are the energy/charge Monitor and 20 Bi resoulution.

Best, Basti

Agilitytime avatar Mar 09 '21 12:03 Agilitytime

Those new INA228 and INA229 look nice! I might be interested in them for myself for a solar power charging system. Unfortunately, these are not I2C but SPI systems, which would mean making some significant changes/additions to the INA library. That doesn't mean that it isn't possible, just that it isn't just a matter of adding the new specifications into the existing code.

At the moment neither Mouser nor Digikey have any in stock, otherwise I would have ordered some already :)

SV-Zanshin avatar Mar 09 '21 12:03 SV-Zanshin

The INA228 has I2c and the INA229 is the same with SPI. I think we only need the energy/charge Monitor function.

Agilitytime avatar Mar 09 '21 19:03 Agilitytime

Ahh... I downloaded both datasheets, but only looked at the INA229 one. I'll see if I can get a INA228 ordered (and soldered) and should be able to add it to the library. I won't start with any coding until I get the hardware, though - so it might take a bit.

SV-Zanshin avatar Mar 10 '21 07:03 SV-Zanshin

I've ordered a INA228 from Digi-Key and will see about soldering together a test board and adding this device to the library. The INA237 is still not in stock.

SV-Zanshin avatar Mar 25 '21 06:03 SV-Zanshin

The INA228 has arrived. I thought that the package was a 10-TSSOP and I have a breakout adapter to DIP for that, but looking at the chips they seems awfully small and I re-checked the datasheets to find that the package is a 10-VSSOP and I have no adapters for that. A quick look at digikey didn't show me any adapters, so I might have to draw up a schematic and order some special PCBs to get this done; as there are still no breakout boards out there.

SV-Zanshin avatar Apr 05 '21 10:04 SV-Zanshin

Hello Arnd,

thank You for your Support!!! Can i "Help" you with a donation ?

Thanks, Sebastian

Agilitytime avatar Apr 05 '21 12:04 Agilitytime

Hello Sebastian (that sounds like a German name),

Thanks for the kind offer! I will download Fritzing again and try to design a board that I can get cheaply made. I have a toaster reflow oven I made a long time ago that needs to see some use :)

I just am not proficient with Fritzing or similar CAD products so this might take a while.

SV-Zanshin avatar Apr 05 '21 12:04 SV-Zanshin

Hi,

I am looking into pulling myself and contribute. Before you design a Board just use a INA226 based one and exchange for the 228. Same pinout, same package.

If you want i'll send you one.

Br, Alex

aXe-88 avatar May 02 '21 18:05 aXe-88

Hello Alex,

That would be great. If I had a prototype I could change the library and test the changes. I haven’t designed a board yet, I got caught up in making an Arduino controlled coffee roaster (a popcorn popper, solid-state relay for the heater PWM, MOSFET for the fan PWM, two thermistors, LCD display, two rotary encoders and lots of software 😊 )

-Arnd.

From: Alex @.> Sent: 02 May 2021 20:57 To: Zanduino/INA @.> Cc: Arnd @.>; Assign @.> Subject: Re: [Zanduino/INA] INA228 Support (#77)

Hi,

I am looking into pulling myself and contribute. Before you design a Board just use a INA226 based one and exchange for the 228. Same pinout, same package.

If you want i'll send you one.

Br, Alex

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/Zanduino/INA/issues/77#issuecomment-830854870 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AFT5DRHOX4B344XC6SF2YGDTLWN55ANCNFSM4Y3P3MEQ . https://github.com/notifications/beacon/AFT5DRABE4QHPGCVU7UI3S3TLWN55A5CNFSM4Y3P3ME2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGGC5NVQ.gif

SV-Zanshin avatar May 03 '21 04:05 SV-Zanshin

@SV-Zanshin

I've ordered these chips, and have breakout boards arriving next week. Will be willing to test!

If you send me your mailing address I can mail you some adapters.

magicsmoke avatar May 09 '21 21:05 magicsmoke

Hello Daniel - Alex has been kind enough to offer sending me an adapter with the INA228; although I'm not sure when. But if that doesn't work out I'll get back to you and your generous offer.

SV-Zanshin avatar May 10 '21 04:05 SV-Zanshin

Okay good to hear, send a message if you still would like some boards.

I'd be willing to take a shot at implementing the 228 once my boards and chips arrive.

magicsmoke avatar May 10 '21 06:05 magicsmoke

Perhaps you could test the library version with INA228 support once I get that done, and you can make sure that I didn’t miss anything.

-Arnd.

SV-Zanshin avatar May 10 '21 06:05 SV-Zanshin

That works for me!

magicsmoke avatar May 10 '21 06:05 magicsmoke

@aXe-88 - I just checked my mailbox and have received your board with the INA-228! Many thanks for that; and since tomorrow is a national holiday and the weather is supposed to be cold and rainy I think I'll get started with putting this into a circuit and developing the library extension.

THANKS!

SV-Zanshin avatar May 12 '21 13:05 SV-Zanshin

I started working on this today and have discovered a basic issue with the library which I can't quite figure out (the "inaDat" class keeps on getting instantiated and I can't see why). So this might take a bit longer than I originally thought to get implemented.

(INA219 and INA228 used together to measure LED power with an Arduino Micro) 20210513_132142

SV-Zanshin avatar May 13 '21 11:05 SV-Zanshin

Update: This might take a bit longer than I originally thought. The INA228 is a different "beast" from the others and I'd originally thought I'd only need to change some of the internal values to add this chip; but the accuracy is 20bit rather than 16bit so I have been changing internal variables to 32bit and am debating taking the plunge and changing the library to use floating point or perhaps even double.

SV-Zanshin avatar May 16 '21 10:05 SV-Zanshin

Hello Arnd.

I also have the INA228 now to test with once you get a initial release out :)

magicsmoke avatar Jun 22 '21 07:06 magicsmoke

Hello SV-Zanshin,

Could you please tell me where you got the breakout board for the INA228 is it a small one you designed yourself or readily available somewhere ?

Thanks !

yahaggach avatar Sep 06 '21 14:09 yahaggach

Unfortunately I didn't find a commercial source, the pinout is the same as INA226 and Alex sent me a prototype to use.

SV-Zanshin avatar Sep 06 '21 14:09 SV-Zanshin

Thanks a lot. I'll quickly grab a breakout board for the INA226 and replace the chip with a 228. If you don't mind, in terms of accuracy and resolution, what INA chip do you recommend for voltages <36V and currents <5A. My main need is high resolution and accuracy.

yahaggach avatar Sep 06 '21 14:09 yahaggach

I'm not in place with fast internet at the moment and don't have the data sheets handy, but I think that the Texas Instruments site has a chart of the various devices including the voltage ranges and accuracy. Or perhaps using DigiKey to list the INA2xx devices and then sorting by accuracy/gain?

SV-Zanshin avatar Sep 06 '21 14:09 SV-Zanshin

Fair enough. Thanks for the help !

yahaggach avatar Sep 06 '21 14:09 yahaggach

Hi @SV-Zanshin Is the current lib supported 228?

majianjia avatar Sep 12 '21 23:09 majianjia

@majianjia - not yet. I am currently away from my home but plan on returning soon and will then update the library to support the INA228 functionality correctly.

SV-Zanshin avatar Sep 13 '21 10:09 SV-Zanshin

@SV-Zanshin Very well, I am trying to implement it but facing the same 20bit registers problem, looking forward to seeing your implementation. Thanks.

majianjia avatar Sep 13 '21 17:09 majianjia

Hy SV-Zanshin

any update on the library to include INA228. Have you tested the library ?? Please release the updated library soon.

varun-skies avatar Sep 24 '21 10:09 varun-skies

I'm really sorry for the long delay - I'm currently in lockdown far away from my home computer, the INA228 and my testing hardware so I haven't been able to do any work. I thought I would have been able to return 2 months ago, but that return journey is proving difficult. I will be back on November 1st but I think I can find some time soon to program around a bit - but I won't have a hardware test bench with an INA228 available and since that chip is significantly different from the others I don't think that it is is going to work out in the short term.

SV-Zanshin avatar Sep 29 '21 20:09 SV-Zanshin

I'm really sorry for the long delay - I'm currently in lockdown far away from my home computer, the INA228 and my testing hardware so I haven't been able to do any work. I thought I would have been able to return 2 months ago, but that return journey is proving difficult. I will be back on November 1st but I think I can find some time soon to program around a bit - but I won't have a hardware test bench with an INA228 available and since that chip is significantly different from the others I don't think that it is is going to work out in the short term.

I have one bult into my hardware, connected to a QT PY module. I could offer remote access if you would like to test some libraries. I have some basic readouts working. BTW, did you see that TI offers a library builder to download? It is just not arduino compatible as is.

riscyd avatar Oct 04 '21 12:10 riscyd

Hi @SV-Zanshin, we have a INA228 test board from Texas, we may help you test the library. We are also very interested in suing the INA228. We have already adapted another library that kinda works but sometimes we get wrong current values.

sebashb avatar Nov 02 '21 20:11 sebashb