Download new product news
Transcript
gate. It then waits for the gate control to indicate that the gate is indeed open. After receiving a gate-open signal, the command center tells the truck to proceed forward. After the truck passes the gate, it triggers another ground sensor, which is monitored by the command center. This indicates that the vehicle is now safely inside the gate. The command center then tells the truck to stop and it informs the gate control to close the gate. The experiment is over after the control closes the gate and informs the command center. Figure 2 shows the apparatus and connections. Figure 3a is a schematic of the truck controller with a single additional MOSFET for turning the motor on and off. Figure 3b is a diagram of the command center with ground optical sensors. The gate controller has a stepper motor interface and optical sensors for opening and closing the gate (see Figure 3c). a) b) COMPONENTS BASIC Stamp 2 microcontrollers control the three electronic modules in the design: the command center, the truck, and the gate controller. There’s a degree of overkill here. Less powerful controllers can be substituted in, but for quick and easy development, I used an interpreter rather than a compiler. The modules are equipped with a Ming Microsystem wireless transmitter (TX-99) and a receiver (RE-99) pair, which are distributed by Reynolds Electronics. Operating at 300 MHz (AM), the transceiver setup is adequate for the short distances of the experiment. The transmitter requires a short (9.36″) wire antenna, whereas the receiver has its own built-in loop antenna. Both modules operate from 5 VDC, drawing a meager 1.6 mA each. The master microcontroller in the command center handles communication and monitors two ground sensors, S1 and S2, which are reflective optical sensors for detecting the truck position. The microcontroller in the gate control monitors two slotted optical sensors to detect gate open/gate close positions. It also controls the stepper motor that operates the gate. The microcontroller in the truck receives command center signals and sends back status data. It also controls 30 Issue 177 April 2005 c) Figure 3—All the modules have RS-232C connections to a PC for programming. The truck controller uses a power MOSFET to control a small motor (a). The command center interfaces to two reflective optical sensors (b). The gate controller uses a stepper motor IC to simplify the process of driving the motor (c). the small siren circuit that comes with the truck. The virtues of the BASIC Stamp 2 are well known. The stepper motor operating the gate, as well as the optical sensors for position direction, is from an old floppy drive. Although an SAA1027 stepper motor driver IC generates the control pulses to operate the motor, you can experiment with other methods. The SAA1027 requires 3 bits to operate its functions: step, direction, and reset. Photo 1 shows the layout and main components. CIRCUIT CELLAR® CIRCUITRY The setup is mounted on a 6′ × 1.5′ × 0.75″ sheet of wood. The circuit boards are screwed into the base with 0.5″ plastic spacers. The command center consists of a BASIC Stamp 2 board, a Ming RX-99 receiver and TX-99 transmitter, and optical sensors S1 and S2. Bit 0 connects to the TX-99’s data input from the BASIC Stamp 2 board. Bit 15 receives data from the RE-99, while bits 8 and 9 receive input status from the optical senwww.circuitcellar.com