I don't think it's correct. When either switch goes on, it shorts Vcc to ground!sonolink said:
That's the diagram I had consulted before sending my answer. As you can see, two pins are duplicate, so there's only three pins. You would need two separate ports on the control board with these switches..sonolink said:
Does the input "S" expect a positive level?sonolink said:
A pull-up is a resistor from +Vcc, so the normal state is positive logic level and it expects a contact to ground.sonolink said:what's a "pull-up"? A raise in voltage?
That means there's a pull-up, which generally indicates that the expected trigger is a logis zero.sonolink said:I measured the input at the board. There's 5v between VCC and GND and 5v between S and GND. There's 0v between VCC and S.
That wouldn't be my assumption.So I guess S input expects 5v.
Again, it's an assumption, because it depends on the mechanical construction, but let's assume it's correct.When one switch is triggered it goes to the NO position.
That would work if all the previous assumptions were verified.The S input is no longer fed 5v triggering an alarm. The switch in that NO position allows 5v from VCC to ground the LED through its resistor and lights it up.
SPDT switches are not designed for NO or NC operation. It's the circuit that defines how they are wired.sonolink said:I bought the switches on AliExpress and they won't give me a schemo of them, so I unsoldered the switches and the headers and redesigned the boards to have NC switches in series on X and Y axis. I think these switches are designed for NO operation.
Just checking with you that the board I designed is ok
That's a valuable oiece of info here. When the bed reaches its end of travel, it puts one or the other switch in open position. Since one end is connected to ground, that means that it opens the circuit that was otherwise shorted. It allows the input to go high, under the effect of a pull-up resistor that's built in the control card. The bad news id that you can't connect the switches to LED's. The pull-up resitor cannot deliver enough current and the LED's would probaly fool the logic levels.sonolink said:I'm just trying to add an LED to each switch in this configuration
https://cloud.githubusercontent.com/assets/5912573/22624947/4abbfa48-eb92-11e6-8b16-5fff7d2a6a8f.png
What do you want these LED's for? When do you want them to light?sonolink said:So the only way to have LEDs there would be with a DPDT keeping the LEDs on a different circuit like say on guitar pedals.....mmm, well that's a shame
Enter your email address to join: