aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorSelene ToyKeeper2023-11-04 11:39:05 -0600
committerSelene ToyKeeper2023-11-04 11:39:05 -0600
commitf9938f60e6210872592da9a851c8339a3cf258e7 (patch)
tree70d7d4728382e4bec88848050deac3df9a848f1f /hw
parent@hank-*-boost: fixed flicker while holding button at moon (diff)
downloadanduril-f9938f60e6210872592da9a851c8339a3cf258e7.tar.gz
anduril-f9938f60e6210872592da9a851c8339a3cf258e7.tar.bz2
anduril-f9938f60e6210872592da9a851c8339a3cf258e7.zip
@hank-*-boost: reduced ripple on low modes
by raising MCU clock speed to half at levels 2+ instead of the previous value of 1/4th speed I tried full speed too, which makes ripple much smaller and faster... but it also causes a big jump in brightness between levels 1 and 2. My lux meter shows ~350 at 1/150 or ~500 at 2/150, but at half speed it's ~650 at 2/150, and at full speed it's ~1100 at 2/150. So I went for a happy medium to balance ripple, brightness, and runtime.
Diffstat (limited to '')
-rw-r--r--hw/hank/noctigon-dm11/boost/anduril.h6
-rw-r--r--hw/hank/noctigon-k1/boost/anduril.h6
2 files changed, 8 insertions, 4 deletions
diff --git a/hw/hank/noctigon-dm11/boost/anduril.h b/hw/hank/noctigon-dm11/boost/anduril.h
index a12c158..0d7b25f 100644
--- a/hw/hank/noctigon-dm11/boost/anduril.h
+++ b/hw/hank/noctigon-dm11/boost/anduril.h
@@ -31,10 +31,12 @@
#define MIN_THERM_STEPDOWN 50
#define DEFAULT_LEVEL 70
#define MAX_1x7135 150
-// always run at 1/4th speed, because 4 kHz PWM is enough for this circuit
+// moon at 1/4th speed for max runtime
+// the rest at half speed, to reduce ripple
+// but not full speed because 8 kHz PWM is enough for this circuit
// and speed changes make a big visible bump
#define HALFSPEED_LEVEL 255
-#define QUARTERSPEED_LEVEL 255
+#define QUARTERSPEED_LEVEL 2
#define RAMP_SMOOTH_FLOOR 1 // low levels may be unreliable
#define RAMP_SMOOTH_CEIL 130
diff --git a/hw/hank/noctigon-k1/boost/anduril.h b/hw/hank/noctigon-k1/boost/anduril.h
index cfbab16..4ea1127 100644
--- a/hw/hank/noctigon-k1/boost/anduril.h
+++ b/hw/hank/noctigon-k1/boost/anduril.h
@@ -41,10 +41,12 @@
#define MIN_THERM_STEPDOWN 50
#define DEFAULT_LEVEL 70
#define MAX_1x7135 150
-// always run at 1/4th speed, because 4 kHz PWM is enough for this circuit
+// moon at 1/4th speed for max runtime
+// the rest at half speed, to reduce ripple
+// but not full speed because 8 kHz PWM is enough for this circuit
// and speed changes make a big visible bump
#define HALFSPEED_LEVEL 255
-#define QUARTERSPEED_LEVEL 255
+#define QUARTERSPEED_LEVEL 2
#define RAMP_SMOOTH_FLOOR 1
#define RAMP_SMOOTH_CEIL 130