Sunday, June 12, 2011

Input Stage

Now to start going over my design in detail that I have been testing ...

Input Stage

The main input control signal is either a two wire or three wire signal accepting 4V-16V by default.

For three wire input, J2 handles one pair with the common between the two signal inputs and JP1 & JP2 are both jumpered 2-3 in order to feed each signal into the optocoupler U1. For two wire input, only pins 1 & 2 are used on J2 and JP1 & JP2 are moved to pins 1-2 to feed the signal to both optocouplers, but reversed in the second on.

By using a DC optocoupler and the jumpers the +/- voltage for a two wire is handled by different circuits without having to add anything else fancy.

The voltage input range is adjusted with the input resistors (R1-R4). The default value of 470 ohms allows enough current to flow for 4V to 16V range easily, and it can safely handle a 24V signal. If digital input over long wires is planned, these resistors can easily be lowered to 300 to 330 ohms. If ONLY digital 5V signals are planned, they can go as low as 220 ohms, but 12V signals should be avoided.

The LTV-847 optocoupler is shown as U1, but multiple LTV-817's or LTV-827's can be used. I do find it's simpler to work with a single chip, but allowing for different parts allows populating from 1 to 4 inputs as needed.

The 'Common' jumper JP3 is used to connect the common lines between the two half's of the circuit so that the second half does not require a common line to be connected. It can even be convenient to use the second common as an output to another board if desired! The reason the jumper is there instead of hard wired is that some two wire circuits reverse the +/- lines instead of using a common and a +/- voltage. If the were hardwired together you could short out the two sets of signals and maybe ruin your power supplies or worse.

One-shot or Constant?

For one signal line, JP6, C4, and R10 decide if a single pulse coming in goes to the timing stage or the actual signal. By shorting out the capacitor that actual length of the signal seen on the input is forwarded on, otherwise the capacitor changes it to a pulse no matter how long the signal is left on. Note that that optocoupler circuit with the pulse-shaper inverts the signal so that the rising edge of the input causes a falling edge into the timer as needed by the 556 timer. If no pulse shaping is ever needed, the parts can be omitted and a simple jumper installed instead.

One last option...

If the input needs to be wired directly to switches and no external voltage applied, the input resistors and U1 and be replaced by jumpers as long as you also jumper it to three wire input mode. Then a ground is applied to the common line and voltage goes out the signal lines. When you throw the switch, the signal line is grounded out and the high-to-low can be seen by the pulse shaper and to the timing stage. When wired this was, the pull-up resistors like R9 can be increased in value safely. The 1K ohm value is there to ensure a nice crisp signal from optocoupler into the pulse-shaper.

The Input Schematic

A cleaned up version of 1/2 of the input stage is show below.

No comments:

Post a Comment