Shop OBEX P1 Docs P2 Docs Learn Events
trigger stamp with low voltage? is it possible? — Parallax Forums

trigger stamp with low voltage? is it possible?

ArchiverArchiver Posts: 46,084
edited 2002-12-20 15:24 in General Discussion
Hi,
I'm fairly new to using STAMPs so this is probably
a very newbie question.

I'm trying to get the stamp to recognize a 1.2 volt signal
as a trigger. essentially, if it sees 1.2 volts on pin 0
then it should kick off other programs, and do it's thing.
otherwise it should just sit there and wait.

I thought I could look for high on the pin, but due to the source
I can't up the voltage that it is sending out.

Also, I'm not sure if it makes a difference, but when the 1.2 volt
signal goes out, it stays on for about 5 seconds. I don't know if
that would throw things off or not.

thanks for any help you can give me.

-Jeff

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2002-12-19 16:13
    Jeff,

    I'm fairly new to the STAMP thing myself, but I've been reading Scott
    Edward's book, and from that, I'm pretty sure the high/low threshold
    for the stamp pins is 1.5 volts. Someone please correct me if I'm
    wrong.

    Newbie answer: you might be able to use a switching transistor to
    have the lower voltage turn on another power source that would
    overcome the 1.5v threshold?

    Josh

    Great info in this group, btw. I've been lurking for some time now
    and thought I should contribute... I hope I gave the right answer.

    --- In basicstamps@yahoogroups.com, "js5752 <jds@t...>" <jds@t...>
    wrote:
    > Hi,
    > I'm fairly new to using STAMPs so this is probably
    > a very newbie question.
    >
    > I'm trying to get the stamp to recognize a 1.2 volt signal
    > as a trigger. essentially, if it sees 1.2 volts on pin 0
    > then it should kick off other programs, and do it's thing.
    > otherwise it should just sit there and wait.
    >
    > I thought I could look for high on the pin, but due to the source
    > I can't up the voltage that it is sending out.
    >
    > Also, I'm not sure if it makes a difference, but when the 1.2 volt
    > signal goes out, it stays on for about 5 seconds. I don't know if
    > that would throw things off or not.
    >
    > thanks for any help you can give me.
    >
    > -Jeff
  • ArchiverArchiver Posts: 46,084
    edited 2002-12-19 18:11
    You can use an op amp comparitor to make either logic 0 or logic 1
    above/below 1.20000 volts.

    If you need technical help on this SIMPLE comparitor circuit, write back.


    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2002-12-19 21:31
    At 03:47 PM 12/19/02 +0000, js5752 <jds@t...> wrote:

    >I'm trying to get the stamp to recognize a 1.2 volt signal
    >as a trigger. essentially, if it sees 1.2 volts on pin 0
    >then it should kick off other programs, and do it's thing.
    >otherwise it should just sit there and wait.

    Is the signal you are trying to trigger from a low impedance signal? In
    other words, will it sink a small current while at a logic 0?

    If so, a single silicon diode and 1 resistor may be all you need. The
    diode acts as a level shifter and lifts the input signal UP by about
    0.6V. This turns your input signal into a 0.6V or 1.8V signal and will
    operate the stamp input quite nicely. FYI, the input threshold of a Stamp
    pin is about 1.4 Vdc.

    Connect the diode in series with the input signal: cathode (stripe) end to
    the input signal, anode to the stamp pin. Also connect a 10k resistor from
    the stamp pin to Vdd (+5V).

    The resistor is necessary to pull the stamp pin HI. The value is not critical.

    Hope this helps!

    dwayne

    --
    Dwayne Reid <dwayner@p...>
    Trinity Electronics Systems Ltd Edmonton, AB, CANADA
    (780) 489-3199 voice (780) 487-6397 fax

    Celebrating 18 years of Engineering Innovation (1984 - 2002)
    .-. .-. .-. .-. .-. .-. .-. .-. .-. .-
    `-' `-' `-' `-' `-' `-' `-' `-' `-'
    Do NOT send unsolicited commercial email to this email address.
    This message neither grants consent to receive unsolicited
    commercial email nor is intended to solicit commercial email.
  • ArchiverArchiver Posts: 46,084
    edited 2002-12-19 22:38
    Typically it takes a higher voltage, I think about 2.6 volts or so, for the
    Stamp to see the input as high. Can you drive an LED or lightbulb with your
    1.2 volt signal? This would provide other options.

    What is the source of the signal?

    Original Message

    > I'm fairly new to using STAMPs so this is probably
    > a very newbie question.
    >
    > I'm trying to get the stamp to recognize a 1.2 volt signal
    > as a trigger. essentially, if it sees 1.2 volts on pin 0
    > then it should kick off other programs, and do it's thing.
    > otherwise it should just sit there and wait.
    >
    > I thought I could look for high on the pin, but due to the source
    > I can't up the voltage that it is sending out.
    >
    > Also, I'm not sure if it makes a difference, but when the 1.2 volt
    > signal goes out, it stays on for about 5 seconds. I don't know if
    > that would throw things off or not.
  • ArchiverArchiver Posts: 46,084
    edited 2002-12-19 23:02
    DOH! make that 1.6 volts -- dang these old fingers!


    Original Message

    > Typically it takes a higher voltage, I think about 2.6 volts or so, for
    the
    > Stamp to see the input as high. Can you drive an LED or lightbulb with
    your
    > 1.2 volt signal? This would provide other options.
    >
    > What is the source of the signal?
    >
    >
    Original Message
    >
    > > I'm fairly new to using STAMPs so this is probably
    > > a very newbie question.
    > >
    > > I'm trying to get the stamp to recognize a 1.2 volt signal
    > > as a trigger. essentially, if it sees 1.2 volts on pin 0
    > > then it should kick off other programs, and do it's thing.
    > > otherwise it should just sit there and wait.
    > >
    > > I thought I could look for high on the pin, but due to the source
    > > I can't up the voltage that it is sending out.
    > >
    > > Also, I'm not sure if it makes a difference, but when the 1.2 volt
    > > signal goes out, it stays on for about 5 seconds. I don't know if
    > > that would throw things off or not.
  • ArchiverArchiver Posts: 46,084
    edited 2002-12-19 23:22
    You could try using a voltager divider to set the STAMP pin at about 1
    volt...then capacitively couple the signal you are monitoring onto the ST^AMP
    pin with the 1 volt level. The added 1.2 volts from your source would then
    drive the STAMP pin high momentarily. Obviously you must have the STAMP in a
    loop looking for this signal change at all times so you don't miss it.


    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2002-12-20 00:22
    An op amp will work also.

    --- In basicstamps@yahoogroups.com, "js5752 <jds@t...>" <jds@t...>
    wrote:
    > Hi,
    > I'm fairly new to using STAMPs so this is probably
    > a very newbie question.
    >
    > I'm trying to get the stamp to recognize a 1.2 volt signal
    > as a trigger. essentially, if it sees 1.2 volts on pin 0
    > then it should kick off other programs, and do it's thing.
    > otherwise it should just sit there and wait.
    >
    > I thought I could look for high on the pin, but due to the source
    > I can't up the voltage that it is sending out.
    >
    > Also, I'm not sure if it makes a difference, but when the 1.2 volt
    > signal goes out, it stays on for about 5 seconds. I don't know if
    > that would throw things off or not.
    >
    > thanks for any help you can give me.
    >
    > -Jeff
  • ArchiverArchiver Posts: 46,084
    edited 2002-12-20 01:22
    Jeff

    low voltage detection is possible with a fe inexpensive parts. rather than
    give you a long expanation, let me suggest you get the January issue of
    Poptronics, which has a nice piece on LM339 circuits. If you don't want to
    purchase it, just Google " LM339 circuits antd I'm sure you'll get a bunch of
    hits.

    Larry

    In a message dated 12/19/02 3:26:37 PM Pacific Standard Time,
    basicstamps@yahoogroups.com writes:


    > Date: Thu, 19 Dec 2002 15:47:03 -0000
    > From: "js5752 <jds@t...>" <jds@t...>
    > Subject: trigger stamp with low voltage?
    > is it possible?
    > Hi,
    > I'm fairly new to using STAMPs so this is probably
    > a very newbie question.
    >
    > I'm trying to get the stamp to recognize a 1.2 volt signal
    > as a trigger. essentially, if it sees 1.2 volts on pin 0
    > then it should kick off other programs, and do it's thing.
    > otherwise it should just sit there and wait.
    >
    > I thought I could look for high on the pin, but due to the source
    > I can't up the voltage that it is sending out.
    >
    > Also, I'm not sure if it makes a difference, but when the 1.2 volt
    > signal goes out, it stays on for about 5 seconds. I don't know if
    > that would throw things off or not.
    >
    > thanks for any help you can give me.
    >
    > -Jeff
    >
    >



    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2002-12-20 02:03
    Thats RIGHT!!!!!!!!!!!!!!!
    Use a voltage comparitor if you want to trigger off of 1.2 volts.

    This is the simplist and most reliable way to do it. All this other voltage
    divider stuff I read, diode and resistor, blah blah blah,is not worth the hassle
    if you want to precisely trigger at 1.2 volts.

    The comparitor circuit is extreemly easy to make. From the replies I have seen
    on this subject, there are only a few that recommended an op amp comparitor,
    that is there are only of few real electronics guys - the other suggestions
    appear to come from programmers, not that there is anything wrong with
    programmers, I am amused at times when I read some of the hardware
    suggestions.....
  • ArchiverArchiver Posts: 46,084
    edited 2002-12-20 12:13
    Actually I could use some help on this "SIMPLE" circuit.
    I tried using a 741 but something must have gone wrong, because
    I could never get it to trigger at the right level.

    If someone could show me what I should be doing,
    that would be terrific.

    thanks
    -Jeff

    --- In basicstamps@yahoogroups.com, smartdim@a... wrote:
    > You can use an op amp comparitor to make either logic 0 or logic
    1
    > above/below 1.20000 volts.
    >
    > If you need technical help on this SIMPLE comparitor circuit,
    write back.
    >
    >
    > [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2002-12-20 15:09
    Send a fax number to my personal email and I will send a schematic.


    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2002-12-20 15:24
    A 741 is probably not the best choice for this application. I'd use an
    LM329 (Radio Shack has them). This has 4 comparator op amps. You don't
    need a negative supply, just ground and 5V.

    1) Use a voltage divider to get a, say, 1V signal from 5V (a 5:1
    divider). Use a pot if you want to adjust it.
    2) Connect this reference to the + or - terminal of the comparator
    3) Connect the input voltage to the other comparator terminal
    4) Put a pull up resistor on the output of the comparator (say, 10K to
    5V) and connect the output to the Stamp input.

    Now assume that the input voltage is 0V. The output of the comparator
    will be either 5V or 0V. If you don't like the way it is, swap the leads
    on pins 2 and 3. In reality, you can figure out which way it will go
    ahead of time, but it is easy enough to correct for in software or swap
    the wiring, so do whatever is easiest.

    When the input voltage exceeds your reference (1V), the output of the
    comparator will change state. Don't set the reference too close to the
    actual level or the output may flip back and forth (oscillate). Then
    you'd need hysterisis to prevent this. Better to just pick a lower
    number.

    If you don't like guessing how the output will be, here's the rule: If
    the - input is greater than the + input, the output will go to 0V (well,
    the negative rail, which is 0V in this case). If the + input is larger,
    the output simply disconnects (that's why the pull up resistor is
    important). There are technical reasons why this is better than letting
    the opamp supply 5V, but that's a long story.

    If you need divider help, read http://www.wd5gnr.com/basiccir.htm.
    Generally, pick a current you want to draw (say 1mA). 1V at 1mA is 1K
    ohms. So the resistor between the op amp input and ground should be 1K.
    To get 1mA to flow at 5V you need a 5K total resistance. So since you
    already have 1K, you are short 4K. So a 4K resistor from +5 to the input
    will do the trick. That assumes the comparators input resistance is VERY
    high (which it is). Of course, you probably have to settle for nearby
    values (I don't think 4K is a standard value; sure you could make one
    with 4 1Ks, but at 5% 3.9K or 4.3K would probably do fine (10% would be
    3.9K).

    If you want to learn more about op-amps, read
    http://w1.859.telia.com/~u85920178/begin/opamp00.htm (Harry is a smart
    guy) and/or http://www.wd5gnr.com/opampneg.htm. Also, be sure to read
    the Art of Electronics for just about everything. Read my review of it
    at http://www.wd5gnr.com/books.htm.

    By the way... It would be pretty common to use an NPN transistor like a
    2N2222 for this. The only problem is a 2N2222's Vbe can (worst case) be
    1.2V so without knowing the conditions the circuit will be under, this
    would be a marginal design. In practice it would probably work, but it
    would "invert" the signal (no problem to handle in software).

    The idea would be to ground the emitter and connect the collector
    through a resistor (Rc). The Stamp would connect to the collector also.
    The input would go to the base through a resistor (Rb). We don't know
    how much current your 1.2V source can supply, but let's say it is
    plenty. We can drive the 2N2222 into saturation by putting a small
    resistor for Rb. The base will try to be at 0.7V (nominally; like I
    said, could be as high as 1.2V in which case this won't work). So the
    base current should be about (1.2-0.7)/Rb or .5/Rb. So if Rb were 50
    ohms you'd drive 10mA into the base. That would draw the collector down
    towards ground (how much depends on a lot of factors, but a large enough
    Rc (100K?) should allow it to drop below the Stamp's threshold. Ideally,
    you want to drive the transistor into saturation, but with the marginal
    voltage I wouldn't count on that. Unless I was really bent to use a
    transistor, I'd go with the op amp. If the input were a larger voltage
    (say 12V) I'd be tempted to use the transistor.

    Oh well, been a long time since I've written a long winded post, so
    hopefully the list will forgive me.

    AND... Happy holidays to all on the Stamp List! Hope you get lots of
    gadgets under your tree (if you observe the tree thing, anyway).

    Regards,

    Al Williams
    AWC
    * NEW: PAK-VIa - Read PS/2 keyboards or mice -- double the buffer, lower
    current consumption.
    http://www.al-williams.com/awce/pak6.htm




    >
    Original Message
    > From: js5752 <jds@t...> [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=VcqdwNtn72t0O1rXlgpWWsssnMsmQVTnqnQTeiwOrJnFCm76RWzbiXR8fCUEf3NTccXDGVKZtkCT]jds@t...[/url
    > Sent: Friday, December 20, 2002 6:14 AM
    > To: basicstamps@yahoogroups.com
    > Subject: [noparse][[/noparse]basicstamps] Re: trigger stamp with low
    > voltage? is it possible?
    >
    >
    > Actually I could use some help on this "SIMPLE" circuit.
    > I tried using a 741 but something must have gone wrong,
    > because I could never get it to trigger at the right level.
    >
    > If someone could show me what I should be doing,
    > that would be terrific.
    >
    > thanks
    > -Jeff
    >
    > --- In basicstamps@yahoogroups.com, smartdim@a... wrote:
    > > You can use an op amp comparitor to make either logic 0 or logic
    > 1
    > > above/below 1.20000 volts.
    > >
    > > If you need technical help on this SIMPLE comparitor circuit,
    > write back.
    > >
    > >
    > > [noparse][[/noparse]Non-text portions of this message have been removed]
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the
    > Subject and Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to
    > http://docs.yahoo.com/info/terms/
    >
    >
    >
    >
Sign In or Register to comment.