Shop OBEX P1 Docs P2 Docs Learn Events
Vibra Tab Amplification — Parallax Forums

Vibra Tab Amplification

alnajjar1alnajjar1 Posts: 110
edited 2013-11-19 19:16 in BASIC Stamp
This is a follow up on an earlier question.

Any idea how I can amplify the signal from the Tab to turn on a 5V reed relay? I am trying to have 16 TABs to be ready by the 2 chained 74HC165 to a BS2. Since I can't read the TAB directly from the 165, I thought using a simple relay to emulate a switch.

I tried various simple charge amplifier switch (such as the 2222A or the TIP120) without any luck.

Any ideas?

many thanks in advance.

Comments

  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2013-11-14 09:54
    Here is a self biasing circuit that will act like a crude sample and hold, that should work for a 74HC165 without the need of a relay. If the hold time is too long, you can snub it by placing a resistor across the 1uF capacitor, or simply using a smaller value capacitor. If the hold time is not enough, then a larger value capacitor can be used.

    VTAB.jpg
    1024 x 631 - 46K
  • alnajjar1alnajjar1 Posts: 110
    edited 2013-11-14 11:52
    Thanks Beau,
    I must be not clear on how the 165 works. My understanding is that its input pins need to be pulled to ground. When reading the 165, I get 11111111. When I pull any of the inputs to to ground (with a switch), I get 00000001 for example. How will your circuit achieve that? it is ideal that I don't use a relay so you solution is very appealing.

    Please clarify.

    Al
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2013-11-14 12:08
    "My understanding is that its input pins need to be pulled to ground" - the LOW level voltage for the 74HC165 is about 2.1V .... at rest the circuit above supplies about 1.13V which is lower than the LOW threshold so the 165 "sees" a LOW.

    When the circuit above is triggered, the voltage will rise to 2.83V which is above the HIGH level voltage threshold of 2.4V for the 74HC165. Because of the capacitor, the above circuit will 'hold' that voltage long enough for a reading to be taken via the 74HC165.

    Try it first with a single channel or two and see if it responds the way you like. If the 2.83V is not high enough, then there are also ways to raise that.
  • ercoerco Posts: 20,257
    edited 2013-11-14 13:54
    You could easily trigger an SCR to latch from a light Vibratab flick. In fact, you probably would need to add a zener diode shunt to limit the voltage input to the SCR trigger. Depending on the application, you might not need the relay. To turn off the SCR, briefly stop current from flowing through it, or briefly short A & K together.
  • alnajjar1alnajjar1 Posts: 110
    edited 2013-11-14 16:33
    Makes sense, I will try it. Would you suggest using a 12V input (which I have readily available) bringing the high much higher that the threshold required for the 165?
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2013-11-14 16:39
    12V would be too much for the 165 .... 7V MAX
  • alnajjar1alnajjar1 Posts: 110
    edited 2013-11-14 17:12
    Just tried it. I am using the 2N2222 which should be equivalent to the 2N3904. Using 5V, the circuit is giving me about 1.9 - 2.1 when the Tab is triggered 'heavily'. You said there is a way of increasing the threshold, any help?
  • alnajjar1alnajjar1 Posts: 110
    edited 2013-11-14 17:35
    I also tried this simplistic circuit and it doesn't work. any idea why? I am much better at programming the BS2 and only simple electronics, but this is somehow escaping
    Tip Circuit.jpg

    many thanks again,

    Al
    599 x 483 - 27K
  • ercoerco Posts: 20,257
    edited 2013-11-14 17:57
    You need a latching circuit. Your circuit will switch (at best) for very brief pulse, probably not enough to trip your relay.

    I may sound like a broken record, but try an SCR. You'll like the results. They're magic.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-11-14 18:23
    I think the biggest problem with the TIP120 circuit is low input impedance and lack of gain. Piezo sensors have very high impedance outputs and need to be matched with amplifiers having similar characteristics.

    -Phil
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2013-11-14 18:43
    "Just tried it. I am using the 2N2222 which should be equivalent to the 2N3904" ... in this case not so... The 2n3904 has less drive strength than the 2n2222 which in this circuit is critical for proper operation. The circuit I provided is a true amplifier with self biasing capabilities that places the normal bias at about 1.13V for a 5V supply and at 1.08V for a 3.3V supply (using 2n3904's) The greater drive strength of the 2n2222's keep it closer to ground not allowing as high of a voltage. What is the resting voltage (or bias voltage) of your circuit with the 2n2222's?

    Reference Circuit was derived from the famous ZN414 transistor
    http://en.wikipedia.org/wiki/ZN414

    Two transistor derivative of the ZN414
    http://www.zen22142.zen.co.uk/Circuits/rf/amrec.html

    "I also tried this simplistic circuit and it doesn't work. any idea why?" - It isn't properly biased to the high impedance nature of the Vibra tab.

    An SCR latching circuit is perfectly fine also, but I read the post as you wanting Amplification so I provided an amplifier. SCR's can be tricky also ... to turn off properly. Turning them on is usually very easy, but they often turn on hard and saturate the transistors making them tricky to turn off. In either case, a relay is not necessary for what you want to do.
  • alnajjar1alnajjar1 Posts: 110
    edited 2013-11-14 18:51
    Thanks ERCO, the SCR is certainly an elegant solution, the problem is the resetting. Switching the power or shorting A-K adds more circuit complication with 16 Tabs involved.
  • alnajjar1alnajjar1 Posts: 110
    edited 2013-11-14 18:54
    Thanks again Beau. I will get some the 2n3904 and report back.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2013-11-15 10:22
    If you used an op-amp for each input you would have the benefits of a more matched impedance, as well as matching the output level of the microcontroller. I have done this with Piezo transducers to use them as noise sensors with the BASIC Stamp.
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2013-11-15 10:56
    Here is an SCR implementation tested with both 2n3904 and 2n2222. The output goes almost to the top rail of the supply voltage (Supply - 0.6V)

    VTABSCR.jpg
    1003 x 745 - 91K
  • ercoerco Posts: 20,257
    edited 2013-11-15 13:59
    Is this another golf challenge, minimum parts contest, like 2 servos on one pin?
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2013-11-15 14:09
    Sure erco, why not? ... You can't use a discrete off the shelf SCR though... you must build it with transistors. ...

    The winner gets bragging rights for fewest number of components and most cost effective solution
  • ercoerco Posts: 20,257
    edited 2013-11-15 17:23
    Sure erco, why not? ... You can't use a discrete off the shelf SCR though... you must build it with transistors. ...

    Stuff and nonsense. By my rules, one can use SCRs but no transistors. :) The whole magic of an SCR is its self-latching ability. No one uses them anymore. Cost can't be a limiter: http://www.ebay.com/itm/20-x-2N5064-Reverse-Blocking-Thyristors-SCR-200V-0-8A-Free-Shipping-/320957892626?pt=LH_DefaultDomain_0&hash=item4aba94c812 Besides, a Vibra-tab is already $2.50.

    Light activated SCRs (LASCRs) used to be easy to get and are also magic. Not sure you can even buy them anymore! http://www.circuitstoday.com/lascr-light-activated-scr

    http://www.bristolwatch.com/ele/lascr.htm
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2013-11-15 18:28
    Ok... fine... :-) ...erco ... But a schematic and tested circuit are required.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-11-15 19:52
    For the contest, can we use a CD4007 if we count only those internal transistors that we actually use?

    -Phil
  • ercoerco Posts: 20,257
    edited 2013-11-15 20:36
    I cry foul. A CD4007 is just one part! And Phil is much smarter than me!

    I'm taking my SCRs and going home!
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-11-15 20:41
    Noooo! I'm offering to count each transistor used from the '4007 as a separate part. 'Jest to keep a level playin' field, dontchasee?

    -Phil
  • ercoerco Posts: 20,257
    edited 2013-11-15 21:01
    I couldn't help but notice that you didn't bother denying that you are much smarter than me.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-11-15 22:47
    Ohferheavensakes, erco, mi amigo! Where the he!! did that come from? I have no idea nor really care to project a thousand uniquely sublime dimensions onto one stupid axis.

    Sheesh!
    -Phil
  • ercoerco Posts: 20,257
    edited 2013-11-16 10:24
    Sheesh indeed! You know I jest, PhiPi!
  • alnajjar1alnajjar1 Posts: 110
    edited 2013-11-19 19:09
    Beau: the circuit works beautifully! I had to reduce the capacitor value otherwise the 'latch' time is too long. With a 0.22uF the signal is held high for about 1/4 sec which is perfect for my uses. Otherwise, I used the exact components you indicated in the diagram.

    The Tab had to be bent visibly in order to get the voltage over the threshold of 2.4V. So, I tried using a small Piezo buzzer from Radio Shack and that works even with blowing on it. So, I now got it!

    Many thanks again Beau and the entire team. I am sorry to have started a 'war' of circuit design but it is wonderful to see Parallax team so engaged. I toyed with switching to Adruino at some point with the lure of speed and IOs but you guys convinced me to stay with Parallax for excellent product and amazing support.

    Al
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2013-11-19 19:16
    Excellent!! that's great! .... feel free to ask any questions.

    One thing you can do to raise the voltage potential that hinted to in an earlier post, is to add a resistor the the NPN emitter leg going to Ground. I would try a 470 Ohm to start out with and go from there with a little experimentation.
Sign In or Register to comment.