# Best way to ensure signal does not exceed 5v?

• posted

I'm the "software guy" but am trying to help out on the hardware side for a small project we have going on. It's fun, I like to learn new stuff. I'm currently working on a circuit that is connected to a piece of data acquisition hardware that provides 8 digital bits (1 port) and these 8 bits are wired up to a set of decoder ICs. Great, that all works fine. The problem is that I need ONE MORE digital bit to control a SSR - but I don't have any more available digital pins so I'm going to use one of the analog outputs on the DAQ hardware.

OK, finally my question: The analog out can be software controlled to output 0 - 10v. If I connect this straight to a logic pins this means that if someone screws up (people always do) they could fry things by accidentally sending 10v to a part that is expecting a maximum of 5v. I would like to add a little circuitry to cap the analog line at a max of 5v. I have NO IDEA how to do this and was hoping someone here could suggest a simple solution to cap a signal at a max of 5v.

-Steve

• posted

"SklettTheNewb"

** OK,

make the analog output 10 volts and then reduce this to 5 with two equal value resistors in series.

The mid point voltage will be half the value across the pair.

Aka - a voltage divider.

Two 2.2 kohm resistors might be about right.

..... Phil

• posted

s

al

Thanks Phil. Although that suggestion would work ( I could also use a basic voltage regulator, right?) it could result in undefined results if the user does the RIGHT thing and sets the DAC to 5v. So maybe my question should be: How can I cap a 5-10v signal to 5v?

• posted

I assume that you have access to the 5V supply used by the logic you are driving. In that case, the analog output could drive a series resistor (in the 1-10K range) that drives the logic gate. From the junction of the resistor and the logic input, run an ordinary signal diode to +5V. The "arrow" of the diode should point to +5. Now if the analog input ever goes above +5, the diode will clamp the logic side of the resistor to +5.

Note that the resistor is not part of a voltage divider here. When the analog voltage is below 5V, the current that flows through the resistor will be low, determined by the effective input resistance of the logic (which is very high for CMOS gates). So the resistor will not be dropping any significant voltage. When the analog output is over 5V, the current is determined by the difference with +5: At analog

+10, there will be 5V across the resistor. If the resistor is (say) 10K, then the current delivered by the analog output will be 5/10K = 0.5 mA, which presumably it can handle with ease.

Best regards,

Bob Masta DAQARTA v6.02 Data AcQuisition And Real-Time Analysis

Scope, Spectrum, Spectrogram, Sound Level Meter Frequency Counter, FREE Signal Generator Pitch Track, Pitch-to-MIDI Science with your sound card!

• posted

One common way is with a "clamp." Your signal voltage has to have some series resistance intrinsic to it, or supplied by you, so an over voltage condition doesn't fry the source of the signal.

Common practice on very high input impedance devices is to just add a

10K in series (that could also be your divider value - so no extra resistor needed) then you put a clamping diode that shunts any XS voltage into the + power supply.

Signal voltage goes to 5 volts, nothing happens. Signal tries to creep over 5 and the diode conducts and limits it to whatever the DAC supply voltage is (presumably 5+ for this application) - Plus the voltage drop of the diode.

This scheme is used on plus and minus inputs on op amps and similar voltage sensitive inputs with diodes to both supply rails. Many PICs ADCs, Op amps, and the like, already contain built in protection diodes - in that case, no worries providing your XS voltage is current limited with a resistor.

OR just put a tested and verified 5.1 volt zener diode to clamp the input voltage,

In any case, you do need some resistance to limit current. Connecting a 12 volt car battery to a clamp with no resistance will just fry the clamping diode then fry the thing you were trying to protect.

• posted

w
,

it

o

ans

x

qual

-

Oh you just have to define the 'RIGHT' thing as a ouputing 10V volts into the voltage divider. The wrong thing is a 5 Volt output, but now this doens't break anything.

It's hard to beat the two resistor solution.

George H.

• posted

```--
View with a fixed-pitch font:

DAQ```
• posted

Oh, that's good. A \$6 solution where a \$.004 solution is better and smaller.

• posted

A 5.1 volt zener diode to ground should do it. The analog output is almost surely current limited.

John

• posted

Define the "right" thing as setting the DAC to full range.

Or use a comparator, use a 33k resistor off of the DAC, a 10k to ground, and an LM339 (powered from 5V) set up with a threshold of 2.5V. Then you'll always get a clean signal.

But a voltage divider like Phil suggested, plus maybe a yardstick, is easiest.

(The yardstick is to whack folks upside the head when they feed the wrong number to the DAC).

```--
www.wescottdesign.com```
• posted

All the suggestions so far, or a transistor with built-in bias and a resistor (like this one:

. Emitter to ground, base to the DAC, collector to a 10k resistor to +5V. Take your output off of the transistor collector. It'll invert, but that's OK -- software is supposed to fix things like that.

Note that all of the suggestions so far are to some extent kinda slow -- if really snappy action is necessary (and you can somehow get it out of the DAC), then point this out. Ditto if you have any current requirements more than a few mA.

```--
www.wescottdesign.com```
• posted

ce

ol

o
s

DAC,

a germanium diode clamp to 5v is better than silicon diode clamp.

• posted

Until your production line stalls because you can't find parts.

```--
www.wescottdesign.com```
• posted

Use a Schottky, then.

• posted

There are CMOS gates that tolerate 0-10V input and can be powered from 5V; the venerable CD4050 is a CMOS hex noninverting buffer of this type that is old enough to have teenage kids. There are undoubtedly one-gate versions, too.

• posted

```--
Mea Culpa.

Actually less than a US dollar, but what have you got that's less than```
• posted

10 V + | | | 1k + ___ |/ IN -|___|----+----| | |> OUT | +-----------+ + | \ o \ Jumper Select \. o | | .-. | | | | 1k '-' | === GND (created by AACircuit v1.28.6 beta 04/19/05

I Like this idea better.

Jamie

• posted

"Tim Wescott"

** A two resistor divider need not be slow. A small value cap across the top resistor to balance any stray capacitance loading the mid point will remove any delay.

.... Phil

• posted

The exact answer to this (or whether you even need a solution, for that matter) depends on what kind of device you are driving.

For instance, if you're driving a TTL input, you need to be able to handle current coming from the input when you drive it low. Can the analog output do that?

Also, what kind of impedance does the output require from the next device? Is it a fairly powerful driver that can source current, or does it require pure low-current voltage bridging?

The voltage level is not the only problem. Suppose the output requires a

10 Kohm impedance (typical line impedance requirement for audio). Suppose the next device only has a hundred ohm impedance or something. You could fry your analog output, rather than the next device.

In other words, even as it is, you likely cannot simply plug "anything" into this analog output! So if your requirement is to be able to plug in anything, you may have to reinforce that output.

Another question is: will you be switching this output at a high frequency? If you vary the output very slowly, then you can consider everything just from a DC point of view (impedances, voltages, etc). If you're going to be pulsing it at a high rate, then you have an AC signal, which faces different impedances. (Almost always, lower impedances: AC will leak into places where DC cannot go.)

It may be much better for you to just know what kind of device will be hooked up and spec accordingly. If it's a high impedance device that can take 10V, you have nothing to do.

Maybe you can simply dictate this requirement to whoever will be interfacing with this, making it someone else's problem.

• posted

\$6.34 in thousands.