In Stock 3WRE Three Wire Converter $39.00
This sensor has been tested with NXT using the Lego NXT conversion cable (W770323). With NXT this sensor should be read in raw mode.
The Mindstorms interface for active (powered) sensors is complex. The three wire converter brick provides an interface that is much easier to use. This brick is intended for people who want to design their own sensor, but don't want to deal with the complexity of attaching directly to the RCX. The converter brick has two functions: 1) It provides regulated 5 volt power to drive your active sensor. 2) It provides a linear mapping of the input voltage to the value read by your program. A linear interface is important because it simplifies using the sensor data in your program.
The converter brick has a Lego bump connector that snaps directly on to your RCX. The other side of the converter has three pins: +5volts, ground, and input. The sensor you build can draw power from the +5 volt pin, while it puts a signal between zero and five volts on the input pin. Your program reads the sensor as a light sensor. The input voltage is read as a program value between zero and 100. A simple application of the converter is to measure the position of a potentiometer. The ends of the pot are tied to +5 and ground, the wiper is connected to the input. You can use your own pot, or try the pot I like.
You can also use the brick as a voltmeter, with a range of zero to 5 volts. Simply connect the positive side of the thing you want to measure to the "signal" pin. Connect the negative side to the "ground" pin. With Robolab you can easilly meausre and graph the power generated by a photocell, or the discharge curve of a battery..
See the technical description below for details on how the three wire converter brick works.
Three wire converter
The Three Wire Converter is supplied with a mating polarized connector, and one foot (30 cm) of thin, flexible cable. The connector is unassembled. You will need a crimp tool or soldering iron to attach the connector to the cable.
Inside the three wire converter. Surface mount parts allow small size with high reliability.
You program the 3 wire converter just like a light sensor. Zero volts input gives a RCX value of zero. +5 volts input gives a RCX value of 100. The RCX value is 20 times the input voltage. (5 x 20 = 100). The program below will turn on output A if the 3 wire converter input voltage is between 2.5 and 3.0 volts.
If you are using Robolab, NQC, or most other languages, you can either program it as a light sensor, or you can program it as a powered sensor in RAW mode. Reading the sensor in RAW mode gives greater resolution. Zero volts input will give a raw value of 1023. Five volts input will give a raw value of around 400.
The Robolab program above uses generic sensor icons to read the 3WRE as a powered sensor in raw mode. The fork test value of 3.5 corresponds to an input of 2.5 volts. A fork value of 2 branches at 5 volts. A fork value of 5 branches at zero volts.
This circuit contains ideas contributed by John Barnes and others in
the LUGNET community.