Shop OBEX P1 Docs P2 Docs Learn Events
Could you check my dual LED SPDT circuit please? — Parallax Forums

Could you check my dual LED SPDT circuit please?

groggorygroggory Posts: 205
edited 2010-10-08 10:09 in Propeller 1
34oyqmu.png

I'm using the dual LED SPDT switch from this series.
http://www.nkkswitches.com/pdf/gtogglesilluminated.pdf

The expected operation for P9 | P10 , LED
UP: 01 , green lit
Mid: 11, both off
Down: 10, red lit

Did I get it right?

Comments

  • RaymanRayman Posts: 14,889
    edited 2010-10-06 09:10
    looks ok to me :)
  • groggorygroggory Posts: 205
    edited 2010-10-06 09:47
    Rayman wrote: »
    looks ok to me :)

    Great. Thank you.

    That dang switch took some finagling around for me to figure out how to get that operation. My old circuit had the LEDs going the other way.
  • rokickirokicki Posts: 1,000
    edited 2010-10-07 09:51
    What is the function of R80 and R81? Would the circuit not perform identically
    with both of these resistors removed?
  • groggorygroggory Posts: 205
    edited 2010-10-07 09:58
    rokicki wrote: »
    What is the function of R80 and R81? Would the circuit not perform identically
    with both of these resistors removed?

    Without R80 when you flip the switch up you'll short VCC to GND. Boom.

    Without R81 when you flip the switch down you'll short VCC to GND. Boom.
  • KaosKiddKaosKidd Posts: 296
    edited 2010-10-07 10:19
    groggory wrote: »
    Without R80 when you flip the switch up you'll short VCC to GND. Boom.

    Without R81 when you flip the switch down you'll short VCC to GND. Boom.


    Humble opinion:
    Because only 1 led will run at any given time...
    You could move R80 to the com line going to ground, and remove R81.
    No go boom and a penny saved is a penny saved. :)

    KK
  • groggorygroggory Posts: 205
    edited 2010-10-07 10:36
    KaosKidd wrote: »
    Humble opinion:
    Because only 1 led will run at any given time...
    You could move R80 to the com line going to ground, and remove R81.
    No go boom and a penny saved is a penny saved. :)

    KK

    But then you'll miss out on some functionality you may have forgotten.

    The states of P9 and P10 won't change correctly.
    The expected operation for P9 | P10 , LED
    UP: 01 , green lit
    Mid: 11, both off
    Down: 10, red lit
  • w8anw8an Posts: 176
    edited 2010-10-07 20:46
    rokicki is right, you don't need R80 nor R81. Don't short them out--just remove them as they serve no purpose
    173 x 156 - 2K
  • groggorygroggory Posts: 205
    edited 2010-10-07 22:57
    w8an wrote: »
    rokicki is right, you don't need R80 nor R81. Don't short them out--just remove them as they serve no purpose

    But P9 and P10 are pins on my microcontroller. Your diagram isn't showing that state change. That's what I was describing in my wording because the picture doesn't make it immediately apparent.

    Thank you. I get it. But you guys are just missing one of my purposes in this circuit.

    :-) Thank you.
  • tonyp12tonyp12 Posts: 1,951
    edited 2010-10-08 10:09
    The schematic shows that the LED have it's own power source.
    And you want the switch just to signal a state to mcu,
    and using open drain with pull up to make sure state is not floating.

    The cool part would be that you can blink the led's in software by turning
    the pin around to an output with a 0 state.
    640 x 318 - 37K
    640 x 456 - 37K
Sign In or Register to comment.