Old School Touch Sensor Multiplexing on the NXT

I find that I am often using this approach for getting more touch sensors on my NXT without using multiple ports.  So, for the sake of prosperity, I wanted to keep a record of the setup.

If you are have a set of Cybermaster Touch Sensors hanging around, you can multiplex them for use on the NXT.   Years ago, these sensors were quite rare, but now they can be readily found on Bricklink for a decent price.  For those that are unaware of these sensors, they are the trans-green (clear) touch sensors that come with the Cybermaster kit and look similar to the standard MINDSTORMS RIS ones, but with one significant difference – each of them have an inline resistor so that when the circut is closed, each passes  current with a different resistance.  In addition to this, the value returned varies depending on which combination of sensors is pressed.  So, not only can you detect individual sensors, you can also detect states of multiple sensors being pressed.    If my memory serves correct, you can detect 6 sensor states (1, 2 or 3 | 1 and 2 | 2 and 3|  1 and 3 )

You can program these sensors easily by setting them up as temp sensors using RAW values. You will get values between  0 – 1023.  You can also code in such a way that you are looking for specific values (eg 655), as when a sensor is pressed, the resistance returns an exact value (it does not float between a number range).  Also dont forget that you will need an NXT to RCX converter cable.



Cybermaster Touch Sensor Multiplexer



Sample RobotC program:


#pragma config(Sensor, S2,     multiTouch,          sensorLightInactive)
task main()
{
while(true){
nxtDisplayTextLine(1, “Val: %d “,SensorRaw(multiTouch) );
wait1Msec(20); //give the CPU a break.
eraseDisplay();
}
}

Sample NXT-g program:
NXT-g Cybermaster Touch Sensor Multiplexer

DominoBot NXT (ver1)

May 2006:

Update: DominoBotNXT has been enhanced. See DominoBot2.

For those who do not know about the Lego Mindstorms Developer Program (MDP), back in January of 2006 Lego was seeking assistance from the Lego community on their next generation Mindstorms product (NXT). Approx 9600 people applied to become one of the 100 MDP’s. In late February, I received an invitation to participate and of course jump at the opportunity. For a few months, the group of us were under an NDA (Non-Disclosure Agreement) where we could not talk, show or discuss anything about what we had been working on in the MPD. Now that May 1 has passed, we can now open to discuss some of what we have been up to.

We all had an opportunity to participate in different areas of the testing/development process areas from software to Bluetooth to building robots. Initially, I wanted to get involved in more than one area, but time was limited, so I decided to focus on building only. I wanted to try and re-build my original DominoBot robot to see if I could make a better, more efficient version of it. I also wanted to test the new motors’ built-in rotation sensors – as I needed this functionality.

Read More >>

Climber

Climber – One day while browsing the LEGO Mindstorms site, I noticed some pictures about a show in Germany. LEGO had built 2 cool wall climbing robots to help market the product. I was amazed at the design and capabilities that they had and wanted to find out just how hard it would be to build something like this and have it actually work. It was quite a challenge. Building the components was the easy part. Getting it to climb was (and still is) a challenge. The Climber has gone through another iteration as the one shown here is too heavy. To test the unit, I used a holesaw to cut 2 inch offset holes up a piece of wood plank. The idea would be that the Climber would start with one arm, pull itself up, and the the bottom part would shift. This would offset the Climber to one site and make it easier for the other arm to find a hole and pull itself up. This was to be a big challenge. Read on…

Showing the back of Climber. Features – the cam mechanism that turns the head can be seen at the top. One of the problems that I discovered after building it was that its design was correct in that it had the geometry to climb my test wall. The problem is that it is too heavy for itself. I should have called it Big Mama, cause it ain’t going nowhere but the bottom rung…

Read More >>

DominoBot 2

