Log in

View Full Version : My proof of concept!



samfranklin
10-20-2013, 11:28 AM
The title made it sound like it's something amazing and it is (for me) but will probably bore most of you. After desperately trying I have finally managed to get toggle switches to work with Jim's Multi program. Break through for me!
8231

JMeller
10-20-2013, 02:51 PM
Fantastic! For stability, I would recommend a pull-down resistor (10K ohm) from gnd to the input pin; this will prevent interference from causing the the pin to accidentally alternate between "HIGH" or "LOW" while the switch is in the open state. Furthermore, I would recommend a protection resistor from the input to the switch leg. The protection resistor should be equal or less than the pull-down resistor.

Louie Mendez
10-20-2013, 04:08 PM
Congratulation bro =)! I know how you are feeling. Keep going and don't stop!

samfranklin
10-20-2013, 04:19 PM
Fantastic! For stability, I would recommend a pull-down resistor (10K ohm) from gnd to the input pin; this will prevent interference from causing the the pin to accidentally alternate between "HIGH" or "LOW" while the switch is in the open state. Furthermore, I would recommend a protection resistor from the input to the switch leg. The protection resistor should be equal or less than the pull-down resistor.
So a resistor from GND to the input pin - could this be done on the bottom of the toggle switch?
And then another resistor from the input pin to the leg on the toggle switch?



Congratulation bro =)! I know how you are feeling. Keep going and don't stop!
Thank you very much!

JMeller
10-20-2013, 05:25 PM
So a resistor from GND to the input pin - could this be done on the bottom of the toggle switch?

Yes, "permanently" connected onto the arduino from GND to pin.


And then another resistor from the input pin to the leg on the toggle switch?

Yes, in series with arduino input pin and the switch leg.

After performing the above, you can remove the delay in your coding loop.

pshz11
11-06-2013, 07:57 PM
Why not to use built-in pull-up? Just use HIGH state as OFF and vise-versa. And no external resistor required in that case.

JMeller
11-06-2013, 08:37 PM
Ah! I didn't know it could be controlled through coding. Thank you for the valuable tip!