New Arduino shield – Phi-1

Add to FacebookAdd to DiggAdd to Del.icio.usAdd to StumbleuponAdd to RedditAdd to BlinklistAdd to TwitterAdd to TechnoratiAdd to Yahoo BuzzAdd to Newsvine

I have developed this shield in my spare time to make prototyping with Arduino much easier. The shield, when assembled, has one LCD monitor, 6 buttons, real time clock and battery backup for keeping time, EEPROM for data storage, GPS connector, buzzer, LED, and two RJ11 connectors for things you absolutely want secured against pull.

Here is a video of a 360 degree view of an assembled Phi-1 shield:

Just running a clock with DS1307 Real Time Clock (RTC) module

Running a testing routine to make sure everything works

Running a fully-functional alarm clock (it woke me up this morning) Details of making the alarm clock is on a separate post. The code is listed near the end of this post.

Morse encoder: type in a sentence and translate it into Morse code.

Function list:

  • 16X2 LCD character display
  • 6 push buttons –  four arranged in arrow keys and two more on the side
  • 2 RJ11 ports for long and robust connections with sensors or control devices
  • Optional buzzer and LED in place of the RJ11 ports
  • Real time clock with battery backup keeps the time when Arduino is turned off
  • EEPROM for easy data logging keeps data when Arduino is turned off. Use 24LC256 or compatible I2C EEPROM
  • GPS connector and breakout for this popular GPS module (
  • Reset button for Arduino
  • All Arduino pins are brought out for maximal flexibility.
  • Hackable for more functionalities (see the end of the assembling)

 Possible projects with this shield:

  • Alarm clock
  • Standalone or PC data logger
  • Lab data acquisition system (Physics, Chemistry etc)
  • Weather station
  • Input or operating panel, like security panels or garage door opener
  • Handheld GPS
  • Morse code generator
  • The list goes on… 


Phi-1 shield documentation revision 11/19/2010

PCB design:


Fully assembled shield running clock:


PCB and parts:

Connector board design pictures:

Standard board breaks out connections from the RJ11 jack and 5V/GND. The prototype space has 5V/GND running down middle for convenience. You can make a TTL-RS232 circuit on it, or maybe power an opamp, add I2C A/D converter to it or else. The screw terminals are pretty convenient and their connections are brought out for prototyping. You can also simply plug it into a breadboard. It also has two LED indicators and has connections for X, Y, 5V and GND.

The relay board has a standard AC or DC relay with control signal coming through the RJ11 jack from the main board. Several screw terminals are included for wiring. A power jack is also included so that it can easily power a single piece of equipment with the relay. You can turn on and off an electromagnetor else light with it. 

This board passes the RJ11 connection to a 3.5mm stereo plug. It also has an LED indicator.

Assembling pictures:

Sample codes:

Clock display This is a basic program that displays the Clock. You can modify it to suit your needs.

Testing all functions This program tests everything, LCD, buttons, the clock, and EEPROM if you have one on board. Learn the basics of everything with this program.

Alarm clock (buzzer and LED) This program is a fully-functional alarm clock. You will find it more complex than the basic clock. If you can’t understand, try the Click display first.

Morse encoder This program allows you to type in a sentence in letters, numbers, and symbols. Then it plays it in Morse code. Use the arrow up and down to type letters (think old-school arcade game record) use left and right to move cursor. Use B to enter.

More to come!

I am coordinating an effort to have it made in a small quantity so it will be affordable. If I have one made, it will cost me around $30, but if I have more made, I could cut the cost down and possibly have it for $12. Leave me a message if you’re interested in getting one. I might be able to get my favorate electronics online store to sell these so you could buy the board along with all needed components in one purchase.

How to connect Arduino with a character LCD

A character LCD can be pretty useful to an Arduino project since Arduino has no display itself. You see them everywhere: vending machines, laser printers, fax machines, etc. You can use the serial port to output information to a PC but that ties the Arduino to a computer. Arduino can do a lot without a PC, taking data and interacting with a user at the same time.

There are many types of LCD, color, mono, dot-matrix, character. A color LCD is always dot-matrix. Some even has touch sensors. We won’t need a color display since information we will display won’t be more useful with a fancy display. The more complex the display gets, the more resources it consumes. An arduino has 20 general I/O lines. A character display uses 6, a dot-matrix display uses 14. In order to use a color dot-matrix display, a microcontroller needs a lot  of memory and send a lot of data to the display, neither of which is what Arduino is best for. The simpler, the better. We will use a mono character display. We need a display for information.

Once in a while you see a teaching equipment company comes up with a handheld all-in-one lab measurement equipment with color display and touch screen. It’s tempting but most of the function it does like spreadsheet, and calculation, can be much better done with even an entry-level netbook. So we’re better off letting what lab equpiment does best, measurement, and leave data analysis to a PC. Enough of unhappy feelings towards teaching equipment companies.

Back to how to hook up a 16 column X 2 row character display.

You can find a very cheap one here:

Make sure you pick up some male header pins and a 10KOhm potentiometer:

An LCD has a total of 16 pins. Here is a list of all pins and functions:

Pin 1 GND

Pin 2 +5V

Pin 3 Contrast

Pin 4 RS (Register select)

Pin 5 R/W (Read or write)

Pin 6 EN (Enable signal)

Pin 7~Pin14 D0~D7 (Data)

Pin 15 A (Anode of back light LED)

Pin 16 C (Cathode of back light LED)

Luckly we only need to connect 6 of above pins to Arduino, and 5 additional pins to +5V, ground, or potentiometer.

If you want to do this on a breadboard, you will need some soft jumper wires.

First, you need to solder the male header pins to the LCD. Just break away 16 pins from your 40-pin male header pins, push them through the LCD pin holes and use possibly this iron ( If you can’t find this in your local store, find a similar one around 30W and a sharp tip.

The LCD won’t stand well on its own with the pins. My trick is to take a piece of eye-glass cleaning cloth, fold it a couple of times, then stick it underneath the LCD as support. First heat up your iron for at least 3 minutes. Then add a little bit of solder to the tip. Wipe excess with sponge. Stick the tip of your iron against the first pin. The first pin takes a while to heat up. Just patiently count to 15. Bring the solder to the pin not the tip of the iron. If the solder melts, good, add around 1/4 inch of solder, wait for the solder to grab on the pin and get sucked in the pin hole. Move on to the next pin. If the solder doesn’t melt, don’t force it against the iron, just wait a few more seconds. When the pin and the hole are both hot enough, the solder will stick or wet them. The curvature is just the opposite when you force melted solder against cold pin.

Finish off all the pins. Check for shorts.

Now push your LCD into your breadboard, keep your Arduino near the LCD. Use a couple of jumper wires, bring the +5V and GND to the breadboard’s power rails. Add the potentiometer near the LCD pin 1. Connect left pin to +5V and right pin to GND. Connect the following LCD pins:

Pin 1 GND

Pin 2 +5V

Pin 3 middle of the potentiometer

This should power the LCD logic and contrast.

Now turn the potentiometer until you can see a row of black boxes on the display. This confirms that your display is working.

Now connect the following LCD pins:

Pin 15 +5V

Pin 16 220 Ohm resistor

The other side of the resistor goes to GND.

This should power up the LCD back light. If the back light is too dim, reduce the value of the resistor. Don’t connect Pin 16 directly to the ground. Doing so will reduce the life time of the back light by a lot. Most spec sheets tell you what to do regarding series resistors on back light. In doubt, try a 150 Ohm. Then gradually dial up or down the number (with a pot) to find the brightness you need.

I would turn my lights off at night and dial the brightness just enough for comfortable viewing in the dark. In this case the back light is not visible in well-lit rooms, which doesn’t need back light in the first place.

Now connect the following LCD pins to Arduino pins:

Pin 4 RS to Arduino digital Pin 7 (green on the left)

Pin 5 R/W to GND

Pin 6 EN to Arduino digital Pin 6 (orange on the left)

Pin 11~Pin14 D0~D7 (Data) to Arduino digital Pins 5~2. (blue, green, orange, white)

From left to right on LCD, black(GND), red (5V), blue (potentiometer middle), green(RS),orange(GND),another orange(EN, sorry running out of jumper wires), not connected (next 4 pins), blue, green, orange, white (D4-D7), red(5V), resistor (to GND)

We don’t need all 8 data pins. The LCD can work at 4-bit data mode, which saves 4 Arduino pins.

Now load the HelloWorld example code in Arduino IDE under examples->LiquidCrystal.

Make sure you change the line with LiquidCrystal(x,x,x,x,x,x); to LiquidCrystal lcd(7, 6,  5, 4, 3, 2);

Compile the sketch and upload it to Arduino. It should show “hello, world” and followed by a second count. If you’ve gone this far, you’ve made it. Go ahead and load more examples and modify them to learn how to work with the LCD. It’s easy, like LCD.print(“This is a message”);

If you want a more permanent installation of an LCD, instead of 12 loose wires, look at my Phi-1 shield. You can directly plug the LCD on the shield to make connection or take it off for a different project.

%d bloggers like this: