Current Monitor/Shunt

I read the content of the eeprom, which in the locked attiny1614 looks like this:
:20000000700D1000D4FF3D130F000020FF7F0080406A000000285553FC002C01320000002E
:20002000163A3EC32E391801000060420000A0410000C742FFFFFFFFFFFFFFFFFFFFFFFFFFFF6F
:20004000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC0
:20006000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA0
:20008000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF80
:2000A000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF60
:2000C000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF40
:2000E000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF20
:00000001FF

Will this help?

Probably not!

When this problem occurred, does the led flash at all on power up of the current shunt?

If there are no flashes, then the code is corrupt.

No, the LEDs are not flashing, there is no communication.

But when I send to eeprom:

:20000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00
:20002000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0
:20004000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC0
:20006000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA0
:20008000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF80
:2000A000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF60
:2000C000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF40
:2000E000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF20
:00000001FF

Shunt activates, LED flashes and communication starts,
even though the in flash code is not touched.
Does the shunt program save any states in eeprom while running?
e.g. the amount of energy stored in the batteries.

Only configuration data is stored in eeprom.

Does anyone have a spare LM5009A, INA228 & TLP172GM
and possialby a Murata Style Shunt 150A ?

Or if you know an online site that has these avaliable I’d appreciate it.
Thanks
Rolf

@stuart can we use any shunt, or does it have to be 50mv ?

50mV is best, as that aligns nicely to the 40.96mV rating of the INA228/229 chip.

Thanks @stuart

You say INA228/229, can we install the 229 instead of the 228 ?

NO - 229 is a SPI part, not i2c.

Cool thanks, we’ll just have to wait till the INA228 becomes avalaible again.

I’m working on some changes to move to the INA229 (which is why I mentioned it) - its exactly the same chip, but using SPI rather than i2c - more critically, it seems to be in stock in some places.

Awesome, but I assume this would not work on the existing boards, we’d need to have new boards created ?

I’m trying out an addon board, smaller/easier to build.

1 Like

So I’m having issues with this thing. I can program it correctly, I have new attiny1614 new lm5009a and new ina228’s installed. I have two boards both having the same problem. After programming and without the INA228 installed I get Both lights flashing for bootup then red flashing at regular intervals until it reboots which from the LED error sequence in the code just means no comms with INA228. Ok no big deal. As soon as I installed the INA228 I get the same bootup sequence, then the red light just flashes somewhat dimly, maybe once ever 1.5-2 seconds. Nothing else happens. Both boards do the same thing and I’m losing my patience. Does anyone have an idea what could be going on?

Is the INA chip fitted round the correct way? (Pin 1 alignment)


I’m pretty sure this is the right way?

flux is your friend, looks like you got serious bridging

Soldered it again. No bridging I can see. Same issue.

I’ve tried taking a video of the blinking light but it seems to more or less synch with the camera refresh rate so it’s not picking it up properly


Here I think this’ll work. I had to get the phone very close.

Looks like the board is scorched you may have damaged it

The board isn’t damaged, the scorch is just up by the mounting holes for the shunt. There are two boards exhibiting the same problem. Something else is going on I just can’t figure out what. So what does the light blinking in that manner mean? I’ve checked continuity between all pins for the ina228, attiny1614 and everything seems to be good.