July Wednesday 18

Bookmark and Share

Related Articles...

MILWAUKEE WI Arduino Make Space


WANTED: Angle Investor Start-Up Funding

Large Industrial Zoned Arduino Make Space Acquired!

Email :

COASMailBox @ gmail.com

MILWAUKEE WI Raspberry Pi Meet Up Make Space


WANTED: Angle Investor Start-Up Funding

Large Industrial Zoned Raspberry Pi Make Space Acquired!

Email :

COASMailBox @ gmail.com

MILWAUKEE WI Internet of Things (IoT) Meet Up Make Space


WANTED: Angle Investor Start-Up Funding

Large Industrial Zoned Make Space Acquired!

Full Advanced Fabrication Facility, machine Shop, Welding, Electronics Lab Equipment Acquired!

Email :

COASMailBox @ gmail.com

MILWAUKEE WI Machine Repair, & Installation  - Tier 1 Business Support

Machine Technician Mechanic 20+ Years  Personal Experienced In Industrial Factory Machine Servicing, Rebuilding, Installation And Repair - Plus A 35+ Years Experienced Computer Engineer Service Technician Team Ready For Your Outsourced Market Advantage Needs!

Hartung Industrial - Member - CGI Science & Technology Group

Email :

COASMailBox @ gmail.com


RS232&RS485 SHIELD Image

Arduino RS232&RS485 SHIELD V1r1
| Gene's Quick  Lab Ref

2017 OCTOBER | by Gene Casanova

Senior Computer Systems Engineer


"RS232&RS485 Shield V1r1"

The "RS232&RS495 SHIELD V1r1" is an Arduino Shield, development board, providing 2 hardware serial interfaces, RS232 and RS485; for use with the Arduino UNO development board. It is also compatable with other previous Arduino systemboard models based on the same systembaord form (size and layout of PCB header socket connectors).

This development board provides an electronics industry standard 'RS232' serial communication interface UART, and a 'RS485' serial communication interface UART.

An electronics industry standard 'DB9' 9-pin female connector is provided for the RS232 UART.

The RS485 interface is provided with a screw terminal wire block.

The board provides a prototyping area for soldering electronic componants for experimentation.

The board provides a 'mode' of operation setting switch. Switch SW2 to use the RS232 port. Sllide switch to RS485 to use the RS485 half-duplex communcation interface.

UART/Soft serial settting and RS485/RS232 setting switch.

When the 'UART/Soft' serial switch is set to 'Soft Serial' mode, an attached Arduino controller will communicate by software based serial communications.

When switched to 'UART', the onboard UART port is used by the attached Arduino.


The SP3232E IC UART chip provides a RS-232 transceiver; intended for portable or hand-held applications; such as "notebook" and "palmtop" class computers.

The SP3232E has a high efficiency, charge-pump power supply, requiring 0.1µF capacitors in 3.3V operation.

The charge pump enables the SP3232E to deliver true RS-232 performance from a single power supply ranging from 3.0V to 5.5V. The SP3232E are 2-driver / 2-receiver devices. Ideal for portable or hand-held applications. The ESD tolerance of the SP3232E device is over ±15kV for both Human Body Model and IEC61000-4-2 Air discharge test methods.

Meets true EIA/TIA-232-F standards from a 3.0V to 5.5V power supply.

Minimum 120kbps data rate under full load.

Interoperable with RS-232 down to a 2.7V power source.


RS485 UART is provided by a 'MAX481CSA' IC Chip.

The MAX481is a low-power transceivers for RS-485 and RS422 communication. It contains one driver and one receiver. The driver slew rates of the MAX481is not limited, allowing it to transmit at speeds up to 2.5Mbps.

Drivers are short-circuit current limited and are protected against excessive power dissipation by thermal shutdown circuitry that places the driver outputs into a high-impedance state. The receiver input has a fail-safe feature that guarantees a logic-high output if the input is open circuit.

The MAX481 is designed for half-duplex applications

Board Operation

