Sunday 28 August 2016

microcontroller - MCU Input Protection Comparison


I am working on creating a simple protection circuit for an I/O pin of an MCU. The input signal will be coming from an array of different devices and I will want to monitor for high/low digital values from the following input types:



  • Reed Switch (normally open) connecting to GND when closed.

  • Normally open relay/FET connecting to GND when closed.

  • 12v-24v high frequency input pulse. The signal is typical ~0v, and periodically sends a quick (5ms) pulse of between 12v and 24v (the MCU will be counting these pulses).

  • 0v and 24v signal coming from a thermostat (used to trigger HVAC systems, I will just be monitoring this line, not controlling it).

  • +5v serial signal (Rx UART) at 9600baud.



The device is 3.3v lithium battery powered, so minimal current consumption (at any input signal state) is important. Vdd is ~3v.


I am comparing two solutions. One uses Schottky diode array, and the other uses pre-biased transistors. I am curious what solution would be recommended, and what the pros/cons would be of each approach.


Diode Array


schematic


simulate this circuit – Schematic created using CircuitLab


Pre-Biased Transistors


schematic


simulate this circuit


Note: I will actually have two of these input lines, so if I use the Diode Array solution I will need to do two of those identical circuits for each input. For the Pre-Biased Transistor I modeled it using the DS30345 so the one IC would support both inputs.



See Input Protection and Solution for accepting 3-24v as digital high for microcontroller for posts about each design.




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...