Lab Theater Project required a ventilator for a show that could be unplugged, resulting in an alarm sound. The original plan was to acquire an actual ventilator, but after the shipper had issues delivering the device in time, I was asked to rush a build of one for them.
As you can see in the video, the unit is actually battery-powered, but has a fake plug with a magnetic switch built in, and the fake outlet that goes with it has a magnet mounted in it. When the plug is plugged in, the respirator goes into a "normal operation" state and the light turns green, when it is unplugged it enters an "alarm" state and after a delay begins beeping incessantly. There is a practical mute button that will silence the alarm.
The tube and tank are actual respirator spare parts, while the unit itself is made from spray-painted EVA foam. The circuitry is arduino nano-based. The LED display is not an actual seven-segment display, which comes with a lot of overhead, and it didn't need to actually change. I used WS2811 flickering lights through a black paper stencil with clear packing tape, to produce the illusion of changing values on the display, and the pixels are turned red for the alarm state. The buttons are EVA, and the mute button has a peice of copper on the bottom that is wired to a touch sensor.