When set to "auto" mode of operation, a GPIO I/O pin to control the RS485 data direction is not needed.

The UART_TX_485 with the FET(Q3) will help control the direction; but it is not perfect.

In this case, the RS485 BUS should be pulled-up (HIGH) with resistor. Otherwise, the HIGH level bit of send byte cannot be sent to the RS485 BUS.

If you use the manual mode,this mean you need a GPIO pin(D4) to control the RS485 data direction If all nodes on the RS485 bus are in receiving mode, the bus voltage is zero, the voltage may case the receiver output zero to mcu.

You should use the pull-up resistor and one pull-down resitor on the RS485 BUS.

If the BUS line are very long, use the terminal resistor.

A Basic Arduino Serial Sketch

Connect an Arduino UNO to a computer usin a standard USB cable. Start the 'Arduino IDE' software development application software.

Start a new "Arduino sketch" in the Arduino IDE work area, and enter the following sketch (source code):

 * Hello World!
 * Sketch for Arduino UNO 
 * This Arduino "sketch" illustrates how to send data out the USB port
 * of a computer connected to the Arduino USB port, using the
 * 'Arduion IDE Serial Monitor' application.
void setup()                    // Execute once, when the sketch starts.
  Serial.begin(9600);           // Serial.begin() from Serial library.
								 // Establish a USB port connection with a baud rate of 9600bps.

  Serial.println("Hello world!");  // send content between double quotes "" and one line break character. 

The Arduino requires void setup(){} and void loop().

"Serial.begin()" is a library procedure-reference.  "Serial" is the name of a library and "begin" is the name of a procedure inside the library.

If no library name is given, then it means the procedure is in the 'default' collection of procedures we use.

Serial."println"() - "println" stands for "print line".  This process sends the content between the "" double quotes to the default Arduino USB serial port.

After entering this sketch, save the file.  Next, upload it to the Arduino.  Open a IDE console window to view the sketch output.

A Basic Arduino Serial Echo

Start the Arduino IDE software application and start a new "sketch".

Put the following sketch into the IDE window and save.

/* Serial ECHO
    by Gene Casanova
    When the Arduino receives a byte on the receive pin of the serial port,
    the byte is sent out on the transmit pin of the serial port,
    back to the sender.
/* Use variable named "byteRead" to store incoming data */
byte byteRead;

void setup() {
// Enable Serial Protocol:

void loop() {
   // Check For Incoming Data:
  if (Serial.available()) {
   // Read Received byte:
    byteRead = Serial.read();
    // ECHO received value - Send Value Out Serial Port:

Upload this sketch to a connected Arduino UNO systemboard.

After this Arduino-sketch has been uploaded to the Arduin, open the Arduino IDE Serial Monitor application - click on the magnifying glass icon, at the top right section of the Arduino IDE window. Make sure the 9600 baud rate is selected in the Serial Monitor application window (console window).

Keep the USB cable connected to the Arduino systemboard during this process, as the USB cable is the serial communication link between the development computer running the Arduino IDE software and the Arduino systemboard.

Open an Arduino IDE 'console' window (the Arduino IDE Serial Monitor) and type in keyboard characters.  Every character typed, will be displayed in the console window.  Every character entered, is sent out through the computer USB port, and received by the Arduino USB interface IC chip (USB port).  The Arduino uploaded program receives the incomming character from the USB interface and sends it back through the USB Tx (transmit) pin on the Arduino. The character is received at the USB Rx (receive) pin on the computer.  This function is referred to as an "echo" in the electronics and communications industries.

At this point, the sketch (source code) compiled and uploaded as "firmware" to the Arduion is working.

Use The Technology Wisely & Keep It Simple

- Cheers!

Gene Casanova

Need More?   Need Help? ........Software, Network, System & Data Center Builder & Developer | Development Services Available - Freelance Small Jobs; To Outsourced Long Term Service Provider Contract Labor Available.

CGI Computer Wares | EST 1979

Send E-MailCONTACT: [click]@CGIComputerWares.com