Current Monitor/Shunt

Hi Gazz,
Traditional welsh name fella, where you from?
My disabled son`s middle name is Gareth, first name Arwel

im from leicester, yeah my gran was welsh so im some sort of washed down welsh lol more english then welsh

if you have flashed the arduino with the code flashed to the arduino and connected up correctly (+5v to +5v, gnd to gnd and reset to reset then the above code will work.

make sure you have unzipped the .hex file out of the zip folder and place it in the avr dude folder

when it flashes the red led should flicker, then it will do 5 bright red flashes and 4-5 green flashes then the red led will flash dimly every so often and the screen will say done or what ever

you cant hurt it aslong as you got the wires correctly connected, avr dude will just say failed if somthing is wrong

The resistor and cap isn’t always necessary. I did mine without either. That should work. The only thing you may have to change is COM4. This will need to be the com port of the uno, whatever that is. Other than that, yes you’re correct. Let me know how it goes.

Hi Stuart, Gazza and john,

SUCCESS
Current shunt board now updated successfully, and it is running and recording the correct values.
Awesome.
Its been a hell of a journey for me, and to be honest, I would never have understood the process without your help. I would never have made the link from opening and setting up the arduino sketch with the correct boards loaded, to then opening a command prompt and using that command line, i would NEVER have made. I would have still been trying 10 years from now tbh.
Many many thanks.
Anthony.

3 Likes

Should be released later today… Keep an eye on YouTube!

1 Like

awesome, thanks Stuart, i need another 3 current shunts as well. Look forward to watching the video and seeing the new design and improvements. Thanks.

Hello, i want tested UPDI programing directly from Ch340 USB/uart +resistor. If I run this on arduino ide, in ide debuging terminal is:

/home/USER/Arduino/arduino-1.8.4/portable/packages/megaTinyCore/tools/python3/3.7.2-post1/python3 -u /home/USER/Arduino/arduino-1.8.4/portable/packages/megaTinyCore/hardware/megaavr/2.6.5/tools/prog.py -t uart -u /dev/ttyS4 -b 57600 -d attiny1614 –fuses 0:0b00000000 2:0x02 6:0x04 7:0x00 8:0x00 -f/tmp/arduino_build_913857/Blink.ino.hex -a write -v

It’s fuses setting correct for upload “diyBMSCurrentMonitor_ATtiny1614.hex” ?
On arduino ide I have default values for attiny1614 from Spencer Konde core.

Just saw the YT video, awesoem work @stuart, an all in 1 unit beautiful !!!

1 Like

I don’t use the Arduino IDE, so I recommend using the instructions on GitHub for programming the attiny code.

You not setting fuses on avrdude if upload xxx.hex. I dont know default values on avrdude for tis attiny.
Its ok settings: startup time 8ms,
20MHz internal, 1.8V BOD, no watchdog?
On platformio ini is:

board_build.core = megatinycore
board_build.extra_flags=-DARDUINO_attinyxy4 -DMILLIS_USE_TIMERD0-UARTBAUD5V
upload_protocol = jtag2updi 

its diferent…

Stuart, can you speak more on the grounding implications of the new on-board shunt? You mention that those who require an isolated ground need to use the off-board unit. Fair enough, but other than safety related reasons as mentioned in the Wiki you linked, what would be a common reason to require isolation in these types of installations? Is it only really an issue when someone is using mains to power the board? Assuming one is powering from the battery, is there ever a real threat of problems (e.g. nuisance interference with the CAN network, etc. ) if you don’t have isolation? I know you were involved in a lot of discussion on this forum about isolation when you were developing the stand alone shunt.

What type of power supply is really needed then when you’re powering off the battery? If you use a step down transformer as you mention in the Git Installation Instructions then you’re just tying Vout (-) to battery (-) ? At that point can’t you just use non-isolated switching type converter which may be more efficient?

Excellent work, patiently waiting to order V4.6!

1 Like

In regards to isolation, it’s not really the isolation that’s the problem it’s separation.

If you use a mains usb adaptor, the negative DC output is likely connected to one of those mains AC pins. So if you then connect the battery negative, you have now linked the battery negative to the whole house AC circuit.

Now, this may work fine, but it may also cause all sorts of issues, even affecting downstream RCD devices.

So ideally power everything from the battery, it doesn’t need to be an isolated DC to DC converter.

me too, when the v4.6 gets released to us im ordering 5 straight away.

i have an isolated dc 48v to 5v converter powered from the battery connected to the controller.
does it mean i can connect the battery negative to the controller without problems if i want to use the integrated shunt?

Yes, although technically you would now be removing the isolation as the negative will now be connected to both the converter and battery negative.

It shouldn’t be a problem - the isolation comment relates to mains powered devices.

1 Like

Hi @stuart, as it seems the chip shortage on the INA228 is going on and Mouser posponed again the delivery of the INA228 from May2023 to end of Jan. 2024 would you may think about to change the code to use the INA237-Q1 (https://www.ti.com/lit/ds/symlink/ina237-q1.pdf?HQS=dis-mous-null-mousermode-dsf-pf-null-wwe&ts=1680473190335&ref_url=https%253A%252F%252Fwww.mouser.com%252F) as a replacement?
Yes, it has only 16bit but it is possible to purchase and for the most applications OK.
Thanks

Have you seen the new smaller add-on board using the ina229?

That’s generally in stock.

Thanks for the answer. Sure i know the add-on board, but I really like the seperate aproach if the current shunt board. As well, I’m planning to install the shunt arround 1m away from the Controller and have it isolated.
As far as I got over the Datasheet, the differance is the 16Bit and the Charge register. I don’t found more differance.
Additional to this, ther was just a while ago a forum order of several Battery-board, Controller and Shunt-Boards, unfortunately mouser is now not able to deliver the INA228 :frowning: .
/ Chris

TI themselves should have stock available around the first week of May. When I was having issues sourcing these when the shunt PCB came out that is where I ordered them from and it was cheaper than Mouser/DigiKey!

1 Like