adafruit / Adafruit_CircuitPython_INA260

CircuitPython driver for the TI INA260 current and power sensor
MIT License
14 stars 11 forks source link

using INA260 with Rpi zero #17

Closed MettaUK closed 3 years ago

MettaUK commented 3 years ago

Not sure how to word this. Im trying to read volts/amps using 12v DC brick and a lamp or a dc motor and I am getting odd results and not 12v etc from the basic code example. running the code... :~ $ python3 ina60.py Current: 0.00 mA Voltage: 0.00 V Power:0.00 mW Current: 0.00 mA Voltage: 1.04 V Power:0.00 mW Current: 0.00 mA Voltage: 0.17 V Power:0.00 mW Current: -2.50 mA Voltage: 0.00 V Power:0.00 mW Current: 0.00 mA Voltage: 0.00 V Power:0.00 mW Current: 17.50 mA Voltage: 0.14 V Power:10.00 mW Current: 48.75 mA Voltage: 1.02 V Power:40.00 mW Current: 22.50 mA Voltage: 2.22 V Power:10.00 mW Current: 25.00 mA Voltage: 0.02 V Power:10.00 mW Current: 30.00 mA Voltage: 1.13 V Power:30.00 mW Current: 40.00 mA Voltage: 0.84 V Power:10.00 mW Current: 43.75 mA Voltage: 0.29 V Power:10.00 mW Current: 38.75 mA Voltage: 0.35 V Power:30.00 mW Current: 41.25 mA Voltage: 0.43 V Power:40.00 mW Current: 27.50 mA Voltage: 2.44 V Power:10.00 mW Current: 41.25 mA Voltage: 0.02 V Power:10.00 mW Current: 36.25 mA Voltage: 0.69 V Power:10.00 mW Current: 30.00 mA Voltage: 0.17 V Power:10.00 mW Current: -2.50 mA Voltage: 0.00 V Power:0.00 mW Current: -1.25 mA Voltage: 0.37 V Power:0.00 mW Current: -1.25 mA Voltage: 0.01 V Power:0.00 mW Current: 1.25 mA Voltage: 0.00 V Power:0.00 mW Current: -1.25 mA Voltage: 0.73 V Power:0.00 mW Current: 0.00 mA Voltage: 0.00 V Power:0.00 mW ^CTraceback (most recent call last): File "ina60.py", line 15, in <module> time.sleep(1) KeyboardInterrupt Wiring as as per guidance, attached picture... SensorWiring Sorry if this is the wrong place for help but I'm stuck.

tannewt commented 3 years ago

Please post to the support forum: https://forums.adafruit.com/viewforum.php?f=60