DominoBot 2 was my take on re-creating my original DominoBot. After I had finished the original,
I found ways to make it more efficient and better at what the original did. I also did not have the limitations of the parts supplied with the RIS and UBS sets.
One of the parts that needed re-designing was the mechanism used to force domino’s out of the chamber. The original tended to have difficulties at times. I devised a mechanism using rack plates (3 – 1×4’s). It is driven by the same motor that moves the loader arm, but the method does not allow slip-up or misalignment. A touch sensor at the full-out and -in positions ensure that Dbot2 knows exactly when a domino has been pushed out and when the rack has reset.

Check out newer versions of DominoBot (NXT).

Read More >>

WallFollower


Wall Follower was one of those “proof-of-concepts” robots.  The intent was to build something small and compact that was fast and versatile.  Wall Follower can navigate around a room, on a table, in a maze, whatever. It is built from one of the basic robot platforms in the Mindstorms Contructopedia. Motion is done by 2 motors, each of which can steer by removing power to one. The main sensor is the DIRPD sensor (grey) mounted on the front. Through programming, the sensor can detect 3 distance ranges, near, far and too-close. The NQC program has a few main tasks. They are:
1) To follow the wall and avoid obstacles without hitting anything using the DIRPD sensor.
2) If it gets stuck, a routine will get it out of the situation
3) If it reaches an area where there is no wall and a drop-off is present. Detect an avoid.

Read More >>

Spaz

Spaz is my take on the famous LegWay robot first built by Steve Hassenplug. The version here is not quite the same as Steve’s, but more like the one built by Philo called “Yet Another LegWay”. The difference being, I did not have the special distance sensors that LegWay uses. Instead, Philo built a version that uses the regular Lego light sensors.

Read More >>

RopeClimber

Rope Climber has been built for the rtlToronto Lego Robotics Event – Rope Climbing.  In a nutshell – build a robot that can find and climb a rope.  Sounds easy right?  Not!  In the tradition of rtlToronto, there are some interesting rules to make this more challenging.  First off – the robot must fit within a 8x8x8 square on start.  The trick – the rope is hanging 12 inches off the ground.  The robot must “grow” to catch the rope.  The robot must also start 36 inches from the rope.  This requires it to be able to drive and find the rope.  The 8 inch requirement also is important to consider once the robot reaches the top.  In order to win, the robot must be above a marker placed on the rope.  This marker will be 12 inches from the top.  This robot extends to 14 inches, so it must also “contract” when it detects it is at the top.
Read More >>

PicoCam

PicoCam was built as a proof of concept.  Its purpose was simple, navigate an area using typical avoidance routines while capturing live wireless video/audio and transmitting it to a receiver. The was never really completed because I had other ideas brewing…  The pictures shown here are of the final version, with working navigation, but I did not bother going the last step to get the live video to display (even though it will work).
Read More >>

TrackerBot

You would think I have a template for “room-navigating” robots… TrackerBot evolved from the recent PicoCam robot I created.  After I had finished PicoCam, I decided I wanted to try something with tracks.  TrackerBot and PicoCam share similar intelligence, with TrackerBot having some slight improvements.  The general idea is that it will navigate a room using a variety of sensory input for obstacle avoidance.  There are 3 Cybermaster touch sensors, 1 DIRP light sensor and 1 line following standard Lego light sensor.

The DIRP light sensor (seen here at the top), does most of the work.  It is set-up as a light sensor and detects left, center and right objects. It does a pretty good job of making sure TrackerBot does not hit things.  The Cybermaster touch sensors are used to detect objects that are low, at the back or out of the line of sight of the DIRPD sensor. They are wired such that all 3 sensors can be placed on one port (more on this after).

TrackerBot is also equipped with a pinhole wireless colour camera.  It can broadcast live colour video with sound to the receiver and show its progress on TV.  It is more of a proof of concept than any real function.  Read on for more details…

Read More >>

BigWheel

Big Wheel (BW) was an experiment at building a robot that uses the HailFire Driod (StarWars) large wheels. It’s job is simple; build an autonomous robot that can navigate any area while avoiding obstacles by not hitting them in the first place. To do this, BW uses a DIRPD sensor to “see” left, right and center. This allows BW avoide obstacles from 3 views before actually hitting them.

Read More >>

Follow

Get every new post delivered to your Inbox

Join other followers: