From 9c0d1832464e4ee7ee8c4c63092ac4337347483b Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Wed, 29 Jan 2020 05:08:14 -0700 Subject: rewrote ADC code to use a continuous lowpass system on all measurements, to eliminate noise and maybe increase precision (thermal code still needs to be rewritten though) --- hwdef-Emisar_D4.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hwdef-Emisar_D4.h') diff --git a/hwdef-Emisar_D4.h b/hwdef-Emisar_D4.h index be499f1..d3b6802 100644 --- a/hwdef-Emisar_D4.h +++ b/hwdef-Emisar_D4.h @@ -34,7 +34,7 @@ //#define VOLTAGE_PIN PB2 // pin 7, voltage ADC //#define ADC_CHANNEL 0x01 // MUX 01 corresponds with PB2 //#define ADC_DIDR ADC1D // Digital input disable bit corresponding with PB2 -#define ADC_PRSCL 0x06 // clk/64 +#define ADC_PRSCL 0x07 // clk/128 // average drop across diode on this hardware #ifndef VOLTAGE_FUDGE_FACTOR -- cgit v1.2.3 From f61beefe38f5118dc816d5ba28d7e41001cfe703 Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Thu, 30 Jan 2020 01:18:56 -0700 Subject: switched to a pseudo-rolling-average method to reduce noise, set prescaler back to 64 --- hwdef-Emisar_D4.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hwdef-Emisar_D4.h') diff --git a/hwdef-Emisar_D4.h b/hwdef-Emisar_D4.h index d3b6802..be499f1 100644 --- a/hwdef-Emisar_D4.h +++ b/hwdef-Emisar_D4.h @@ -34,7 +34,7 @@ //#define VOLTAGE_PIN PB2 // pin 7, voltage ADC //#define ADC_CHANNEL 0x01 // MUX 01 corresponds with PB2 //#define ADC_DIDR ADC1D // Digital input disable bit corresponding with PB2 -#define ADC_PRSCL 0x07 // clk/128 +#define ADC_PRSCL 0x06 // clk/64 // average drop across diode on this hardware #ifndef VOLTAGE_FUDGE_FACTOR -- cgit v1.2.3 From 51aae811654a3b73fa10ab449e22a11c858aa2d1 Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Fri, 13 Mar 2020 18:04:43 -0600 Subject: went back to slower clk/128 ADC timing --- hwdef-Emisar_D4.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hwdef-Emisar_D4.h') diff --git a/hwdef-Emisar_D4.h b/hwdef-Emisar_D4.h index be499f1..d3b6802 100644 --- a/hwdef-Emisar_D4.h +++ b/hwdef-Emisar_D4.h @@ -34,7 +34,7 @@ //#define VOLTAGE_PIN PB2 // pin 7, voltage ADC //#define ADC_CHANNEL 0x01 // MUX 01 corresponds with PB2 //#define ADC_DIDR ADC1D // Digital input disable bit corresponding with PB2 -#define ADC_PRSCL 0x06 // clk/64 +#define ADC_PRSCL 0x07 // clk/128 // average drop across diode on this hardware #ifndef VOLTAGE_FUDGE_FACTOR -- cgit v1.2.3