Currently USB has become the de facto standard for almost all PC peripheral devices such as printers and scanners. The “plug & play” nature for the end user is the main reason for its popularity, but still some applications remain anchored to older type standards such as RS232. In general, RS232 is less user-friendly – there are variables to be set up, such as data rate, no of bits, parity etc and then selecting the correct lead (straight or null modem).
USB brings the advantage of a faster data rate than RS232, reducing response times. Also USB generally features improved software giving a more intuitive interface rather than a list of text based commands.
RS232 still remains as the chosen connection for a lot of “stand alone” equipment such as vending machines, where it is used for setting prices and diagnostics. The only problem is that the technician is now more likely to be equipped with a laptop lacking an RS232 port and is required to use a USB to RS232 interface lead. Even this can be a problem if technicians are equipped with SCCs (such as the Asus Eee PC series) instead of a full specification laptop.
There are some other wired and wireless connections, but for peripheral connection, USB offers the simplest and the most secure way of providing improved connectivity. These advantages mean that USB has grown from being used only in PCs, to being found in more and more equipment, such as industrial, consumer and mobile applications.
Existing designs
It is possible to migrate the interface of an established product without a major redesign by designing in a USB controller in place of the RS232 components. Hardware control will be lost, but can easily be replaced by software flow control.
There are a number of modules that can be used for this type of migration, where UART or SPI connections can be brought from the original board. FTDI make a number of these which are self contained in terms of the USB protocol, so that possibly only a minimal firmware change is needed in the original board, if any. Also it means the elimination of having to generate the signal lines for the RS232, simplifying the power supply arrangements by only needing a single 5V supply. Product such as FTDI’s UM232R offers such a “drop-in” solution.
This type of solution suits low volume production or an existing specialised product where a full redesign would not be viable.
New Designs.
With USB being ubiquitous, components and support are readily available. For the development of a new product, there is the process of getting a USB device ID registered so that its drivers can be automatically located. There are a wide range of microcontrollers that directly support USB available from suppliers such as Microchip and Atmel. These microcontrollers are fully supported by development kits.
Wireless USB
Wireless USB is starting to be designed into new products, mainly because it has been held back by largely a similar technology, Bluetooth, which is popular in laptop and most significantly mobile phones.
The first widespread application for Wireless USB is keyboards and mice. The connection is more reliable than other methods such as infra-red and has lower power consumption compared to Bluetooth. Human interface devices do not require as high a data rate as some other applications, and Wireless USB is an ideal solution for HMI devices.
Connections
Host devices use USB “A” type connectors and that the end device use a “B” or “mini B” connector. The alternative is a device that is connected directly to a port, where the “A” connector is part of the device. Host controllers are now found in some instrumentation such as oscilloscopes, both to provide the ability to transfer and to allow storage of settings.
Device controllers can be incorporated into some microcontrollers, for example the PIC18F2553, so the communications with a host can be established without having to add additional interface components. These are supported by a number of development kit options, allowing both the device and the communication software to be optimised.