Controlling Raspberry Pi Zero Over UART!!!

 

Ok, let’s say we are in an awkward situation, where we don’t have anything other than a Raspberry Pi Zero. No keyboard, no mouse and not even a display. So what can we do now? (Of course, the pi does have an SD card inserted, which contains an OS (like Raspbian), Otherwise, we can do nothing).

insert_SD

Well, there is a way for us to work with a Raspberry Pi Zero (well its possible to work with all Raspberry Pi models in this way) even if don’t have any of the above-mentioned items with us. All you need is a USB to UART converter (and obviously a computer and some jumper cables).

C360_2016-05-02-18-08-09-141

You can have one USB to UART device from our store.

Ok now let’s have a look at the GPIO pins of “Zero”.

GPIO

We can see that the GPIO pins of Zero contain UART pins namely RXD0 and TXD0. Connect these pins to the USB to UART device module in the following order

C360_2016-05-02-18-09-09-439_org

RXD0 of Pi Zero to TXD of the USB to UART device and TXD0 of Pi Zero to RXD of the USB to UART device. And short the ground pins of PI Zero and USB to UART device. Leave other pins unconnected.Now plug in the device to the USB port of the computer.

C360_2016-05-02-18-12-38-550_org

Open any hyper terminal device. I am using putty here. Different hyper terminal devices are available like Realterm and putty for windows, GTKTERM for Linux. You can choose any one of them for this purpose.

serial_monitor

Select serial, and choose the right COM port to which the device is connected and choose the BUAD RATE to be 115200 bits/second. And press enter. The serial monitor is now ready to send and receive data over USB to UART with a baud rate of 115200 bits/second.

serial_monitor_open

Now turn ON the Zero. You can see several prompts, which we usually see in a monitor connected to the pi Zero, appears in the serial monitor.

pi_power_ON

 

Wait till it asks for the Username.

 

Type in the Username as “pi” and password as “raspberry” and press enter (if you haven’t changed the username and password. Incase you ever have changed the username and password type in them.)

after_login

Now the command prompt of the Raspbian in Raspberry Pi Zero is in your hands. Tada!!!

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s