Archive for the ‘Circuits’ Category

Protected Digital Input

No Comments »

This is a follow-up to the protected analog input post showing you how to implement protected digital input with noise filtering and debouncing. It can be used for interfacing remote switches and pushbuttons to your device with overvoltage protection up to 30V.

Everything that was said for the analog input is still valid here. So much that the actual circuits are almost identical with the difference being mainly the final stage. Schmitt-trigger NAND gate was used to shape-up the input signal into a clean square wave output and the RC low-pass filter (R1/C1) is here to filter out noise and debounce switch contacts. Second schmitt-trigger gate was used to invert the inverted signal (invertception?!) thus restoring the logic state present on the input. It can be removed but I had two unused gates and I just had to use them.

So, without further delays, here is the schematic:
Protected digital input schematic

Transient and overvoltage protection is identical to the analog input’s circuit. TVS diode for transient and a Zener diode for long-term overvoltage conditions. If you compare the two schematics you will probably notice that the value of pull-down resistor has been increased to 100k. This forms a voltage divider that scales the input voltage down to approximately 90% of its value. Assuming a minimum 5V input signal, this leaves 4.5V at the gate’s input while the positive-going threshold voltage is around 3.5V for the CD4093 IC when powered from a 5V supply. This translates to a typical value of 70% of the supply voltage and we have 90% available. Well above the threshold.
Read the rest of this entry »

Protected Analog Input

No Comments »

During the development of one light controller (more on this later) I had a requirement for two analog inputs that would allow connection of external LDRs to enable operation only in low light conditions. Normally you would just use a basic voltage divider with an LDR going to supply voltage and feed the output directly to an ADC. But since this particular LDR was supposed to be connected via long cable I wanted to have a robust analog input that would survive any transients and/or crazy connections that might occur during installation and normal operation.

Basic analog input schematic

This is not it. This is the basic circuit that will be used as a starting point: a voltage divider with a non-inverting unity gain amplifier as an input buffer. It works as a universal 0-5V analog input and can be easily expanded to 0-10V using a different value for resistor R2 (see notes below). Another advantage of R2 is that it provides a known reference when nothing is connected to the input so you can also detect broken wire conditions for resistive sensors.
Read the rest of this entry »

  • 2014: Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
  • 2013: Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
  • 2010: Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec