Thursday, 23 August 2018

microcontroller - Input Protection


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.


schematic



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.


schematic


simulate this circuit – Schematic created using CircuitLab


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...