By reviewing some of the design proposals I find that we need to differentiate between high pressure air sources from tanks or compressors and low pressure air which should be submitted to the patient. While we can use solenoids on the high pressure side, the opening (orifice) would be too small to supply enough air on the low pressure side. For the low pressure side we will require something like the ping pong valve in snorkel masks.
I would consider a storage tank like a plastic 5 gallon water tank. One small and one larger hose are fed through the lid. We can feed high pressure air or oxygen through the small hose via a solenoid to keep the tank very slightly over atmospheric pressure and get breathable air through the large hose and a custom made ping pong valve (which could be activated by a small stepper motor (from a printer)). The small size stepper cost around $4.- and together with a stepper driver cost less than solenoid magnets.
Each time the patient breathe through the storage tank, the air will be replenished from the high pressure side at the breath out phase.