Hello skian85 and Welcome,
The opto's are a good way, a perhaps simpler and cheaper way is to use a 78L05, regulator.They are in a TO92 package 3 wires.