Detect when Propeller Pin is grounded
Luis_P
Posts: 246
I have a 10K resitor connected to one of the Pins on the Propeller and a switch to close to ground. How can detect when the swich ground the resistor?
P19
\/\/\/\
\.
GND
10k switch
P19
\/\/\/\
\.
GND
10k switch
Comments
Well that is my problem, the same switch is connected to another circuit, if I use +Voltage then I have problems. There is a way that not involved +3.3V ?
See Schematic. If I pull the resistor to +3.3V then my other unit has problemsSchem.bmp
The gate capacitance can typically hold its charge for 10ms or more, provided there are no leakage paths.
You still do not give the whole picture! What's the MUX-74? Do you have a datasheet? What's the supply voltage?
See new Schem. The MP3 tigger 3.3-5V, active low inputs with internal pull-ups connected to pins of MUX-74HC4067SMD when the resistor is grounded then play an MP3 file. Schem2.bmp
What do you want to do with the propeller?
What would make sense from my point of view is, read signals from PIN 1 together with PIN 10-14. This way you can find out which track has been selected.
Ok calm down. I know is not pin 1 it just to give an idea of the circuit. I need the propeller detect when the triggers are pull to ground thats all.
Most guys here are very much willing to help. But giving the right advice is much easier if the original post is of good quality. In your case we could have given some better help if you would have given a link to the real schematic and a description of what you want to do in the end. (Which is still not clear)
Do you want to find out the state of all the triggers or are you only interested in one?
Find out which of the 16 switches has been closed with only using 5 pins of the microcontroller is exactly the purpose of the 4067. The cypress microcontroller changes pins 10,11,13,14 periodically to address one of the switches. pin 1 together with the pullup of the cypress uC will then show you if it's closed or not.
So, you can connect pin 1 with a propeller pin and if it goes low, you read pins 10-14 (also connected to the propeller) to find out which switch has been closed.
When any of the trigger pins is pull up to ground I want the propeller to detect and send a message to my ipod to play a video.
I have no problem to communicate the propeller with the ipod so don't get into that...
Gracias
Looking at the 4067 data sheet I think the mux is internally
pulled up by a current source. If you connect the prop's ground
to the mp3 trigger's ground and have the prop sensing pin set as an
input I think you can just read the state. Zero means that
switch is closed and one means open. Just don't connect to
the grounded side of switch
Good luck
Desiko
Furthermore i believe that you can add a pullup on propeller side without any problems for the circuit and replace the resistor going to the switch with a wire - as long as you don't add a bug to your propeller program.
So if you don't have the io-pin connected over the 10k-resistor what voltages do you measure at that point where the 10k-resistor is connected
to the switch.
Voltage if switch is is opened?
Voltage if switch is closed?
GND
Switch---Y----100 Ohm
mux74
GND
Voltagemeter----Y
Do you have a possability to simulate closing the switch by bridging the two contacts of the switch through external wires?
If yes please measure the current if you bridge the switche's contacts with the wires
GND---X----Switch---Y----100 Ohm
mux74
X
Amperemeter
Y
To state the obvoius:
Did you connect the ground of the MP3-trigger with the ground of the propeller?
keep the questions coming
best regards
Stefan
I think I will try this. How do I read the state of a pin on the propeller again?
A sensing pin is what I was looking for. If the normally open push button is pressed then the pin=0 if open pin=1.
Luis,
have a look here at entry #2:
http://forums.parallax.com/showthread.php?133280-Please-Need-help-with-button&p=1021081&viewfull=1#post1021081
Hi, Luis
If you have a Parallax Demo board here is a really simple piece of code to try.
Pin 0 is the input. It's state will be echoed to the LED on P16.
Hope you find it helpful,
Desiko