joet
New Member
Posts: 3
|
Post by joet on Aug 7, 2022 12:41:30 GMT -8
I would like to have 2 channels read 4-20ma and 1 channel read 12v. I am getting good results with values around 7.5ohm for the 4-20ma. I don't see where in the library to assign a shunt resistor value for each channel. Thanks for your help.
|
|
|
Post by SDL on Aug 8, 2022 9:56:16 GMT -8
From: github.com/switchdoclabs/SDL_Pi_INA3221#/*=========================================================================*/
SHUNT_RESISTOR_VALUE = (0.1) # default shunt resistor value of 0.1 Ohm
BP
|
|
joet
New Member
Posts: 3
|
Post by joet on Aug 8, 2022 13:26:04 GMT -8
Won't that be the same for all channels? How do I assign a different shunt resistor value for each channel? I would like chan 1 and 2 to a 7.5ohm shunt and chan 3 to have the .1ohm shunt.
Thanks
|
|
|
Post by SDL on Aug 9, 2022 16:38:35 GMT -8
You would have to modify the software to assign a different shunt resistor to each channel. Look through the Python and see where SHUNT_RESISTOR_VALUE is used.
BP
|
|
joet
New Member
Posts: 3
|
Post by joet on Aug 11, 2022 14:01:12 GMT -8
OK, I was hoping I was missing something. I have found other libs the give separate shunt values. I'm using the arduino lib and I'll see what I can do.
Thanks
|
|