I have two signal lines that I will be monitoring with an MCU Input I/O pin (3.3v powered). Both inputs will be coming from external sources. I will be monitoring each of them for a high or low state. The problem is that the signal coming in could be between 0v and 24v, and the signals coming in "may" be serial data (approx 9600 baud).
Below is using something like the BAT54SWT1G Schotch Diode Array to clamp voltages at 0v and 3v.
EDIT: Updated schematic with a current limiting resistor before the clamping diodes.
simulate this circuit – Schematic created using CircuitLab
Schematic was redrawn in conventional orientation by Transistor
Answer
Input signal source resistance is not specified. The clamping diode current flow could be excessive.
You might consider adding a pull-down resistor (or a pull-up resistor) so that the MCU I/O line falls to a known-state when no input signal is connected.
The V1 voltage should be the MCU Vdd power supply.
simulate this circuit – Schematic created using CircuitLab
No comments:
Post a Comment