Square wave voltage source