Diodes for power generation and welding