Hi All,
My circuit has two limit switches wired to Arduino's two digital pins which are pulled high through internal pullups.
One of the limit switch always worked while the other one did not.
I must mention, that both are at different locations.
For Limit Switch 1 : two way wire is about 4 meters.
For Limit Switch 2 : two way wire is about 6 meters.
Its the limit switch 2 which was not working. Although when checked manually with multimeter in continuity mode, I could see that switch2 works fine.
Thinking of some prob with longer length having more resistance and drop across the switch 2 wire, which might be causing logic level issues for arduino, I decided to put a 0.47uF capacitor across second switch. Voila, this worked, now arduino detects it correctly.
My question is, am I correct in my analysis and its the voltage drop across the wire is the culprit ?
How does a capacitor solves this ?
Cheers
My circuit has two limit switches wired to Arduino's two digital pins which are pulled high through internal pullups.
One of the limit switch always worked while the other one did not.
I must mention, that both are at different locations.
For Limit Switch 1 : two way wire is about 4 meters.
For Limit Switch 2 : two way wire is about 6 meters.
Its the limit switch 2 which was not working. Although when checked manually with multimeter in continuity mode, I could see that switch2 works fine.
Thinking of some prob with longer length having more resistance and drop across the switch 2 wire, which might be causing logic level issues for arduino, I decided to put a 0.47uF capacitor across second switch. Voila, this worked, now arduino detects it correctly.
My question is, am I correct in my analysis and its the voltage drop across the wire is the culprit ?
How does a capacitor solves this ?
Cheers