Help with circuit design
Michael @ Afineol
Posts: 33
What components should I use to create an electronic switch so I can have two inputs to a single i/o pin depending on output from a different· i/o pin or pins. I am thinking that a npn or pnp transistor. I actually need to drive 6 mechanical switches·or 6 force connectors (each set, one switch and one force connector goes to a single i/o pin input).· I am concerned (and maybe I don’t need to be) about current on the input that is not active. I am really new to this so any help would be appreciated. I am open to any suggestion.
Mike
Mike
Comments
Mike
I dont do much with RC time circuits, but I recall they charge a capacitor, then time how long it takes to fall below the voltage threshold for the input logic... So, you have to use the pin as both an input and an output, and have the propeller time everything. So, unless the propeller knew you were about to flip a switch, it could be in output mode, and get hit with voltage from the switch... i think that is bad...
Maybe you could work around the problem by adding in a shift register and ADC.
The shift register can input 8 channels of digital I/O on only 3 pins or so.
74hc597 driver
http://obex.parallax.com/objects/381/
Then, you could use an ADC like the ADC0838 (8-bit) or the MCP3208 (12-bit) for the analog inputs from your flex force sensors...
http://obex.parallax.com/objects/459/
http://obex.parallax.com/objects/180/
You could use the ADC as a digital input as well at the same time as the flex force. Just have the propeller decide which it needs to read... maybe use a spare switch input for an extra mode switch.
Does that help at all??
when your line is high... you get the npn... when low you get the pnp
but you still need a sense pin... so you don't really save anything... unless you have already dedicated your sense pins.
shift registers save you drive pins and sense pins...and the code is pretty compact. you can use 3.3V to your sense pins but to be safe put a little resistor in there...400 Ohms-1k.
@_rjo:
did you already try to drive a shift register with the video generator?
PS: Sorry ... mixed it up ... 4019 would be the right one.
Post Edited (MagIO2) : 3/2/2010 7:39:53 AM GMT
-Phil
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
I just got in trouble for being 10 pixels OT over in the sensor forum...
(don't want to do that again[noparse]:)[/noparse]· but to answer your question... no, but I'd be interested in hearing the results.
Mike,
did that do it for you?
Rich
Post Edited (rjo_) : 3/2/2010 5:09:25 PM GMT