You have an electronic device that needs 5v to operate. You have a nine (9) v supply. The circuit below has been suggested.
What you we need to have is the following.
A voltage that is five (5) volts The voltage does not vary by more than plus or minus 0.2 v from 5 v. Can provide 50 ma. Is as efficient as possible.