External switch to Prop
DavidM
Posts: 630
HI,
I have an external switch about 2 - 5 metres away from my prop device.
I wish to read the switch as an input to a prop pin.
Q1) Will the following circuit do this?
I am using a resister divider to minimise the current ( I calculate about 3.2 volts when the switch is pressed)
I am supplying 5v to the switch.
I will use some kind of timing to detect a "PROPER" switch press ( i.e say >100ms) I am not concerned with de-bouncing. just need to know if this circuit will provided enough "VOLTAGE" to the prop input pin.
Thanks
Dave M
I have an external switch about 2 - 5 metres away from my prop device.
I wish to read the switch as an input to a prop pin.
Q1) Will the following circuit do this?
I am using a resister divider to minimise the current ( I calculate about 3.2 volts when the switch is pressed)
I am supplying 5v to the switch.
I will use some kind of timing to detect a "PROPER" switch press ( i.e say >100ms) I am not concerned with de-bouncing. just need to know if this circuit will provided enough "VOLTAGE" to the prop input pin.
Thanks
Dave M
pdf
8K
Comments
Post Edited (Mike Green) : 11/25/2008 2:16:31 AM GMT
Thanks for responding.
According to my calculations this should make about 0.0018 AMPS ( 1.8ma ) through the circuit when the switch is closed.
I used this calculator here
http://ourworld.compuserve.com/homepages/Bill_Bowden/r2.htm
I used..
VOLTAGE = 5
R1 = 1000
R2= 1800
VOUT = 3.2143
AMPS = 0.0018
Q1) what is the maximum current the inputs for the prop can handle?
Thanks
Dave M
Dave M
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·"I have always wished that my computer would be as easy to use as my telephone.· My wish has come true.· I no longer know how to use my telephone."
- Bjarne Stroustrup
Would these resistor values be SAFER?
VIN = 5V
R1 = 5K1 1%
R2 = 10K 1%
VOUT = 3.3V
AMPS = ABOUT 1ma ( i think? )
regards
Dave M
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·"I have always wished that my computer would be as easy to use as my telephone.· My wish has come true.· I no longer know how to use my telephone."
- Bjarne Stroustrup
The short answer for your question is "not really". Current through protection diodes may be a contributing factor in the PLL failures, but not a cause. In other words, if you have a situation close to failure (of the PLL) and add injected currents through the protection diodes, you may push the chip into failure. If you use the diodes for clamping of signals and limit the current to approximately the range specified (and particularly limit the total current for all I/O pins' diodes to avoid shifting the supply voltage), that will not by itself cause problems.
Post Edited (Mike Green) : 11/26/2008 3:48:07 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
To JAZZED - you are saying you don't need a PULL-DOWN resistor ?? Why, Won't the input pin just float?
If the maximum CURRENT AN INPUT pin on the prop is only 0.0005 AMPS ( 1/2 milliamp, or 500uA ) then according to my calculations I will use the following resister values.
VIN = 5V
R1 = 5K1
R2 = 10K 1
VOUT = 3.3V
To MIKE, if I keep the voltage under 3.3v ( by using my suggested resistors above) then why would the diode come into effect??
I also CANNOT see how this is not a voltage divider? if this simple circuit is not a voltage devider then what is?
Regards
Dave M
I just did a breadboard with this circuit
using 2 X 10K resistors works well
ACTUAL VALUES ( using a multimeter )
VIN = 4.97
R1 = 9960 OHMS ( actual value of 10K resistor )
R2 = 9960R OHMS
VOUT = 2.48V
the current is about 0.0002 AMPS
I understand that the prop need at least 1/2 of VDD to register a high which is 1.65V
regards
Dave M