E-005 — Voltage selection logic — rotary switch vs DIP switches vs pushbutton cycle concept
Created by demo · 2026-06-24
Details
Hypothesis
The user needs to select one of 7 output voltages (9/12/15/20/24/48/56 V). Since there is no MCU, the selection mechanism must be purely hardware. A multi-position switch drives the 74HC logic that sets the feedback divider ratio.
Alternatives considered
Option A — 8-position rotary switch (preferred) One knob, one pole, 8 positions (7 voltages + off). Direct mechanical encoding.
- Pros: intuitive, single-action selection, no debounce needed for DC logic; 8-position rotary switches are standard (Bourns PRS series, Elma 04 series); maps exactly onto a 74HC138 3-to-8 decoder (8 outputs) with no wasted or undefined states
- Cons: footprint larger than pushbutton
Option B — 4-bit DIP switch bank 4 DIP switches encode 0–15 in binary; only the used states are decoded. 74HC138 decoder maps to the output enables.
- Pros: very common, cheap, no moving parts to wear
- Cons: not intuitive (user must look up binary encoding); can set undefined states; not suited for frequent voltage changes
Option C — Pushbutton cycle (momentary) Single pushbutton steps through voltages in sequence. 74HC163 4-bit counter + reset.
- Pros: minimal panel cutout, elegant
- Cons: requires counter IC, power-cycle resets to first voltage, no direct access to a specific voltage
Position budget note
The earlier concept assumed a 10-position switch for 9 voltages (5/9/12/15/20/24/48/56/60 V) + off. Reducing to an 8-position switch (7 voltages + off) requires dropping two rails. The two natural candidates are 5 V (the boost topology cannot step the USB-C PD input down to 5 V — see open questions) and 60 V (requires LM5156 and output-capacitor voltage ratings plus OVP headroom of ~65 V that is hard to guarantee on a single-stage boost). The remaining 7 rails (9/12/15/20/24/48/56 V) match the project's stated user-selectable set and map exactly onto the 74HC138 3-to-8 decoder.
System block diagram (7 rails + off via 74HC138)
graph LR
SW["8-pos<br/>rotary switch"] --> DEC["74HC138<br/>decoder"]
DEC --> R1["R-divider<br/>9 V"]
DEC --> R2["R-divider<br/>12 V"]
DEC --> R3["R-divider<br/>15 V"]
DEC --> R4["R-divider<br/>20 V"]
DEC --> R5["R-divider<br/>24 V"]
DEC --> R6["R-divider<br/>48 V"]
DEC --> R7["R-divider<br/>56 V"]
R1 & R2 & R3 & R4 & R5 & R6 & R7 --> FB["LM5156<br/>FB pin"]
Open questions
- What is the panel cutout standard for an 8-position rotary? Does it fit the planned enclosure depth?
- Should position 0 (off) cut EN or just set Vout to minimum? Cutting EN is cleaner.
- Do we need a pull-up on the rotary switch outputs to avoid floating inputs during mechanical transition?
- Confirm that dropping the 5 V and 60 V rails to fit the 8-position selector is acceptable, or whether a different pair should be removed instead.
Next step
daniel@esharp.se to confirm enclosure panel depth, 8-position rotary switch body length, and sign off on dropping the 5 V and 60 V rails to fit the 8-position selector.