mstrens / oXs_on_RP2040

version of openXsensor to be used on raspberry pi pico RP2040 (more protocols, more functionalities)
83 stars 22 forks source link

oXs_RP2040 with ACS724 Current Sensor at ADS1115 A0 #120

Closed Satcomix closed 6 months ago

Satcomix commented 6 months ago

Edit: I just found the error myself: (minus)-66120

Hello Mstrens, First of all, I wish you a Happy New Year. I have an ACS724 50A connected to an ADS1115 at port A0. Works great at 3.3Volt I get at 0mA = 1653mV, 1000mA = 1678mV, 2000mA = 1703mV etc. =25mV/A The setting is ADS1 A0 to GND, MV4096, MS5, Aver. 10 Calculation: Scale=2000/(1703-1653)=40 Offset= -1653x40 =66120 Terminal: ADS1 Scale: 40, Offset: 66120 0mA = Ads 1 1 = 132251 mVolt 1000mA = Ads 1 1 = 133248 mVolt 2000mA = Ads 1 1 = 134232 mVolt Delta = 997mV at 1000mA to 0 mA Delta = 984mV at 2000mA to 1000mA Do I have to include the range of 4096mV and the Vcc of 3300mV in the calculation? What am I doing wrong? greetings, Torsten

Satcomix commented 6 months ago

Hello Mstrens, I noticed something regarding RP2040 ADC and ADS1115. If I use the formula (.xlsx file) to calculate the scale and offset for an input, I have to enter the OFFSET positive with the RP2040 ADC GPio 26 to 29 and at the same time enter this calculated OFFSET negative (minus value) when using an ADS1115. greetings, Torsten