How to Access Headless Raspberry Pi Using USB to TTL Converter

by miniProjects in Circuits > Raspberry Pi

16676 Views, 91 Favorites, 0 Comments

How to Access Headless Raspberry Pi Using USB to TTL Converter

thumbnail2.png

There are many ways in which you can access your Raspberry Pi board. Conventional being connecting it to monitor, attaching USB keyboard and mouse; use it as a standard computer. Another method is attaching headless Raspberry Pi directly to network, scanning the network using some software tools to find the IP address of Raspberry Pi and access it remotely. Both of them are quite a hassle, but they have their own advantages.

In this instructable, we explore another way to access Raspberry Pi i.e. using a USB to TTL serial converter.

Lets get started.

Quick Video

microSeries: Accessing headless Raspberry Pi with USB to TTL serial Converter #1

Here is a short video summarizing everything in 2 min.

Click here to watch on youtube.

Advantages of Using This Method to Access Raspberry Pi

Advantages of using this method to access Raspberry Pi are-

  1. You don't have to grab a monitor, keyboard and mouse; attach every thing to Raspberry Pi.
  2. You don't have to configure Raspberry Pi's IP address to access it over the network.

NOTE FOR RASPBERRY PI 3: The Raspberry pi 3 has changed things a bit and you might need to add the option enable_uart=1 at the end of /boot/config.txt. For this to instructable to work.

Things Needed

laptop-clipart-biy7BL4iL.png
usb-ttl-ft232rl-pinout.png
female to female.jpg
IMG_20160917_193221183-01.jpeg

Description: We will remove inconvenience of attaching things to Raspberry Pi by using a laptop. We will connect laptop to Raspberry Pi using a USB to TTL serial converter. To make connection between Raspberry Pi and converter, we will need female to female jumper wires. On software side, we will need serial terminal like GTKterm on Linux and PUTTY on windows machine.

List of hardware:

  1. Laptop (a PC will also do),
  2. USB to TTL serial converter (more on this in next step),
  3. Female to Female jumper wire and
  4. Raspberry Pi.

Software:

  1. GTKterm for linux and PUTTY for windows machines.

What Are USB to TTL Serial Converters

CP2102.png
Pl2303.jpg
Ft232.jpg
converter_pins.png

Description: A USB adapters are type of protocol converters which are used for converting USB data signals to and from other communications standards. Commonly, USB adapters are used to convert USB data to standard serial port data and vice versa. Most commonly the USB data signals are converted to either RS232, RS485, RS422 and TTL serial data. We will use converters that convert data from USB protocol to TTL.

These modules comes in small form factor. At the heart of these modules is a converter chip that does all the protocol conversion. Following is the list of USB to TTL serial converters with different converter ICs.

  1. CP2102 based converter
  2. PL2303 based converter
  3. FT232 based converter

and there are many more.

These converters generally have 4 pins

  1. Vcc
  2. Gnd
  3. RXD (Receive data)
  4. TXD (Transmit data)

Vcc pin can be used as supply to other circuitry. RXD pin is an input pin for this module and TXD pin is an output pin for this module. There are many variants of USB to TTL serial converter with more than 4 pins, extra pins can enable flow control and other stuff.


Note:- As Raspberry Pi's pins are not 5V tolerant (it's only 0-3.3V), make sure your USB to TTL serial converter swings between 0 to 3.3V.

Connection Between Raspberry Pi and Converter

converter_connection.png

Description: We need to make only 3 connections in order to get access to Raspberry Pi. Following is the list of connections.

  1. Connect Gnd Pin of converter to pin number 6 of Raspberry Pi i.e. Gnd of Pi.
  2. Connect TXD pin of converter to pin number 10 of Raspberry Pi i.e. RXD0 of Pi.
  3. Connect RXD pin of converter to pin number 8 of Raspberry Pi i.e. TXD0 of Pi.

Setup Serial Terminal and We Are Done

thumbnail.png

Description: Now that connection between Raspberry Pi and converter is done next we need to connect converter to Laptop. Insert USB side of converter inside the computer. We need to setup the serial terminal to following specs-

  1. Baudrate = 115200,
  2. Bits = 8,
  3. Parity = None,
  4. Stop bits = 1 and
  5. Flow control = None.

Once this settings are done. As soon as you will turn on your Raspberry Pi, you will see basic command line interface on your laptop screen. Enjoy.

That's all for this instructable. Thanks for reading.