Playing With Orange Pi Zero, Part 1

Two weeks ago I’ve received my Orange Pi Zero and start to play with it. After some sleepless nights setting up the environment for cross compile, searching the web for some tips and building a circuit, I successfully drive a Nokia 5110 LCD using SPI. A nice thing about this LCD module is, two of its mounting holes matches with Orange Pi Zero’s mounting holes.

I used WiringOP, which is Orange Pi port of WiringPi for managing GPIOs. I did not build native code on Orange Pi Zero, instead, set up a cross-compiler tool-chain, integrated it to Eclipse IDE for a quick and easy to work development environment.

So I am going to show you how to set-up a similar working environment to quickly interact with other hardware using your Orange Pi. I use Ubuntu 12.04 as my workstation, Eclipse as my IDE for C development. Armbian (Ubuntu Xenial) is running on  Orange Pi Zero, it is stable, WIFI and ethernet are both working.

So I am planning this series in three parts:

  • Building the Hardware, Part 1
  • Setting Up Cross Compiler Toolchain and Eclipse IDE, Part 2
  • Building WiringOp and Driving 5110 LCD, Part 3

Building the Hardware

Here are the things I will use for this small project.

A 5×7 pre-drilled PCB, an Orange Pi Zero,  a Nokia 5110 LCD, some 2.54 header connectors, a cooler plate but it is optional for this project. I also add an SHT21 humidity and temperature sensor board to test I2C functionality.

Here is pin-out of Orange Pi Zero, you can get the full schematics here.

Orange Pi Zero Pinout

We must select some pins to control the LCD. Nokia 5110 LCD requires 5 pins.

My LCD module has an 8 pin connector so I use a connection like below:

  1. GND: Ground
  2. BL: Backlight
  3. VCC: Power, 3v3
  4. CLK: Clock for SPI  -> (Orange Pi SPI-CLK pin 23)
  5. DIN: MOSI for SPI  -> (Orange Pi SPI-MOSI pin 19)
  6. DC: Data/Command -> (Orange Pi IO-3 pin 15)
  7. CE: Chips Select ->  (Orange Pi IO-0 pin 11)
  8. RST: Reset  -> (Orange Pi IO-6 pin 22)

Here are the pictures of the steps that I build my board. I use a power jack for quick powering from an adaptor and also install my SHT21 module too.

26 pin header installed for Orange Pi Zero
Power jack and a Molex power connector for future use
5V power connections
I want an easily modifiable system because I use my Orange Pi zero for other projects so I use a connector for LCD
Back side is a bit messy for now
Almost done
Here it is running as expected, a small program that checks Wifi connection and shows some system info like local IP, uptime and free memory.

Leave a Reply

Your email address will not be published. Required fields are marked *