From 892e50c619a75726b59de1d12cb9e33ce7f685a7 Mon Sep 17 00:00:00 2001 From: Adit Khandelwal Date: Thu, 20 Nov 2025 15:41:39 -0600 Subject: [PATCH] sensor3updates --- sensor/analogFitter-Logistic5Parameters.py | 2 +- sensor/sensorCollector.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sensor/analogFitter-Logistic5Parameters.py b/sensor/analogFitter-Logistic5Parameters.py index 57ee33f..06d17f1 100644 --- a/sensor/analogFitter-Logistic5Parameters.py +++ b/sensor/analogFitter-Logistic5Parameters.py @@ -4,7 +4,7 @@ import matplotlib.pyplot as plt from scipy.optimize import curve_fit # --- Load CSV --- -data = pd.read_csv(r'C:\Users\k28ad\OneDrive\Documents\sensor\Sensor3DataNew.csv') +data = pd.read_csv(r'C:\Users\k28ad\OneDrive\Documents\GitHub\guadaloop_lev_control\sensor\Sensor3NewAverages.csv') x = data["x"].values # Stack them into a 2D array (shape: 5 × 100) # stacked = np.column_stack((data["y"].values, data["y2"].values, data["y3"].values, data["y4"].values, data["y5"].values)) diff --git a/sensor/sensorCollector.py b/sensor/sensorCollector.py index 8feeeb4..02b6afd 100644 --- a/sensor/sensorCollector.py +++ b/sensor/sensorCollector.py @@ -47,14 +47,14 @@ class App: v = 0.2822807132259202 if (sensor == 3): - A = -13.891292062248292 - K = 990.6819962477331 - B = 0.16376045588859353 - C = -0.074904004740735 - v = 0.17727132893449118 + A = -13.8907146886418 + K = 990.6824637304771 + B = 0.16376005385006073 + C = -0.07513804021312243 + v = 0.1772655198934789 #IMPORTANT: FOR SENSOR 3, INDUCTION SENSOR OUTPUTS VOLTAGE > 6 v - #SO WE USED NEW VOLTAGE DIVIDER: 220 OHMS, 550 OHMS + #SO WE USED NEW VOLTAGE DIVIDER: 20000 OHMS, 50000 OHMS y = float(analog) #print(y) real = C - (1.0 / B) * np.log((( (K - A) / (y - A) ) ** v) - 1.0)