Isolated high voltage & isolated current shunt based on ADS1115

I have a board all together but I need help with the programing. If you read the post above with Patrick I have conflicting information. But beyond that, The programing side is all new to me so I need a step by step tutorial or alike to get me where I should be

Andrew,

I think there is no working example when I see the whole sequence.
Patrick has little to no time I think.
the variable resistor that has been added cannot be found on the print layout.
Platformio is a nice and good tool but Patrick’s software also gives several errors, too bad.
All this does not inspire much confidence.
Too bad for Stuart’s robust project.
Have you installed Code_vs and Platformio yet?

Leodien

Leodien,

I have Platformio and the third party tool for uploading the code, I also have loaded the sketch onto an Arduino nano to use this as a programmer, I setup platformio to use the nano in the correct order to program with, etc. I have watched a ton of Youtube videos and read a ton of websites but still I can’t figure out how. There are too many steps involved for someone like myself to load code onto a chip.
I know how to program an Arduino, I know how to program cars/vehicles with manufactures equipment, but this is just outside my knowledge.
I’m just not sure where and/or what I’m doing wrong


Andrew

Andrew,

Then it will indeed be a challenge.
The easiest way is if Patrick would post a compiled version on GTIhub.
Otherwise it will be a learning curve.

Leodien

hi,

while compiling the software code I get the following error:|

TypeError: ‘NoneType’ object is not subscriptable: File “/home/gerard-giga/.platformio/penv/lib/python3.12/site-packages/platformio/builder/main.py”, line 167: env.SConscript(env.GetExtraScripts(“pre”), exports=“env”) File “/home/gerard-giga/.platformio/packages/tool-scons/scons-local-4.8 .1/SCons/Script/SConscript.py”, line 620: return _SConscript(self.fs, *files, **subst_kw) File “/home/gerard-giga/.platformio/packages/tool-scons/scons-local-4.8.1/SCons/Script/SConscript.py”, line 280: exec(compile(scriptdata, scriptname, ‘exec’), call_stack[-1].globals) File “/home/gerard-giga/Software-hardware/Software/BMS/DIY High Voltage Shunt (PPrasse)/diyBMS_CurrentVoltage_ADS1115-main/code/buildscript_versioning.py”, line 31: env.Append(git_sha_short=git_sha[32:])

does anyone have a tip?

I had the same problem, I solved it by modifying these lines in the buildscript_versioning.py file
image
image
Also adding a library to the platformio.ini file.
image

Thank you,

Unfortunately I now get the following message:

NameError: name ‘git_datetime’ is not defined:
File “/home/gerard-giga/.platformio/penv/lib/python3.12/site-packages/platformio/builder/main.py”, line 167:
env.SConscript(env.GetExtraScripts(“pre”), exports=“env”)
File “/home/gerard-giga/.platformio/packages/tool-scons/scons-local-4.8.1/SCons/Script/SConscript.py”, line 620:
return SConscript(self.fs, *files, **subst_kw)
File “/home/gerard-giga/.platformio/packages/tool-scons/scons-local-4.8.1/SCons/Script/SConscript.py”, line 280: exec(compile(scriptdata, scriptname, ‘exec’), call_stack[-1].globals) File "/home/gerard-giga/Software-hardware/Software/BMS/DIY_High_Voltage_Shunt
(PPrasse)/diyBMS_CurrentVoltage_ADS1115-main/code/buildscript_versioning.py", line 77: )

hi Andrew,

did you find a solution yet?

PS,

how many cells do you use?

Leodien.

Hello,
It shows you an error on line 77 of the buildscript_versioning.py file

Hello,
With platformio you cannot record the chip. I use the AVRDUDESS program to save the .hex file generated by platformio.

I have not been able to get it to work as I do not have enough knowledge to code and upload the firmware, etc
 The problems that I’m reading you guys are having are things that I wouldn’t even know are problems. This is really way over my head and would need to do a lot of research and trial and error, unless I had someone show me how to do it or had a really good write up on how to do the process. To add, I haven’t had much time to play with it. I also need other little tid bits
 and also need to get my DIY BMS and DIY balance boards finalized and all of them programed and so on


I’ll be running 36S LFP cells, down the road I may be changing my inverter setup and will be going up to 108S LFP cells.

Best, Andrew

Ruben, Perhaps next weekend I’ll pull up the sleeves and dust off the boards and give it another go. I appreciate any help you all are giving.

Thank You, Andrew

Hi, I’m using Patrick’s latest design, but with a modified PCB. The modification consists of removing some connectors and reducing the voltage of the voltage divider. In the potentiometer adjustment, to zero the amperage measurement, I’ve had problems to adjust it to zero. I’ve had to add resistors to the potentiometer in order to reduce its adjustment range. Making it easier to adjust to zero, but there is a small instability of ± 0.1-0.2A, I think it’s due to the instability of the power input. I’m working on a new design adding a DC regulator to Patrick’s design, just like Stuart’s design, in his current monitor.


1 Like

Hello Rubén?

Hi Ruben?

I have a few questions:

Regarding Patrick’s software:
Can you send a hex file of the current monitor?

Regarding Stuart’s software:
Which line of which module did you add the V_bus divider to?

Did you also apply the divider to the Power readout of the INA229:

Thanks in advance and kind regards
Leodien.

Leodien.

Hi Rubén,

It would be nice if you could also place your modified version of the current monitor software on Github.

I have now found your modifications regarding the espcontroller.
I think it is adjustable via the web interface.

Greetings Leodien.

Hello,
This is the hex for Patrick’s current monitor
diyBMS_CurrentVoltage_ADS1115_ATtiny1614.hex (36.8 KB)
The github repository is unfinished and untested.

Thanks!

Hello,
Patrick’s current monitor is not as accurate as Stuart’s. I did a small one-day test and this is the result.
Ignore the polarity of the current, simply place the monitor opposite the current flow.


Comparison of currents.