Page 4 of 4
Re: Touch Sensor "Raw" value
Posted: 07 Apr 2012, 19:29
by h-g-t
I note that in the 'Extreme NXT' book, touch sensors are created (in effect) using just bare wires connected to a sensor port.
Does this mean that it is safe to directly connect the relevant wires using just a tactile switch or a relay?
Re: Touch Sensor "Raw" value
Posted: 07 Apr 2012, 20:29
by mattallen37
Yes, I have done it many times. Just don't connect the wrong wires.
Re: Touch Sensor "Raw" value
Posted: 07 Apr 2012, 20:36
by h-g-t
Thanks, Matt.
I want to build a touch sensor array using tactile switches and leaving the resistors out simplifies things.
Re: Touch Sensor "Raw" value
Posted: 07 Apr 2012, 22:33
by mattallen37
You're welcome.
You know, there's a really simple way to "multiplex" switches. All you need to do is put a different value resister in series with each switch.
If you need to be able to detect multiple presses at the same time, the practical limit is about 4 switches per ADC line (NXT sensor port analog input pin).
If you know that only one switch will be pressed at a time (and are willing to get erroneous readings if multiple switches are pressed), there is essentially no limit to the number of switches you can use on one port. I'm guessing the practical limit would be something like 50 to 100 switches (but potentially more than 200).
Re: Touch Sensor "Raw" value
Posted: 07 Apr 2012, 22:40
by h-g-t
Aye, I've read about these but don't need anything that complex.
I just want to connect 4 tactile switches (I bought 100 off ebay cheap) - one to each port with the switches as close to the NXT as possible.
Thought of using them to respond to menus.
Would like to stick them all together somehow to make it easy to mount as a unit but no brilliant ideas so far.
Re: Touch Sensor "Raw" value
Posted: 07 Apr 2012, 23:12
by mattallen37
If you are only going to be using 4, I would recommend using resistors so that you can read them all with one port. It really isn't too complex. This is the same technology used by HiTechnic and mindsensors for their touch sensor "multiplexers".
Re: Touch Sensor "Raw" value
Posted: 18 Apr 2012, 10:40
by gloomyandy
Just to confuse things a little further. There are also Lego touch sensors that were supplied as part of the Cybermaster kit, that are based on switches and which have different resistors in them (the switches are color coded). They look a lot like the RCX touch sensors but the construction is different, you could combine several of these switches in parallel on a single sensor port. See this post for details...
http://news.lugnet.com/robotics/?n=6568
Andy
Re: Touch Sensor "Raw" value
Posted: 18 Apr 2012, 16:27
by sidneys1
gloomyandy wrote:There are also Lego touch sensors that were supplied as part of the Cybermaster kit, that are based on switches and which have different resistors in them[...] [...]you could combine several of these switches in parallel on a single sensor port[...]
link
More interesting is this reply to that post:
http://news.lugnet.com/robotics/?n=6591
Have a nice day,
~Sidneys1
Re: Touch Sensor "Raw" value
Posted: 18 Apr 2012, 17:14
by mattallen37
I knew some of that, but not the specifics. Thanks for those links.