Microcontrollers in Practice

Chapter 13: Simple RS485 Network with Microcontrollers

13.1 In this Chapter

This chapter contains the description of a device capable of reading the status of a number of digital inputs, or the values of a number of analog inputs, to store this information, and to report it when it receives a specific interrogation from a master device. It is implemented using an AVR microcontroller, and uses a RS485 line to communicate with the master. The aim of this chapter is to introduce the basic concepts of distributed data acquisition systems.

13.2 The Hardware

The simple data acquisition modules described in this chapter are meant to be connected as slaves in a RS485 network, as shown in Fig. 13.1.


Figure 13.1: Block diagram of the network described in this chapter

The master device in this network is a personal computer (PC), which uses one of the asynchronous communication ports (COM1/COM2) connected to the network through a RS232-to-RS485 interface converter.

Two different slave devices are described for this application: one, called SLD, is designed to read and report the status of three digital inputs, such as relay contacts; the other, called SLA, reads the values of three analog inputs in the range 0 2.56 V.

It is possible, in principle, to design and add more slave devices, with different functions, provided that they communicate according to the same protocol as the others. According to the recommendations of the RS485 standard, the total number of slaves connected to the same bus is limited to 32.

13.2.1 The RS232-to-RS485 Converter

This...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Encoder and Resolver Signal Conditioners
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.