Anyone know how this switch works? Rocker switch SKU: 316416
The Pins say R1, J1, and R2 (sig, Vcc, and GN, respectfully)
Thank you,
Andrew
Anyone know how this switch works? Rocker switch SKU: 316416
The Pins say R1, J1, and R2 (sig, Vcc, and GN, respectfully)
Thank you,
Andrew
anyone? been working for hours
The delay may be due to the inadequate information supplied. An SKU is not helpful except in relationship to a specific vendor. The vendor was not specified.
Connect the Vcc pin to 3.3 or 5.0 volts from the Arduino.
Connect the Gnd pin to ground on the Arduino.
Connect the sig pin to an Arduino digital input.
The volunteers who help here are unpaid. Your posts were 1 hour and 34 minutes apart according to the time stamps. That is a pretty short time for unpaid help.
adventurer456:
The Pins say R1, J1, and R2 (sig, Vcc, and GN, respectfully)
Where are you getting this information?
Just check for continuity between pins with switch positions. Putting this on a pcb is stupid, just looks like a spdt or even spst switch.
Here's the only link I could find. Looks like the switch just has 2 terminals.
Shorted is ON or HIGH. Open is OFF or LOW.
There are 2 resistors on the pcb marked 102 (1K) and 103 (10K).
Couldn't find a schematic, but here's my guess:
Thank you,
I don't need the digital output so have left that out. I have current going through the attached circuit but very very very little (the LED is on but very dim).
When I use this switch with my LCD, I get nothing to light up until I take out the switch.
What do I do to get more current to flow through this switch to light up my LCD?
I know V=IR
Thank you,
Andrew
This already has a pullup so make sure your input is just a plain INPUT and not an INPUT_PULLUP.
But it sounds like you are treating this as an in-line analog switch, which really defeats the whole point. You're literally running an LED with a 10K resistor in series. The switch is to tell an mcu what to do, such as control an LED. You should not be using this as a plain mechanical switch. A plain rocker without the dumb pcb is all you ever needed and probably could've bought 50 for what you paid for that hogwash.
Thank you
dlloyd - I have tried adding those resistors to no additional light.
Others - I am using the following code with digital pin 3 and can't get it to change on the serial print when i click the switch. Any ideas on what is wrong?
int pin = 0;
void setup() {
pin = digitalRead(3);
pinMode(3, INPUT);
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
if (pin == HIGH)
{Serial.println(" pin 3 signal");}
if (pin == LOW)
{Serial.println("pin 3 no signal");}
}
Wow, great. I can sense the on/off of the button using the switch with the attached circuit. This project is coming along.
Is there any way for me to turn this into a plain rocker switch?
If I need to buy another one, can someone link me to one that looks similiar to the one I have?
Thanks,
Andrew
byte switchPin = 3;
void setup() {
pinMode(switchPin, INPUT);
Serial.begin(9600);
}
void loop() {
byte pinState = digitalRead(switchPin);
if (pinState == HIGH)
Serial.println("pin 3 no signal");
if (pinState == LOW)
Serial.println("pin 3 signal");
}
Use Arduino internal pullups.
Great. Thank you. It works, but same question.
Is there any way for me to turn this into a plain rocker switch?
If I need to buy another one, can someone link me to one that looks similiar to the one I have?
Thanks,
Andrew
Pay 10 times more than you need to, but if silly things are your style, have at it
Thank you INTP, No circuit attached now.
So i see now that I need a on / off switch with a lot less resistance.
I see that you have posted a switch just like the one I have but not on a pcb.
I don't think that taking the SPST off the pcd will reduce resistance right? What other SPST should I have then?
Thanks,
Andrew
Is there any way for me to turn this into a plain rocker switch?
Sure (you'll need a soldering iron).
... or
... or
dlloyd - I have tried adding those resistors to no additional light.
The diagram was intended to reduce confusion and uncertainty. Kind of like what an election is supposed to do.
Hi,
Welcome to the forum.
Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.
Can you tell us your application please.
Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
Thanks.. Tom...
Thanks. I'm looking for a switch like the one I have (and you posted above) that is an in line analog switch.
Any ideas? Can't seem to find one online. Similiar size and look would be good.
Andrew
Hi,
This is the image you posted;
Can you tell us your electronics, programming, arduino, hardware experience?
If you need a change over switch you need a ROCKER SWITCH SPDT, Single Pole Double Throw.
I don't think that taking the SPST off the pcd will reduce resistance right? What other SPST should I have then?
Yes it will, the switch is just two contacts that open and close, with almost zero resistance.
You want the equivalent of two wires connecting and disconnecting, that is a SPST switch, not the PCB that you have.
PLEASE PLEASE..post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
And a picture of you project.
Thanks.... Tom...
Radio Shack: RadioShack SPST Rocker Switch
Great. I will get a picture of my setup when I get home.
I understand that I need a SPST switch.
ddloyd - I have tried your #1 (connected wires to the solder blobs and also to the two prongs of the switch directly) - there is still a ton of resistance (a single LED shines very dim)
What SPST can I get that will have essentially 0 resistance? How do I know that these other SPST switched people are posting will have essentially 0 resistance?
How do I short out the resistors?
Andrew
P.S. Also my experience is essentially nil. Entire project is about sensing a surgical drill with a hall effect sensor.