Touch Sensor "Raw" value

Discussion specific to the intelligent brick, sensors, motors, and more.
h-g-t
Posts: 552
Joined: 07 Jan 2011, 08:59
Location: Albania

Re: Touch Sensor "Raw" value

Post 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?
A sophistical rhetorician, inebriated with the exuberance of his own verbosity, and gifted with an egotistical imagination that can at all times command an interminable and inconsistent series of arguments to malign an opponent and to glorify himself.
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: Touch Sensor "Raw" value

Post by mattallen37 »

Yes, I have done it many times. Just don't connect the wrong wires.
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
h-g-t
Posts: 552
Joined: 07 Jan 2011, 08:59
Location: Albania

Re: Touch Sensor "Raw" value

Post by h-g-t »

Thanks, Matt.

I want to build a touch sensor array using tactile switches and leaving the resistors out simplifies things.
A sophistical rhetorician, inebriated with the exuberance of his own verbosity, and gifted with an egotistical imagination that can at all times command an interminable and inconsistent series of arguments to malign an opponent and to glorify himself.
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: Touch Sensor "Raw" value

Post 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).
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
h-g-t
Posts: 552
Joined: 07 Jan 2011, 08:59
Location: Albania

Re: Touch Sensor "Raw" value

Post 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.
A sophistical rhetorician, inebriated with the exuberance of his own verbosity, and gifted with an egotistical imagination that can at all times command an interminable and inconsistent series of arguments to malign an opponent and to glorify himself.
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: Touch Sensor "Raw" value

Post 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".
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
gloomyandy
Posts: 323
Joined: 29 Sep 2010, 05:03

Re: Touch Sensor "Raw" value

Post 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
sidneys1
Posts: 141
Joined: 01 Oct 2010, 14:38
Location: Pennsylvania - The United States of America
Contact:

Re: Touch Sensor "Raw" value

Post 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
My Mindstorms website: http://sidneys1.com
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: Touch Sensor "Raw" value

Post by mattallen37 »

I knew some of that, but not the specifics. Thanks for those links.
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 1 guest