Floating electrolytic capacitor with cathode connected
C1 will be fine. Floating is OK, it doesn't count as negative bias for electrolytic capacitors.

U1 might be damaged.  Check the datasheet for the specific 7805 from the manufacturer you plan to use for recommendations.  You may need to add a diode across it.

You may also want a capacitor on the output to improve stability and reduce noise.  Again, check the datasheet for recommendations.







simulate this circuit &ndash; Schematic created using CircuitLab