Shop OBEX P1 Docs P2 Docs Learn Events
Noise Problem using 74HC165 — Parallax Forums

Noise Problem using 74HC165

Lee SadeliLee Sadeli Posts: 29
edited 2005-10-24 21:19 in BASIC Stamp
Hi,
I am trying to expand input by·using 74HC165, schematic same as EXPANDED INPUT in StampWorks literature. All input is pull HIGH with 1K resistor and button is connected to Ground. They all work fine until I extend the button cables up to 300 feets away. With extended cables, sometimes the stamp read the right input, but many times it goes crazy. I believe this is due to the noise from the long cables. Please advise if there is a· way I can eliminate the noise, maybe by using capacitor at the input of the 74HC165 ?· Thanks in advance.

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-10-21 18:03
    300 feet is a long way.· And if you're not using sheilded cable, you essentially have some nice antennas.·

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-10-21 18:43
    Chris is right, that is a LONG way. Move the 74x165 close to your inputs and use large (#16 or so), shielded, twisted wire to get to the BASIC Stamp.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Tricky NekroTricky Nekro Posts: 218
    edited 2005-10-21 20:56
    As I know all parallel cables can't exited the 15m ( Don't know how many Feets)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    -Rule your Destiny-
    --Be Good. Be Bad. Be Provas--
  • Lee SadeliLee Sadeli Posts: 29
    edited 2005-10-22 15:28
    Hi Chris & Jon,
    Finally I got it working even with 300 ft of LAN cables. Believe it or not, it's code problem. When I was using the Stampsworks code, it had noise, but I re-wrote it with another HIGH Load before the PULSOUT Load, 5. Then after the SHIFTIN command, another LOW Load. These solve my problem.
    Thanks anyway.
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-10-22 15:37
    If that works you could probably stretch the PULSOUT timing and drop the HIGH and LOW instructions -- you've got a TON of capacitance in your line and the short pulse in the original program (which works fine in a normal environment, let's be clear) is being swamped and never seen (or just intermittently) at the 74HC165. By using HIGH and LOW you're simply creating a wider pulse that is able to overcome your line capacitance.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Lee SadeliLee Sadeli Posts: 29
    edited 2005-10-23 18:03
    Try the PULSOUT timing up to 50 instead of 5 as in Stampworks, but still doesn't work. Don't kow why.
    Only the HIGH and LOW command works so far
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-10-23 18:19
    Well, a PULSOUT of 50 on a BS2 is only 100 microseconds -- HIGH and LOW take longer than that to load so you're creating a much longer pulse. The reason why, again, is that your line capacitance is swamping the short signal. Give PULSOUT the opportunity to work -- try 250 or higher. Or stick with HIGH and LOW, but keep in mind that your wiring has created the problem, and you have to overcome that by modifying the code. We don't normally connect TTL circuits with 300 feet of skinny wire....

    Another thought -- since you are going through so much wire you might want to put a pull-up on the load line next to your '165; this will keep that line low and now count on the load line to drive it that way.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • houbahouba Posts: 3
    edited 2005-10-24 19:26
    Use some CAT 5 cables. The other option is to use some ferrite (used in remoted controled aircraft gliders) around twisted cables.
  • metron9metron9 Posts: 1,100
    edited 2005-10-24 21:19
    This is a good read on wire length and magnetic fields ohm ratings.

    http://www.faqs.org/docs/electric/AC/AC_14.html
Sign In or Register to comment.