Homemade inverter - schematic
555 timer for square wave
This configuration of the 555 timer will create a perfect square wave on pin 3 with frequency that depends on the potentiometer value.