RS232 Bricklet

Features

  • Sends and receives serial data
  • Provides RS-232 and UART-TTL interface
  • Configurable baudrate, parity, stop bits, word length and flow control

Description

The RS232 Bricklet can be used to extend the features of Bricks by the capability to send and receive serial data with RS-232 3.3V TTL signal level to comminucate with other serial devices.

Technical Specifications

Property Value
Current Consumption 25mW (5mA at 5V, idle)
   
Baudrate 300 - 230400baud
Parity none / odd / even / forced 1 / forced 0
Stop bits 1 / 2
Word length 5 / 6 / 7 / 8
Flow control Software / Hardware / none
   
Dimensions (W x D x H) 45 x 35 x 17mm (1.77 x 1.38 x 0.67")
Weight 18g

Resources

Connectivity

The RS232 Bricklet provides three different ways to connect to other serial devices: classic D-Sub 9 (male) connector, 5-way terminal block or 5-way pin header. But only one of these connectors can be used at the same time.

RS232 Bricklet pinout

D-Sub 9 Connector

The D-Sub 9 (male) connector uses the RS-232 signal level. To use this connector the RX1 and RX2 pins on the pin header have to be connected by a jumper.

The connector uses the following part of standard RS-232 pinout:

Pin Function  
2 Received data RX
3 Transmitted data TX
5 Ground GND
7 Request to send RTS
8 Clear to send CTS

Terminal Block

The 5-way terminal block provides the same five RS-232 signals (RX, TX, RTS, CTS and GND) as the D-Sub 9 connector with the same RS-232 signal level. To use this connector the RX1 and RX2 pins on the pin header have to be connected by a jumper.

Pin Header

The 5-way pin header provides the received data (RX1) and transmitted data (TX) signals with 3.3V TTL signal level as well as 3.3V and GND. It does not provide RTS and CTS. To use this connector the jumper connecting the RX1 and RX2 pins has to be removed. The jumper can be stored sideways on the RX2 pin.

Test your RS232 Bricklet

To test a RS232 Bricklet you need to have Brick Daemon and Brick Viewer installed. Brick Daemon acts as a proxy between the USB interface of the Bricks and the API bindings. Brick Viewer connects to Brick Daemon. It helps to figure out basic information about the connected Bricks and Bricklets and allows to test them.

Connect the RS232 Bricklet to a Brick with a Bricklet Cable. Connect the RX1 and TX pins with a jumper to make the Bricklet read back its own output.

If you connect the Brick to the PC over USB, you should see a new tab named "RS232 Bricklet" in the Brick Viewer after a moment. Select this tab. If everything went as expected you can now type some text into the input editbox and hit enter. The same text should then show up in the textarea above.

RS232 Bricklet in Brick Viewer

After this test you can go on with writing your own application. See the Programming Interface section for the API of the RS232 Bricklet and examples in different programming languages.

Case

A laser-cut case for the RS232 Bricklet is available.

Case for RS232 Bricklet

The assembly is easiest if you follow the following steps:

  • Screw spacers to the Bricklet with a washer on top of each mouting hole,
  • screw top plate to top spacers,
  • build up side plates,
  • plug side plates into top plate and
  • screw bottom plate to bottom spacers.

Below you can see an exploded assembly drawing of the RS232 Bricklet case:

Exploded assembly drawing for RS232 Bricklet

Hint: There is a protective film on both sides of the plates, you have to remove it before assembly.

Programming Interface

See Programming Interface for a detailed description.

Language API Examples Installation
C/C++ API Examples Installation
C# API Examples Installation
Delphi/Lazarus API Examples Installation
Java API Examples Installation
JavaScript API Examples Installation
LabVIEW API Examples Installation
Mathematica API Examples Installation
MATLAB/Octave API Examples Installation
Perl API Examples Installation
PHP API Examples Installation
Python API Examples Installation
Ruby API Examples Installation
Shell API Examples Installation
Visual Basic .NET API Examples Installation
TCP/IP API    
Modbus API