vb.net barcode scanner programming Making Your Own RCX Sensors in Software

Creation DataMatrix in Software Making Your Own RCX Sensors

Making Your Own RCX Sensors
Read Data Matrix 2d Barcode In None
Using Barcode Control SDK for Software Control to generate, create, read, scan barcode image in Software applications.
Creating ECC200 In None
Using Barcode generator for Software Control to generate, create Data Matrix image in Software applications.
As we ve mentioned, LEGO provides a number of sensors you can use with the Mindstorms RCX, including sensors for light, touch (simple switch), temperature, and wheel rotation. Several of these sensors namely, the light sensor and the wheel rotation sensor are powered; they require operating juice from the RCX to operate. At first glance, this may seem an impossibility: each input on the RCX has just two connections (there are four contact points on the connector brick, but each pair is wired together, so you can attach the connector with any orientation). However, the RCX uses an interesting circuit connection to its sensor inputs so that a single pair of wires can serve both as outgoing power to run the circuit and as an input. The RCX s approach is to toggle the power to its sensors on and off very rapidly. During the on power times, the sensor receives current to operate. During the off times the sensor value is read. A capacitor in the sensor serves as a kind of voltage reservoir during the off times. The RCX directs power and input to their particular portions of the sensor circuit by using a diode bridge, shown in Fig. 13.3. Connect your circuit as shown, being sure to add a 33 to 47 F capacitor across the V and ground rails; the capacitor is required to keep voltage applied to the circuit during the periods when the RCX is reading the value at the input. You can, of course, also create your own unpowered contact-type sensors. These are easily connected to the inputs, as shown in Fig. 13.4. You simply wire a 470-ohm resistor in series with the switch. The resistor is used because the terminals of each RCX output are powered at 5 volts continuous. The resistor prevents a dead short across the terminals.
Recognizing ECC200 In None
Using Barcode decoder for Software Control to read, scan read, scan image in Software applications.
Make ECC200 In C#
Using Barcode generation for .NET Control to generate, create ECC200 image in Visual Studio .NET applications.
MAKING YOUR OWN RCX SENSORS 169
Printing ECC200 In VS .NET
Using Barcode drawer for ASP.NET Control to generate, create Data Matrix 2d barcode image in ASP.NET applications.
ECC200 Maker In .NET
Using Barcode generator for .NET Control to generate, create ECC200 image in VS .NET applications.
RCX input
Draw ECC200 In VB.NET
Using Barcode generation for .NET framework Control to generate, create Data Matrix 2d barcode image in VS .NET applications.
Drawing USS-128 In None
Using Barcode generator for Software Control to generate, create GTIN - 128 image in Software applications.
Analog input
Making Barcode In None
Using Barcode creation for Software Control to generate, create barcode image in Software applications.
Making Data Matrix 2d Barcode In None
Using Barcode generation for Software Control to generate, create Data Matrix image in Software applications.
Ground
UPCA Encoder In None
Using Barcode drawer for Software Control to generate, create UPC-A image in Software applications.
Print Code 128 Code Set A In None
Using Barcode encoder for Software Control to generate, create Code 128C image in Software applications.
FIGURE 13.3 The basic bridge diode network for RCX active sensors supplies power to the sensor electronics while providing the output signal back to the RCX.
Creating UCC - 12 In None
Using Barcode encoder for Software Control to generate, create GS1 - 12 image in Software applications.
Create UPC-A Supplement 5 In None
Using Barcode drawer for Font Control to generate, create UPC A image in Font applications.
470 SPST switch
EAN / UCC - 13 Maker In C#.NET
Using Barcode printer for VS .NET Control to generate, create UCC-128 image in .NET applications.
Generate Bar Code In C#.NET
Using Barcode generation for .NET Control to generate, create bar code image in .NET applications.
RCX input
Recognizing Barcode In Java
Using Barcode Control SDK for BIRT Control to generate, create, read, scan barcode image in BIRT reports applications.
UPC - 13 Creator In None
Using Barcode generator for Font Control to generate, create EAN-13 image in Font applications.
FIGURE 13.4 Nonactive sensors such as switches can be connected to the RCX via a 470-ohm resistor.
Data Matrix Encoder In None
Using Barcode generation for Font Control to generate, create Data Matrix 2d barcode image in Font applications.
Encode Barcode In Visual Studio .NET
Using Barcode drawer for Reporting Service Control to generate, create bar code image in Reporting Service applications.
There are countless examples of homebrew RCX sensors on the Internet. Rather than repeat these excellent designs, I ve provided a few quick samples here, and I refer you to several worthwhile pages on the Internet in Appendix C, Robot Information on the Internet.
REPLACEMENT TOUCH SENSOR
Figure 13.5 shows a replacement whisker-type touch sensor for the RCX that is made from a surplus leaf switch (often called a Microswitch, after the brand name that made this kind of switch popular). Use the schematic in Fig. 13.4 to connect the switch to the RCX input.
SENSOR INPUT TECHNICAL DETAILS
Here are some useful technical details about the RCX inputs:
I You must set the sensor type in the software before a sensor can be used. This is done
with the RCX Code software that comes with the RCX unit or through a substitute programmer, such as Not Quite C.
170 CREATING FUNCTIONOIDS WITH LEGO MINDSTORMS ROBOTICS INVENTION SYSTEM
Piano or other stiff wire
Wire glued or taped to leaf
Figure 13.5 A leaf switch and small diameter wire ( piano wire or music wire ) makes for a good whisker-type bump sensor for the LEGO RCX. Leaf switch I When used with a nonpowered sensor (e.g., a touch switch), the sensor outputs 5 volts
and can drive up to 10 milliamps (mA).
I When used with a powered sensor (e.g., a light sensor), the sensor nominally outputs
7.5 to 9 volts (depending on battery capacity), with an on/off square wave. The square wave has a period of 2.8 milliseconds; the off period is 0.1 milliseconds in duration (meaning the RCX applies power for a much longer time than it detects the sensor reading). Note that the off voltage is 5 volts, not 0 volts.
Using Alternative Motors and Output Devices
Caution! What follows should be considered for experimental use only. Connecting nonLEGO devices to your RCX can damage the RCX, and possibly the device you ve attached to it. Proceed at your own risk! Like many microcontroller-based electronics, the LEGO Mindstorms RCX uses motor driver circuitry to boost the current-handling capabilities required to drive motors. There are a number of ways to do this, including using bipolar transistors, power MOSFET transistors, and specially made H-bridge motor drivers (all of these technologies are fully explored in Part 3). As of this writing (this kind of thing can change now and then), the RCX uses a trio of MLX10402 motor driver circuits, made by Melexis Microelectronic Integrated Systems, a company that specializes in automotive sensors and control. The MLX10402 includes overload protection against temperature and current extremes and has a maximum rating of about 500 mA, at 9 volts. The chip can handle motor voltages of 5 to 12 volts (with an absolute maximum of 16 volts), though it is designed to be controlled by 5 vdc, which is typical of computers and microcontrollers. Because the device is designed for use in automotive applications, it has excellent thermal ratings: a storage temperature of 55 C to 125 C and a maximum die operating temperature of 150 C. The chip goes into protective fail-safe mode at temperatures exceeding this. You control the motor attached to the MLX10402 by altering just two input lines (set Mode to HIGH), according to the following truth table, which gives you an idea of the capabilities of the RCX:
Copyright © OnBarcode.com . All rights reserved.