BASIC STAMP 2 has optoisolated RS-232 interface

Dec. 1, 1997
An optoisolated, half-duplex RS-232 interface can be added to Parallax’s BASIC STAMP 2 with just a handful of low-cost components (see the figure). The circuit implements a switch to change from programming...

An optoisolated, half-duplex RS-232 interface can be added to Parallax’s BASIC STAMP 2 with just a handful of low-cost components (see the figure). The circuit implements a switch to change from programming (non-isolated) to normal operation (optoisolated). The operation in optoisolated mode has the same performance as the normal BASIC STAMP non-optoisolated connection using pins 1 and 2 of the internal built-in serial port.

Diodes D1 and D2 feed positivelevel power to optoisolator ISO1, which drives positive the serial out line (Rx line as seen from the host computer DTE). The negative drive on the serial out line is accomplished passively by mirroring the negative rest level of serial in line (Tx line from the host DTE) through resistor R3. This means that a real DTE device (generating ±10-V RS-232 signals) has to be connected to the RS-232 connector shown on the schematic. During receive operation, the Tx line from the DTE device drives the ISO2 LED, which turns on the common-collector phototransistor.

A switch is needed to disconnect ground for the optoisolators during programming. The BASIC STAMP isn’t able to drive the serial line and the ISO1 LED at the same time. Otherwise, a “Hardware not found” message would immediately appear when attempting to download a program.

The program and RS-232 connectors should never be connected at the same time since, during programming, the phototransistor of ISO2 is subject to a high Vce voltage with no current-limiting. Driving the ISO2 LED would burn out this transistor.

The system has been successfully tested up to 9600-baud half-duplex operation. A final caveat: As in the original BASIC STAMP built-in RS-232 interface, an intrinsic mirroring is wired between the DTE-side Rx and Tx line; i.e., any data sent to the BASIC STAMP will be immediately echoed back to the DTE device. Appropriate software should be employed to circumvent this effect.

Sponsored Recommendations

What are the Important Considerations when Assessing Cobot Safety?

April 16, 2024
A review of the requirements of ISO/TS 15066 and how they fit in with ISO 10218-1 and 10218-2 a consideration the complexities of collaboration.

Wire & Cable Cutting Digi-Spool® Service

April 16, 2024
Explore DigiKey’s Digi-Spool® professional cutting service for efficient and precise wire and cable management. Custom-cut to your exact specifications for a variety of cable ...

DigiKey Factory Tomorrow Season 3: Sustainable Manufacturing

April 16, 2024
Industry 4.0 is helping manufacturers develop and integrate technologies such as AI, edge computing and connectivity for the factories of tomorrow. Learn more at DigiKey today...

Connectivity – The Backbone of Sustainable Automation

April 16, 2024
Advanced interfaces for signals, data, and electrical power are essential. They help save resources and costs when networking production equipment.

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!