When I set up a sump/refug, my LFS sold me an overflow box similiar to the one above. It really was the best $80 spent. First because it is adjustible on water level and secondly because the hassel of building my own.
When the return pump was just a powerhead, bubbles collected at the high point of the u tube. So each week I had to suck the bubbles out. Once the bubbles accumulated to the point where the syphon broke and the tank overflowed. When I added a mag 5 for a return pump, the water flow through the u tube was fast enough the bubbles were moved completely through the tube and have never collected.
I have also added an airline
[hr]
/valve to the top of the u tube. Opening the valve breaks the syphon when I turn off the pump for sump maintenance. I can later use airline tubing to suck out the u tube air to reestablish the syphon. Then close the vavle.