Robotics/Computer Control/The Interface/Networks

Sometimes a single µcontroller isn't sufficient to control your robot. Then you'll be needing a way to connect all those µcontrollers, preferably without sacrificing too many pins or expensive ICs. Of course this problem has been solved a long time ago and there are quite a number of different standards each having their own advantages and disadvantages.

Standards edit

There are many different standards on connecting 2 or more µcontrollers (or computers), but here are the most used standards:

(See Serial communications bookshelf for more detailed information about serial communication standards)

I²C edit

Inter-Integrated-Circuit-bus or Two-wire serial bus: Used to connect ICs on a single board. The bus has one clock and one data line. Both the clock and data line are pulled high and device only drives the lines low. There are plenty of ICs available with build-in I²C interface including many of the modern µcontrollers.

µcontrollers with build in I²C support:

  • ATMEGA8
  • ATMEGA16
  • ATMEGA32
  • ATMEGA64
  • ATMEGA128
  • ATMEGA8535

Some I²C ICs:

  • MAX5380/5381/5382: 8Bit DAC
  • PCF8574: 8bit I/O-expander for I²C-bus
  • LM75: digital temperature sensor

The I²C protocol can also be performed in software and is usually referred to as bit-banged I²C.

See:Philips Semiconductors

RS232 edit

Recommended Standard 232: Better known as the serial port on a PC. Used to connect two devices.

See: Further down the page

RS422 edit

Recommended Standard 422: industrial version of RS232. Much better than RS-232 at resisting interference.

See: RS422 tutorial

RS485 edit

Recommended Standard 485: Better version of RS422: allows more than 2 devices to be connected together. (usually up to 32 devices)

RS232 <-> RS485 converters:

  • LTC485CN8: DIL8
  • SN75LBC176D: SOIC8

See: RS485 tutorial

CAN edit

Acronym stands for "Controller Area Network." More complicated network. Used in automotive and domotica. Originally developed by Bosch in Germany. Limited to 1 Mbps in theory; with required overhead, protocol is slower than 1 Mbps. Data is delivered in packets of 8 bytes. CAN is frequently referred to as CANbus.

See: Philips Semiconductors

1wire edit

This bus uses 1 wire to supply power and communication to a IC. Used for temperature sensors and other low-power ICs. Despite the name, a second wire, ground, is used to complete the circuit. Data is sent to the IC by switching the wire between high and low. A built-in capacitor provides the IC with power during the low parts of the signal. This bus is intended for low-power devices, like temperature sensors.

See: Maxim-IC

SPI edit

SPI(Serial peripheral interface) is a 4-wire full duplex bus. The bus has a clock, transmit, receive, and select line. One device controls communication on the bus. When connecting multiple devices, each device is connected to the master with a separate select line and the master selects only one device at a time.

Further reading edit