Shop OBEX P1 Docs P2 Docs Learn Events
Inputs going thru LEDs on the way to a '165 — Parallax Forums

Inputs going thru LEDs on the way to a '165

Nightrider7731Nightrider7731 Posts: 46
edited 2005-06-09 11:31 in BASIC Stamp
I have a group of 4 to 8 push buttons providing input to a '165.· I want to have an LED light next to each button when the button is pressed.· Since the 165 doesn't seem to sink enough current to light the LED (it gets more current from the pull-up resistor to give it a dim glow), is there any other way to make these indicator LED light?

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-06-08 05:03
    Hello,

    ·· How about using double-pole push-buttons...When you press them, the second circuit can turn on the LED.· If you need the LED to stay on, you could use a 74HC595 on the same data/clock lines as the '165.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Nightrider7731Nightrider7731 Posts: 46
    edited 2005-06-08 15:09
    I'd draw a pix if I had the software, so I'll try to verbalize·this idea/option·instead.· I start with a set of standard pushbutton connections to the 165 with a 10K pull-up resister on each pin.· Since I'm a noob, I tried connecting a LED w/220 resistor off the pin as well incorrectly thinking that some current from the button would reach the LED since the 165 has such a small draw.· In reality, when the button is off, the LED dimly lights due to the pull-up, and when the button is on, the LED turns off due to the 165 taking the current.· Would it be work (make sense) if I powered·each LED by an inverter (with a small resistor in front) coming from the pin?· That way when the button is up, a pull-up resistor will send a 1 to the inverter (and turn off the LED).· When the button is down, the inverter would get a 0 since·the small resistor in front of the inverter lets all the current go to the pin?· I know a·dual pole·would be easier, but I can't find one the customer likes or wants to pay for since I already have the SPST he really likes and the quantity of switches (multiple instances of this setup) makes this cost prohibitive.



    Thanks!
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-06-08 15:29
    Hello,

    ·· This thread is started to sound eerily like another one for modding a DDR pad to light up.· Anyway, yes, you can use the inverter to do what you want.· You can drive multiple device inputs in the manner you describe without issue.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2005-06-08 15:38
    Nightrider -

    Just to get back to basics for a moment, what is the point or purpose for having the lights?
    Is the LED supposed to be ON and stay ON when the switch is turned ON or is the light just momentary and so too the button?

    Regards,

    Bruce Bates
  • Nightrider7731Nightrider7731 Posts: 46
    edited 2005-06-08 17:33
    There will be a box controlling popup targets and other items.· A target will be "alive" when the controlling button is on.· These are on-off buttons, not momentaries.· The LEDs, located above each button, are indicator lights that a given target is still alive.
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-06-08 17:53
    I would just use an inverter like you mentioned before to act as a driver for the LED.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • KenMKenM Posts: 657
    edited 2005-06-08 19:18
    Nightrider,

    Free schematic drawing software at www.expresspcb.com

    Easy to make a drawing and post in these forums.

    K
  • schifflischiffli Posts: 7
    edited 2005-06-09 04:11
    I've attached an ExpressSCH (.sch) file and .bmp showing one side of the LEDs in series with 510 ohm resistors hooked up to the input pins of a '165.· The other side of the LEDs would go to +5V.· The J1 connections, besides connecting to the '165 inputs would also connect to one side of your switches while the other side of your switches would go to ground.· Hope this helps.

    Mike
  • Nightrider7731Nightrider7731 Posts: 46
    edited 2005-06-09 05:13
    The inputs on a 74HC165 must connect to a gnd to register.· I tried your suggestion but it failed to trigger the 165 input properly.· However, I did put theory to practice using an inverter and I observed the proper outcome.· For future projects, does anyone make an pushbutton that lights when pushed that doesn't require move than 5V?



    Thanks!
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-06-09 11:31
    If you use the 74LS165 (TTL version)·you can probably do it with the attached circuit.· The 1K resistor will hold the input low until the switch is closed.· Assuming a drop across the LED of about 1.5 volts, you should get about 3.5v at the input pin·when the button is pressed -- this is above the 2 volt Vih spec for the part.·

    Note that you would use the Qh output with the inputs being active-high.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax

    Post Edited (Jon Williams (Parallax)) : 6/9/2005 11:39:10 AM GMT
    195 x 454 - 2K
Sign In or Register to comment.