Best way to ensure signal does not exceed 5v?

On Sep 2, 8:52 am, Tim Wescott <t...@seemywebsite.com> wrote:
On Fri, 02 Sep 2011 01:22:32 -0700, SklettTheNewb wrote:
On Sep 2, 12:17 am, "Phil Allison" <phi...@tpg.com.au> wrote:
"SklettTheNewb"

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.

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

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?

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
Wow, I left town for a meeting and come back to an EPIC THREAD! ;0)

Lots of info here, this thing has taken on a life of it's own. After
re-evaluating my requirements against my knowledge/abilities and time
constraints I have selected the voltage divider solution:
#1 my primary goal was to avoid hardware damage - check!
#2 If myself and my team can't read code comments and follow
instructions to output 10v then I have bigger issues to worry about.

I appreciate the input from ya'll, thanks and have a good weekend.

-Steve
 
On Sep 2, 8:59 am, Tim Wescott <t...@seemywebsite.com> wrote:
On Thu, 01 Sep 2011 22:27:29 -0700, SklettTheNewb wrote:
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.

All the suggestions so far, or a transistor with built-in bias and a
resistor (like this one:http://search.digikey.com/scripts/DkSearch/
dksus.dll?Detail&name=FJY3013RCT-ND).  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
FYI, current requirements are exactly 2mA so I should be good. Thanks
for the information.
 
On Sep 3, 12:30 am, Kaz Kylheku <k...@kylheku.com> wrote:
On 2011-09-03, Kaz Kylheku <k...@kylheku.com> wrote:

Emitter to +5V, collector to resistor to ground: PNP!

Hahaha! *rubeyes* I can't belive I just wrote this bull.

Sorry about that! Well, Back to sleep.
Kaz' post has some good points and I would like to try my best to
answer them. However all my family just showed up for the holiday
weekend and I don't have time yet. I will try to post Monday, I just
felt that I should say this so that no one felt ignored. ;0)
 
On 2011-09-03, Kaz Kylheku <kaz@kylheku.com> wrote:
On 2011-09-02, Tim Wescott <tim@seemywebsite.com> wrote:
All the suggestions so far, or a transistor with built-in bias and a
resistor (like this one: http://search.digikey.com/scripts/DkSearch/
dksus.dll?Detail&name=FJY3013RCT-ND). Emitter to ground, base to the DAC,

Hmm, page says: "Limited quantity available, not recommended for new design".

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.

Invert?

Emitter to +5V, collector to resistor to ground: PNP!
that's still an inverter, just drawn upside down.
..

PNP base to 5V collector to output and resistor ground emitter to resistor to input would
work, but not with that part as it has an integral base resistor.

--
⚂⚃ 100% natural

--- Posted via news://freenews.netfront.net/ - Complaints to news@netfront.net ---
 
On Sat, 03 Sep 2011 15:39:58 -0500, "krw@att.bizzzzzzzzzzzz"
<krw@att.bizzzzzzzzzzzz> wrote:

On Sat, 03 Sep 2011 14:13:55 -0500, John Fields
jfields@austininstruments.com> wrote:

On Sat, 03 Sep 2011 12:11:19 -0500, "krw@att.bizzzzzzzzzzzz"
krw@att.bizzzzzzzzzzzz> wrote:

On Sat, 03 Sep 2011 10:00:53 -0500, John Fields
jfields@austininstruments.com> wrote:

On Sat, 03 Sep 2011 07:56:00 -0500, "krw@att.bizzzzzzzzzzzz"
krw@att.bizzzzzzzzzzzz> wrote:

On 3 Sep 2011 06:19:53 GMT, Jasen Betts <jasen@xnet.co.nz> wrote:

On 2011-09-03, krw@att.bizzzzzzzzzzzz <krw@att.bizzzzzzzzzzzz> wrote:
On Fri, 02 Sep 2011 19:15:07 -0500, John Fields
jfields@austininstruments.com> wrote:

On Fri, 02 Sep 2011 09:32:59 -0500, "krw@att.bizzzzzzzzzzzz"
krw@att.bizzzzzzzzzzzz> wrote:

On Fri, 02 Sep 2011 08:49:22 -0500, John Fields
jfields@austininstruments.com> wrote:

DAQ
. +-------+
. | OUT|--[4.7K]--+-->To logic
. +-------+ |
. [LM386-5.0]
. |
. GND

http://www.national.com/ds/LM/LM136-5.0.pdf


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

Mea Culpa.

Actually less than a US dollar,

$6.34 in thousands.

http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=LM136H-5.0-ND

yeah, if you need the ruggedised one.

http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=LM336Z-5.0-ND

96c for singles. the SMT version is slightly cheaper.

He said LM136. That's what I searched on. Still, $1 vs $.004; you pick.

That is, if you're talking about an LM136-5 (that you can actually buy). An
LM286 is an opamp. You've really pulled your pud on this one.

dunno where you got LM286, he wrote LM386 (which is a low power
loudspeaker driver recently discussed in another thread and perhaps
the cause of the error) it's fairly obvoius he meant LM336 (which
is described in the PDF)

