Shop OBEX P1 Docs P2 Docs Learn Events
74HC165 with logic high — Parallax Forums

74HC165 with logic high

alnajjar1alnajjar1 Posts: 110
edited 2013-11-07 08:13 in BASIC Stamp
Hello,

I am using 16 of the Piezo Film Vibra Tab as trigger switches for an exhibit at our museum (a 16 step musical stairs!). As you can imagine, I can't dedicate all of my BS2 pins to that.

I have used the 74HC165 with switches before and how to chain them to read more than 8 inputs. But I have no idea how to use them with Piezo sensors which output +5V (using a 5.1V Zener diode for protection).

Is there a simple trick to use the 165 for this purpose? If not, is there an alternative?

Many thanks in advance.

Al

Comments

  • tonyp12tonyp12 Posts: 1,951
    edited 2013-10-30 21:19
    74LV165
    74VHC165
    74AHC165
    can handle 7v on inputs though even if its Vdd is 3.3v
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2013-10-30 22:49
    The problem I see is not with the voltage levels. High-impedance inputs can probably handle those sensors without the zener diode. But in order to be able to detect a narrow pulse on a shift register you'd have to be constantly shifting in data to keep sampling the pins. The Propeller could do this easily however the BASIC Stamp most likely would not be able to. You may have to use some sort of latching logic in order to make it work.
  • alnajjar1alnajjar1 Posts: 110
    edited 2013-10-31 03:20
    Thanks Chris. What do you mean by 'latching logic'. is that using a separate BS2? The propeller is better suited because the multicore functionallity and the speed, correct?
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2013-10-31 12:34
    I mean using a latch and some glue logic to latch incoming pulses and then notify the BASIC Stamp Module to read the shift register. It's probably more than you want to get into. Back in the day that was how certain things had to be solved sometimes...using various logic chips.
  • alnajjar1alnajjar1 Posts: 110
    edited 2013-10-31 19:00
    I am now thinking of dedicating a second BS2 to do the monitoring of the 16 Piezos and send changes to the main BS2 as a word whenever there is a change in the sensors status. Do you know of a application note that explains how two BS2s can efficiently talk to each other?

    many thanks Chris.
  • Mike GreenMike Green Posts: 23,101
    edited 2013-10-31 19:16
    Nuts and Volts Column #55 and #56 (here)
  • bluejaybluejay Posts: 131
    edited 2013-11-01 19:32
    Have you considered using 74hc595 shift register?
  • alnajjar1alnajjar1 Posts: 110
    edited 2013-11-05 18:02
    Thanks Mike,

    I finally decided to introduce a very simple circuit between the Piezo and the 74HC165 which consists of a simple PNP transistor and Reed relay. This will eliminate all the logic issues and the need for 2 BS IIs.

    Thanks all for the responses.

    Al
  • alnajjar1alnajjar1 Posts: 110
    edited 2013-11-06 19:33
    The only trouble with the piezo is the very brief duration of the pulse when the strip is triggered. I am looking for a circuit (like a 555 timer) that will stretch that pulse to 1/2 a second or so. this keep the reed relay on long enough for a more reliable reading by the BS2. Does anyone know of a 555 timer circuit that can do this?

    many thanks to all for your help

    Al
  • Hal AlbachHal Albach Posts: 747
    edited 2013-11-07 08:13
    Google "monostable multivibrator" and you will find hundreds of circuits that will let you stretch a very short pulse to one as long as you want. I would look into the 74ls123 chips as they come with two one shots per package and can probably let you eliminate the very bouncy reed relays.
Sign In or Register to comment.