Skip to content

Commit f9938f6

Browse files
committed
@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.
1 parent 2542d8c commit f9938f6

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

hw/hank/noctigon-dm11/boost/anduril.h

+4-2
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,12 @@
3131
#define MIN_THERM_STEPDOWN 50
3232
#define DEFAULT_LEVEL 70
3333
#define MAX_1x7135 150
34-
// always run at 1/4th speed, because 4 kHz PWM is enough for this circuit
34+
// moon at 1/4th speed for max runtime
35+
// the rest at half speed, to reduce ripple
36+
// but not full speed because 8 kHz PWM is enough for this circuit
3537
// and speed changes make a big visible bump
3638
#define HALFSPEED_LEVEL 255
37-
#define QUARTERSPEED_LEVEL 255
39+
#define QUARTERSPEED_LEVEL 2
3840

3941
#define RAMP_SMOOTH_FLOOR 1 // low levels may be unreliable
4042
#define RAMP_SMOOTH_CEIL 130

hw/hank/noctigon-k1/boost/anduril.h

+4-2
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,12 @@
4141
#define MIN_THERM_STEPDOWN 50
4242
#define DEFAULT_LEVEL 70
4343
#define MAX_1x7135 150
44-
// always run at 1/4th speed, because 4 kHz PWM is enough for this circuit
44+
// moon at 1/4th speed for max runtime
45+
// the rest at half speed, to reduce ripple
46+
// but not full speed because 8 kHz PWM is enough for this circuit
4547
// and speed changes make a big visible bump
4648
#define HALFSPEED_LEVEL 255
47-
#define QUARTERSPEED_LEVEL 255
49+
#define QUARTERSPEED_LEVEL 2
4850

4951
#define RAMP_SMOOTH_FLOOR 1
5052
#define RAMP_SMOOTH_CEIL 130

0 commit comments

Comments
 (0)