Typo. Yes, but John's post was so screwed up there's no telling what he
meant.

---
How so? You can't get around a typo? ;)

Typo? Sure, but it wasn't a typo.

---
Well, since there aren't any LM386-5.0's around and there are _lots_
of LM336-5.0's out there, I'd have to say it appears you're wrong.
---

You're getting as good as your pal, AlwaysWrong, here John. It was a brain
fart, sure, but not a typo. Your excuses are instructive, though.
---
I'd rather have friends than enemies, but you, with your perpetual
need to insult, seem to prefer the opposite.
---

It's just a low-power shunt reference to ground being used like a
Zener.

Sure, but it's a crap idea. As I said, expensive and an all-around PITA.

---
It may be a bit expensive, but I can't imagine why you'd think it's an
all-around PITA, especially compared to that crap divider of yours.
---

I guess now we all know why you don't even call yourself an engineer. You
want to spend over $6 on a half-cent solution. ...and then whine at the
half-cent solution because it's "crap". Very telling.
---
You've been told more than once that the part is less than a dollar,
and with very little effort on your part you could verify that with
Digi-Key.

The fact that you keep touting it as a $6 part when you know it isn't
speaks volumes, I think, about your lack of veracity.

The OP admitted that it was a crap solution when he politely rejected
Phil's suggestion on the grounds that it the DAC was _correctly_ set
to 5V then there'd only be 2.5V coming out of the divider.

He later recanted, of course, citing that if he couldn't properly set
up the software in order to use the divider solution there were other
issues to deal with.

My guess is he decided to run the DAC at either 0 or 10V out with no
in - between values allowed.
---

but what have you got that's less than
half a penny?

Two 0603 resistors. Two tenths each.

---
Dumb idea if he sets the DAC to output 5V.

So? What happens if he sets it to 2.5V? Think!

---
That's even dumber.
---

You're the king of dumb, here, John.
---
OK, then, tell me what the output of the divider would be with 5V out
of the DAC and with 2.5V out of the DAC.
---

Much better idea someone posted earlier:


. +5
. |K
. DAQ [DIODE]
. +-------+ |
. | OUT|--[R]--+-->To logic
. +-------+

The diode's a Schottky and the R is chosen to limit output current
from the DAQ DAC.

That's a *great* idea! (I was the first to suggest a Schottky. ;-)

---
But not the first to suggest the circuit, so that's just an
incremental improvement;

It's an important improvement. It keeps current out of the ESD diodes (often
important)
---
Unimportant if the series resistor is sized to limit the current into
the diodes.
---

and smaller Schottkys (and arrays, if need be) can usually be
found. In this case, the resistor divider is the right solution and the OP
agrees.
---
Only because he found a suitable software patch.
---

hardly anything worth dislocating your
shoulder while patting yourself on the back about. ;)

Then why did you pretend it was such a great improvement, in your response to
me?
---
Reading comprehension problems, eh?

I never said it was a great improvement, I said the _circuit_ was a
much better idea than mine.
---

It seems you're the one twisting in the wind, John. Now admit that
you're full of shit, or just skulk away. Your choice.
---
I have many more choices than that, my current one being to hang out
here and slap you around a little.

--
JF
 
"SklettTheNewb"

Lots of info here, this thing has taken on a life of it's own. After
re-evaluating my requirements against my knowledge/abilities and time
constraints I have selected the voltage divider solution:
#1 my primary goal was to avoid hardware damage - check!
#2 If myself and my team can't read code comments and follow
instructions to output 10v then I have bigger issues to worry about.


** The KISS principle applies here.

There are virtually no reasons not to use a simple divider.

You also give Mr Murphy a wide berth too by using a passive solution.



..... Phil
 
John Fields wrote:
On Thu, 1 Sep 2011 22:27:29 -0700 (PDT), SklettTheNewb

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.

Thanks, John, but this is much cheaper:

DAQ
. +-------+
. | OUT|--[4.7K]--+-->To logic
. +-------+ |
. [1N4148]
. | K
. |
. +5V
And I'd probably have used a 1K, depending on the output
drive of the DAQ.

Cheers!
Rich
 
John Fields wrote:

On Fri, 02 Sep 2011 09:32:59 -0500, "krw@att.bizzzzzzzzzzzz"
krw@att.bizzzzzzzzzzzz> wrote:

On Fri, 02 Sep 2011 08:49:22 -0500, John Fields
jfields@austininstruments.com> wrote:

On Thu, 1 Sep 2011 22:27:29 -0700 (PDT), SklettTheNewb
steveklett@gmail.com> wrote:

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.

---
View with a fixed-pitch font:

DAQ
. +-------+
. | OUT|--[4.7K]--+-->To logic
. +-------+ |
. [LM386-5.0]
. |
. GND

http://www.national.com/ds/LM/LM136-5.0.pdf


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

---
Mea Culpa.

Actually less than a US dollar, but what have you got that's less than
half a penny?

