I am trying to find a quick and simple way to convert a 12V/24V high or low signal to a 5V one.
The input will be produced by a switch which will when closed will connect to Vcc which could be either 12V or 24V and I would like to convert this to 5V.
I have attached a rough schematic to show what I mean.
Some methods I have thought of:
Use the 12V/24V to switch a transistor, however the transistors I have looked at don't want to be switched by such a high voltage and they normally have around a 6V limit (Veb).
Another method could be to just point a linear voltage regulator on the signal such as a 7805 to convert the signal to 5V regardless of it's voltage. But I feel this may be bad design.
I would have simply used a resistor voltage divider but because I don't know if it is 12V or 24V this won't work.
I am a beginner and any helpful advice will be much appreciated.
Many thanks,
Justin
The input will be produced by a switch which will when closed will connect to Vcc which could be either 12V or 24V and I would like to convert this to 5V.
I have attached a rough schematic to show what I mean.
Some methods I have thought of:
Use the 12V/24V to switch a transistor, however the transistors I have looked at don't want to be switched by such a high voltage and they normally have around a 6V limit (Veb).
Another method could be to just point a linear voltage regulator on the signal such as a 7805 to convert the signal to 5V regardless of it's voltage. But I feel this may be bad design.
I would have simply used a resistor voltage divider but because I don't know if it is 12V or 24V this won't work.
I am a beginner and any helpful advice will be much appreciated.
Many thanks,
Justin
Attachments
-
9.4 KB Views: 142