An electrochemical method using pulsed alternating current etching (PACE) to produce atomically sharp scanning tunneling microscopy (STM) tips is presented. An Arduino Uno microcontroller was used to control the number and duration of the alternating current (AC) pulses, allowing for ready optimization of the procedures for both Pt:Ir and W tips using a single apparatus. W tips prepared using constant and pulsed AC power were compared. Tips fashioned using PACE were sharper than those etched with continuous AC power alone. Pt:Ir tips were prepared with an initial coarse etching stage using continuous AC power followed by fine etching using PACE. The number and potential of the finishing AC pulses was varied and scanning electron microscope imaging was used to compare the results. Finally, tip quality using the optimized procedures was verified by UHV-STM imaging. With PACE, at least 70% of the W tips and 80% of the Pt:Ir tips were of sufficiently high quality to obtain atomically resolved images of HOPG or Ni(111).