The best price I got at Digi-Key is .006 for a 1N4148.

Cheers!
Rich
 
On Sun, 04 Sep 2011 12:42:10 -0400, Jamie
<jamie_ka1lpa_not_valid_after_ka1lpa_@charter.net> wrote:

Rich Grise wrote:
John Fields wrote:

On Thu, 1 Sep 2011 22:27:29 -0700 (PDT), SklettTheNewb


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.

Thanks, John, but this is much cheaper:

DAQ
. +-------+
. | OUT|--[4.7K]--+-->To logic
. +-------+ |
. [1N4148]
. | K
. |
. +5V


And I'd probably have used a 1K, depending on the output
drive of the DAQ.

Cheers!
Rich

ok lets see, and the +5 is coming from where? Does it have
the ability to sink anything coming back to it, like a zener clamp?
The supply providing the 5V for the widget that's input has to be limited to
5V. If the 5V supply has any load (the widget being driven), the supply
doesn't have to sink anything.

I'd had to see that +5 source being supplied from a 7805/78L04 regs or
like them. Love the effects of over voltage on other items attached to
that circuit! :)
You're in the habit of adding regulators with no load? Load 'em.

> Do pay no attention to me, I just happen to be very observative.
 
Rich Grise wrote:
John Fields wrote:

On Thu, 1 Sep 2011 22:27:29 -0700 (PDT), SklettTheNewb


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.

Thanks, John, but this is much cheaper:

DAQ
. +-------+
. | OUT|--[4.7K]--+-->To logic
. +-------+ |
. [1N4148]
. | K
. |
. +5V


And I'd probably have used a 1K, depending on the output
drive of the DAQ.

Cheers!
Rich

ok lets see, and the +5 is coming from where? Does it have
the ability to sink anything coming back to it, like a zener clamp?

I'd had to see that +5 source being supplied from a 7805/78L04 regs or
like them. Love the effects of over voltage on other items attached to
that circuit! :)

Do pay no attention to me, I just happen to be very observative.

Jamie
 
On Sun, 4 Sep 2011 23:28:42 +1000, "Phil Allison" <phil_a@tpg.com.au>
wrote:

"SklettTheNewb"

Lots of info here, this thing has taken on a life of it's own. After
re-evaluating my requirements against my knowledge/abilities and time
constraints I have selected the voltage divider solution:
#1 my primary goal was to avoid hardware damage - check!
#2 If myself and my team can't read code comments and follow
instructions to output 10v then I have bigger issues to worry about.


** The KISS principle applies here.

There are virtually no reasons not to use a simple divider.

You also give Mr Murphy a wide berth too by using a passive solution.



.... Phil
Indeed.

Nicely done, Mr. Allison! :)

--
JF
 
SklettTheNewb wrote:
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.

Thanks for reading!

-Steve
use one bit to enable/disable two 7 bit registers, that gives
you 14 bits of data.
Or use 2 bits to clock 2 6 bit registers, gives 12 bit.
 
Jamie wrote:
Rich Grise wrote:
John Fields wrote:
On Thu, 1 Sep 2011 22:27:29 -0700 (PDT), SklettTheNewb

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.

Thanks, John, but this is much cheaper:

DAQ
. +-------+
. | OUT|--[4.7K]--+-->To logic
. +-------+ |
. [1N4148]
. | K
. |
. +5V

And I'd probably have used a 1K, depending on the output
drive of the DAQ.

ok lets see, and the +5 is coming from where? Does it have
the ability to sink anything coming back to it, like a zener clamp?

I'd had to see that +5 source being supplied from a 7805/78L04 regs or
like them. Love the effects of over voltage on other items attached to
that circuit! :)

Do pay no attention to me, I just happen to be very observative.

Did you mean "observant?"

But to answer your question, the source of the +5V is left as an exercise
for the student. ;-)

Cheers!
Rich
 
Rich Grise wrote:

Jamie wrote:

Rich Grise wrote:

John Fields wrote:

On Thu, 1 Sep 2011 22:27:29 -0700 (PDT), SklettTheNewb

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.

Thanks, John, but this is much cheaper:

DAQ
. +-------+
. | OUT|--[4.7K]--+-->To logic
. +-------+ |
. [1N4148]
. | K
. |
. +5V

And I'd probably have used a 1K, depending on the output
drive of the DAQ.


ok lets see, and the +5 is coming from where? Does it have
the ability to sink anything coming back to it, like a zener clamp?

I'd had to see that +5 source being supplied from a 7805/78L04 regs or
like them. Love the effects of over voltage on other items attached to
that circuit! :)

Do pay no attention to me, I just happen to be very observative.


Did you mean "observant?"
Nope, that is exactly what I meant to say, you must remember that I was
born and raised in the foot hills of Maine!

If it wasn't for people like us up north, some of the southern boys
would be considered impaired! :)

But to answer your question, the source of the +5V is left as an exercise
for the student. ;-)

Cheers!
Rich
 

Welcome to EDABoard.com

Sponsor

Back
Top