Hardware Reference
In-Depth Information
If you've been using computers for a few years, you probably remember when almost
every computer came with an RS-232 serial port, but in the last few years, these ports
have been disappearing, and most laptops no longer include them (or they only have
them on the optional laptop dock). Believe it or not, for connecting to the Raspberry
Pi UART serial port, this is actually a good thing. The Broadcom chip that the Rasp-
berry Pi depends on uses 0 and 3.3 V logic levels, not the +/- 3 to 15 V range used by
PC RS-232 serial ports. This means even if you have one of those RS-232 serial ports
on your computer, you'd need a board or adapter to convert the signal levels before it
would work.
RS-232 or Bust!
Here's a pretty good tutorial on how to build a 3.3 V to RS-232 level converter .
The good news is that there is a better way to connect the Raspberry Pi UART serial
port to your computer: USB! Adafruit sells a wonderful USB-to-TTL Serial Cable , which
connects directly to the GPIO pins on the Raspberry Pi and provides a USB serial
device on the other end. This cable has four female jumper connectors on one end
(the end that doesn't have a USB connector). These jumpers have color-coded wires:
red for 5 V power, black for ground (GND), green for receiving data into the Raspberry
Pi (RXD), and white for transmitting data from the Raspberry Pi (TXD). You might also
notice that the USB connector end is larger than normal, because it also has a USB-
to-Serial conversion chip inside it.
To make the physical connection, you simply need to connect three of the female
jumper connectors directly to the appropriate pins on the Raspberry Pi GPIO. The
white transmitting wire goes into the TXD port (BCM Pin 14 (P1-08)), and the green
receiving wire goes into the RXD port (BCM Pin 15 (P1-10)). The black ground wire can
go into any of the GND pins, but for simplicity, we recommend you put it in the GND
pin immediately to the left of the TXD port (P1-06). You can confirm your wiring by
comparing it to Figure 1-10 .
A Hack for the Red Wire
You may note that we did not ask you to connect the red power wire. This
is because the USB serial device will power itself with 5 V at 500 mA directly
from the USB port. You may also note that we said that the Raspberry Pi
UART uses 3.3 V logic levels, not 5 V, and this is true, but the receiving and
transmitting wires are already converted to 3.3 V. It all works fine, stop not-
ing and move on.
There is, however, a cool mini hack you can do with that red power wire.
Because 5 V is going across that red wire, you can use it to power the Rasp-
berry Pi, instead of doing so via the normal mini-B USB connector. Just
 
Search WWH ::




Custom Search