It's what I designed it to do. The only way air bubbles get created is if the surge tube is ever exposed to air.
The pipe in the surge container is always submerged since I end the surge before it's exposed to air. The bottom of the pipe is submerged - there's even a trickle of water constantly running in the pipes because my DIY valve is leaky (they only cost like $70 each compared to the pool pump guys at $450).
The clear pipe in the video is to see for myself and prove it to the community that the pipe is constantly primed.
So there's no trick to it. It must be an active system (Apex + actuators) or a smarter passive device that closes the valve before the pipe is exposed to air.
I personally wanted an active system since I have two outlets and I wanted to introduce an occasional dual surge on purpose. In the Apex, I created two pulse events that occasionally criss-cross due to a slight period offset. Then I use a water sensor at the top of the surge container to only trigger when it's full. This allows my filling pump's output to introduce another variable in the surge frequency. I use a DC pump so I can vary that too- but don't usually do.
Just in case, I have a bottom level sensor in the surge tank. If it's off, the the surge tank is close to the surge pipe inlet level. This overrides any operation and stops any surge until this event clears. Why have a bottom sensor if only a full tank (top sensor on) allows a surge?... Because any kind of fault event can happen (power out, maintenance, leak, etc...) could happen and this ensures that the valves close when it wakes up.
I also have a passive overflow pipe in case the actives go nuts ... Computers do fail. This allows the water to flow safely down without flooding- but with a lot of bubbles.
I have one more sensor near the top of the DT max height. In case it gets triggered (overflow obstruction??), it overrides and shuts the valves.
It's not complicated now that it's done:
Two pipes and two linear actuators connected to my DIY valves
One emergency overflow pipe
Two sensors in the surge tank (high and low)
One sensor at the top of the DT
One actuator box with a DC input source.
... And of course the Apex with its ability to take multiple inputs and programmability to respond to them. Calibrating the hardware and the code was the tricky part, but I'm open to sharing that too - different systems will need their own tweaking.
Patent Pending - LOL.. No, I'm an open source kinda guy- just give me the credit.