Level bar and audible alarm
6 parts
A 0–9 V triangle sweep drives two indicators at once. The 8-LED bar is a behavioural display: it senses the voltage across its own 1 MΩ input resistance — a real load, drawing up to 9.0 µA here — and lights k of 8 segments at even thresholds between its first-segment and all-lit settings, so one sweep walks through all nine states from 0 to 8. The buzzer is an ordinary 100 Ω resistor whose Web Audio tone is gated by the power it genuinely dissipates, so it sounds only while the comparator above it is high; the series diode is what makes that true, because the comparator's −13 V low state would otherwise dissipate exactly as much power and buzz continuously. That comparator is an op-amp macromodel with no supply pins — its ±13 V swing is a parameter, not a rail, and its output current is not limited.
- V1 4.5V·500Hz
- BAR81 1MΩ
- V2 6V
- OP1
- D1
- BUZ1 100Ω