ROBOTC.net forums
http://www.robotc.net/forums/

Wired OR for touch sensors
http://www.robotc.net/forums/viewtopic.php?f=14&t=1889
Page 1 of 1

Author:  wleue [ Fri Oct 16, 2009 11:09 am ]
Post subject:  Wired OR for touch sensors

In my opinion, LEGO took a step backwards with the NXT-style cables, in that it is no longer easy to do a 'wired OR' for two or more touch sensors, simply by stacking the bricks that make up the old-style cable ends.

In my current project, I had need to stack 3 touch sensors together in a wired-OR style and have them all talk to the same sensor port on the NXT. I know this can be done using the RXC sensors and an adaptor cable, but I was having trouble getting that to work.

My current solution is to make a wired-OR block out of 4 Mindsensors NXT cable sockets, as shown in the image. I just filed off the projections at the sides of the sockets, glued 4 of them together using fast-set epoxy, and then wired corresponding pins together using a wire wrap tool. Now I can connect 3 sensors together so that if any of them show true, a true value is sent to the NXT brick. The construction of my project, together with software, prevent more than one sensor from being true at any given time, so there is no confusion.

A bit kludgy perhaps, but it works for me.
-Bill

Attachments:
NXT_wired_OR.jpg
NXT_wired_OR.jpg [ 108.81 KiB | Viewed 8433 times ]

Author:  Ford Prefect [ Fri Oct 16, 2009 12:35 pm ]
Post subject:  Re: Wired OR for touch sensors

hi,
to avoid soldering it's maybe more simple to use the rcx-nxt adaptor cables.
you can use the "rcx-side" as usual and plug together as many nxt- (or rcx-) sensors as you like to.

Image

Author:  wleue [ Fri Oct 16, 2009 2:20 pm ]
Post subject:  Re: Wired OR for touch sensors

For some reason, the adaptor cables are not working for me. Simple test: I connected an RCX touch sensor to an adaptor cable, plugged the cable into the NXT, and used the built-in 'View' module to test the touch sensor. There was no response to the sensor being touched.

Tried several sensors, several adaptor cables -- same result.

I wonder if it is possible that I got a bunch of bad cables from LEGO?

In any event, there is no soldering -- just wire wrap.

-Bill

Author:  Ford Prefect [ Fri Oct 16, 2009 3:18 pm ]
Post subject:  Re: Wired OR for touch sensors

I got 12 of those cables, and I never got trouble using them.
neither using nxt nor fischertechnik touch sensors nor electronic shop switches.

rcx sensors I didn't try (maybe they have a different resistor) but if I understood you correctly you also wanted to use nxt sensors..?
did you try reading raw vaues?

Author:  wleue [ Fri Oct 16, 2009 4:12 pm ]
Post subject:  Re: Wired OR for touch sensors

No, I originally wanted to use RCX touch sensors. And yes, I did look at the raw values. That is where I nailed down the problem -- the raw values barely move with the RCX sensors, as opposed to the NXT sensors, where the 'on' value is much, much smaller than the 'off' value.

I even made up some of my own cables using Mindsensors connectors and wire, but got exactly the same result. I do know that with the LEGO adaptor cables, the RCX touch sensors get connected to wires 1 and 2 in the cable -- these are the black and white ones.

So that is finally why I gave up on the RCX sensors and am using NXT touch sensors. It is definitely a second-best solution but at least it gets me a bit more along the way.

-Bill

Author:  mightor [ Fri Oct 16, 2009 4:33 pm ]
Post subject:  Re: Wired OR for touch sensors

Why not use the HiTechnic Touch MUX sensor? I have one and it would be trivial to make it into an OR configuration.

Regards,
Xander

Author:  Ford Prefect [ Fri Oct 16, 2009 5:13 pm ]
Post subject:  Re: Wired OR for touch sensors

sry for my bad English.
in the first line I actually wanted to propose to use the rcx adaptor cables for nxt sensors:

Code:
nxt touch sensors at adaptor cables              2x2 connector
                                                plates
                                                  __
nxt touch sensor1 <------------------------------|::|
                                                  __
nxt touch sensor2 <------------------------------|::|
                                                  __
nxt touch sensor3 <------------------------------|::|
                                                  __
nxt touch sensor4 <------------------------------|::|
                                                  __
nxt touch sensor5 <------------------------------|::|
                                                  __
                                                 |::|-----------------------------> NXT BRICK


using rcx sensors instead was just an alternative to this.

Author:  wleue [ Sun Oct 18, 2009 8:44 am ]
Post subject:  Re: Wired OR for touch sensors

Xander, I just found the HiTech mux and ordered one! By coincidence, I had just stumbled across the new product and came back to this forum to mention it -- but I see you are ahead of me as usual :)

-Bill

Author:  mightor [ Sun Oct 18, 2009 9:48 am ]
Post subject:  Re: Wired OR for touch sensors

Bill,

The Touch MUX is also supported by my driver suite, more info here: [LINK]. You could do something like this:
Code:
if (HTTMUXgetActive(S1) > 0) {
  // one of the buttons has been pressed
  // do something
}


Regards,
Xander

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/