Isolated high voltage & isolated current shunt based on ADS1115

Dear all,

I made an isolated high voltage (up to 850V) and isolated current (+/- 200A) shunt and is based on the original diyBMS-Currentshunt: GitHub - pprasse/diyBMS_CurrentVoltage_ADS1115: Isolated current and voltage sensor for up to 850V based on ADS1115 and attiny1614
Maybe the project is useful to someone.

The current measurement uses an ACS758ECB-200B hall-effect based current sensor IC.
The voltage measurement is isolated using an ACPL-C870 Precision Optically Isolated Voltage Sensor.
The analog signal from both measurements are converted using a ADS1115 16 bit ADC.
Coulomb calculation takes place in using an attiny1614 and communication uses isolated RS485 / MODBUS.

The hardware is finished and firmware is ready for testing in a real battery pack.

If you have comments, let me know.

All the best,

Patrick

1 Like

Hi Patrick,
I’m working on a similar project, just for my different PV-Strings. I’m using the ACS758…-50U and also the ADS1115. After the 1st tests, I’m not quite happy with the results, OK for me the accurately is not that important, as I’m only comparing strings with each other.
For your case it would be essential to have a precise measurement, additional to that, I wouldn’t trust this small legs of the ACS to be capable of 200A.
But never the less, looks like an interesting replacement for the Shunt board for smaller applications.

1 Like

I used PZEM-017 and a 50A shunt for each of my 4 strings with a single USB RS485 interface.
Rated for 300VDC. Cheap and simple. A little python to load the values in mqtt, done.

Hi
I would like to run your project.
I have made a PCB but I’m stuck on attiny1614 programming.
I program using Arduino Uno - the code I found in your project shows errors.
Can you send a sketch of the code? ready to paste into the Arduino compiler?

Hi Piotr,

let me double-check tomorrow if the latest code is pushed.

1 Like

Piotr, latest code is pushed.
I just re-read your post.
You will not be able to compile in the arduino IDE.
You will need Visual Studio Code with PlatformIO plugin.

sorry, I’m not an expert
Do you have instructions on how to program using PlatformIO?
?
Is there any simple way?

Hello Mr Prasse,

Pleas look on github I have the a question.
The Gerber file is a different to your kicad J1 and c17 is not there. Where is the eight Version?

Many Thanks
Michael

Can you help me?
See my question below.

Best Regards
Michael

Hello can you help me. I am waiting for your response!
Best Regards
Michael

When using JLPCB the component placement does not ever load (circle continues to rotate and “Processing File”).
I upload the Gerber, I then upload the BOM and CPL file, select next after the component selector, then component placement just continues to load without ever finishing. Am I doing something wrong or is the files missing the coordinates as to where they’re suppose to be placed? It won’t even give me the options to align them myself. I have been successful with Stuarts files so I know that I’m capable of completing this task.
Edit few minutes later… So I redownloaded the CPL file and it seems to work. But now I’m seeing a lot of placement corrections that have to be made. So a Warning to all using the files on JLCPCB, You must make corrections to the alignment and rotations of the components

So I have built one using JLCPCB. Added all the components. I’m about ready to program. I just want to check on a few things before moving forward. I have a sketch of the pinouts I need looked at as I can’t seem to find one in the files. I also would like to know if the ADS1115 needs to be programmed or if it is ready to go out of the box? Thank you much for taking the time to produce this project and sharing it.

Here Is a picture of my mostly completed shunt

1 Like

Wondering if you ever figured out how to program and could share? I’m stuck now at the same part, even after going to Stuart’s shunt page I still find it unclear on how to program the code to ATTINY1614. Not being familiar with VS and Platform IO doesn’t help either, trying to use a Nano to program using UPDI, lots of learning to do I guess.

1 Like

Hello Andrew, I have also question aver this shunt can we talk and you can help me and I can help you. Pleas write me on email [email protected]
Many Thanks

1 Like

Hello guys,
sorry I did not see your messages, the spam filter swallowed all the notification emails.

@Andrew_Bowden the programming is done using a standard UPDI interface using the J8 header.

Patrick

1 Like

There’s one important hardware modification I did post-production to help with simplifying the code as described here: diyBMS_CurrentVoltage_ADS1115/code/src/ads1115.cpp at main · pprasse/diyBMS_CurrentVoltage_ADS1115 · GitHub

I put a 10k 10 turn potentiometer between Vcc - AIN3 - GND plus a 100n and 1uf cap close to AIN3 like so:

           10k 10 turn
Vcc ---- [    ] ---* GND
           ^       |
           |       |
           * --||--*       1uF
           * --||--|       100nF
           |
          AIN3

The pot is tuned so that the current output for zero current is zero.
This simplified writing the code as the ACS758ECB (bidirectional!) outputs the voltage Vcc/2 on zero current.
Therefore you tune the output of the potentiometer so that if the current of the ACS758 is zero, the Voltage AIN2-AIN3 is zero, or in other terms so that AIN3 is also Vcc/2.

1 Like

Thanks for getting back to us!
I’m totally confused however from your reply. Everywhere I look programing via UPDI on the ATTiny1614 uses pins 1,10,14 and the J8 header uses pins 14, 13, 2 (on ATTiny1614).
However, J2 header has the ATTIny1614 pins 1, 10 (with 470ohm resistor), 14

I have tried using the J2 header pins 1 (attiny pin1), 2 (attiny pin10), 3 (attiny pin14), with no luck
on programming, I try then after to power it up. Meaning no lights light up on the board. But as I’m new to programming, new to coding, new to the programs used to program, etc., I could very well be doing something wrong in the chain.

If in fact J8 is used like you said can you give an example of wire schematic with a programmer?

Andrew

Update to J3 need to also be made. I had JLCPCB contact me when I put through my order. The holes on the board were not large enough to fit the pins for the terminal block. And or a new plug connector/terminal block needs to be addressed in the BOM file.

Also:
Pertaining to the updated BOM for V2 of hardware, I’m seeing C17 (“C” usually designates a capacitor) and has a resister as the item to use in the list. This is a bit confusing, Was this done on purpose? You also added a schematic

               10k 10 turn
    Vcc ---- [    ] ---* GND
               ^       |
               |       |
               * --//--*       1uF
               * --//--/       100nF
               |
              AIN3

where it shows a 10k potentiometer with two different capacitors.

Andrew

Hello Patrick,

I have started building a diy battery unit for the Growatt SPH 10000 high voltage system together with the DIY bms system from Stuart.
The controller and modules work but now I still have some challenges.
These are the shunt and the canbus protocol.
Now I have seen that within the DIY_BMS software from Stuart a Pylonforce_canbus module is included that was written by you.
I also find the Shunt that is discussed in this topic interesting.
My question is whether all this is already operational and with which inverter did you make it?

I would like it if I could take another step forward with this.
Thanks in advance

Leodien.

Hi Andrew,

I read the above post and was wondering if you already have an assembled print, and if it works?

Leodien