Phi-1 shield

If you are reading this, stop! Phi-1 shield is superseded by phi-2 shield. Please DON’T download code or documentations from this page. For archive only!

Welcome to Phi-1 shield home page!

Best multifunctional shield for Arduino

Thank you very much for purchasing this product! I’ve sold 100 boards in 2.5 months from a store virtually unknown from Arduino community. All support remains the same or better with the new Phi-2 shield! Now we have Phi_prompt and Phi-menu running on both shields.

(Update: scroll down for FAQ section in the bottom)

I have designed this shield to help Arduino new bees to quickly get started with prototyping. I have many fully-functional sample codes (scroll down below the videos), like alarm clock, Morse code trainer, etc that you can load and run. Learn from the code and make your own code from the samples.

(Update: dipmicro is out of stock on the kits right now but if you follow the kit link and purchase the items listed on that page, you will get everything! Alternatively, leave me a message on this thread or visit their ebay store http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=330532350804)

I’m able to have my favorite electronics store dipmicro carry my shield. They have both bare PCBs and kits (PCB with all parts, including the LCD and real time clock!) for sale at $12, and $22, which is a great deal. The kit page contains a list of all necessary parts so if it’s not available, just go through the list to purchase all the parts. Please click the following links:  bare PCB or kit or go to http://www.dipmicro.com/ and search phi-1, select “Search out-of-stock” right below the search box if you can’t find it.

They have a lot of good stuff at bottom-low price that I couldn’t believe. I’ve made countless purchases there. Just a heads up: they will be carrying Arduino boards soon.

Here is a list of its functions:

  • 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
  • GPS connector and breakout for this popular GPS module
    (http://www.sparkfun.com/commerce/product_info.php?products_id=465)
  • Reset button for Arduino
  • All Arduino pins are brought out for maximal flexibility.
  • Hackable for more functionalities (see the end of the assembling)

Here is the bare PCB:

Documentation:

Phi-1 shield documentation revision 01/08/2011

Here is a list of possible project:

  • 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
  • Car parking backing obstacle sensor
  • The list goes on…

Sample codes: (All fully functional, just load and run)

Here is an ever-growing list of videos, from the sample projects above:

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.

Morse encoder/decoder: This one translates both ways. Key in the di and dah to see them translated into characters.

Keyboard tray sensor: pull out your computer keyboard and it plays a tune. Push it back and it plays another tune. Just fun.

Interactive GPS logger

Car backing parking obstacle sensor

Animated characters on LCD

Password input panel

More to come!

PCB design:

Schematic (click to enlarge):

Here is some pictures:

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:

FAQ:

  1. How do I get the 2-pin, 6-pin, and 8-pin female headers pictured in your parts photo?
  2. Where do I get an EEPROM, the GPS connector, and the GPS module?
  3. Where to get a decent soldering iron for the assembling?
  4. How do I solder the headers so they don’t end up tilted or rotated?
  5. How do I enable the LCD?
  6. How to choose LCD back light resistor?
  7. How do I secure the LCD to the shield, besides pushing the headers together?
  8. How do I test my assembled shield?
  9. How do I make use of the RJ11 connectors?
  10. My EEPROM/RTC test didn’t pass. What should I do?
  11. Which way do the buzzers and LEDs go on the board?
  12. Can I use other pins for I2C bus?
  13. What pins can I use for my project, sensors and etc?
How do I get the 2-pin, 6-pin, and 8-pin female headers pictured in your parts photo?
I take one 40-pin female header (hope you bought two as required on the parts list), then I use a regular 45 degree cutter ($2USD at a hardware store) to cut it to the size I need. Say I need a 6-pin female header, I take a row of female headers, clip on the 7th pin on both the pin side and the hole side, this destroys the 7th pin but after trimming the edges, I get a 6-pin header. I will then trim off the edge on the rest of the row of female pins, then cut one more time to get another header out. Remember, if you need a header with 6 pins, cut on the 7th pin so you get a complete 6-pin header. So for a 40-pin female header you will get say 8(keep)-1(break)-8(keep)-1(break)-16(keep for lcd)-1(break)-2(keep for 5V/GND)-1(break)-2(keep). Break indicates you destroy the pin to separate into the size you need. Then use the other 40-pin header row to get one more 8 and two 6. Here is an illustration:
Where do I get an EEPROM, the GPS connector, and the GPS module?

Here is a list of the links to the vendor:

Where to get a decent soldering iron for the assembling?
I have used both a corded and a cordless iron. I like the cordless one slightly better because it is not as intimidating as the corded one.
Corded: radioshack basic soldering set for $7.99
Cordless: Weller BP860MP cordless dual-power soldering iron for less than $20 depending on where you buy.
How do I solder the headers so they don’t end up tilted or rotated?

The best way is to tape the headers to the board using masking tape. You will wrap the header with tape only leaving one pin exposed for soldering. Then solder this one pin so the header will not move when you remove the tape. After that, solder all rest pins, starting from the opposite end to the first soldered pin.

How do I enable the LCD?

Jump pin 0 to pin 7 (purple jumper on picture). Jump pin 1 to pin 6 (green

jumper on picture). This enables the LCD. Make sure that there are no male pins on arduino pins 0 or 1. If there are, then cut them off at the bottom with a pair of wire cutter. See the following picture, the arduino pins 0 and 1 are NOT supposed to be connected.
DO NOT solder pins at 0 and 1.
I once forgot this and I put pins on the arduino pin 0 and 1. I had to cut them off with a wire cutter, not too hard to do.
How to choose LCD back light resistor?
My basic rule of thumb: start with a large resistor (300Ohm), reduce it until you’re satisfied with the brightness of the back light. Remember the back light doesn’t have to glow visibly in a well-lit room. You just need it bright enough when all lights are out. This saves battery and life time of the back light.
Say you bought this from dipmicro (http://www.dipmicro.com/store/LCD-1602A-B), its spec sheet is here (http://www.gzliyedz.com/download/yjpzf/162-4.pdf)
It says V=4.1 I=120mA about the back light. This current is kind of big but with calculation, you need 7.5Ohm resistor. I would use a larger value like 150 Ohms. I don’t want my backlight to burn so bright that it reduces its life time. All you need is when the lights are turned off in the room, the back light makes the display totally visible.

http://www.sparkfun.com/products/709
This is very similar to the one dipmicro sells. The comments are quite helpful too.

How do I secure the LCD to the shield, besides pushing the headers together?
There are three mounting holes on the shield that line up with the LCD mounting holes. Since the LCD mounting holes can vary a bit from manufacturer to manufacturer, I didn’t put a specific screw size there. I would go to a local hardware store (like aces) and go to the screw/nut sector to hand pick some. You will need a standoff between the LCD and the shield. I ended up using M4 standoff and M4 screws. They’re a bit too large but are available to me. I just screwed the screw through the board holes to open it up by just enough. Then screw down the standoff till it fits. Nothing fancy.
How do I test my assembled shield?
First, you want to visually inspect everything to make sure there are not short circuits. Then carefully plug the shield into arduino while the arduino is not powered. Supply power to arduino. If arduino will not be recognized by the computer, then you have a short, which draws too much current that it trips the resettable fuse on arduino (bless the arduino designers for this feature). Check again. Remove excessive solder with some solder wick (radioshack) or solder sucker.
Once arduino powers up, load the test program from the list of codes on this page, test everything. If you don’t see any message on the LCD, adjust the trimpot all the way to find the best spot for a good contrast. Without a proper setting on the pot, the LCD messages will not be visible.
How do I make use of the RJ11 connectors?
I will be posting connector boards for the RJ11 connectors. At the same time, I will try to ask dipmicro to carry these small boards as well. Check on my blog and dipmicro on updates. You may save time and money if I make like 100 of them and have dipmicro offer them for sale, other than you making 2 of them at a higher cost.
My EEPROM test didn’t pass. What should I do?
First make sure that the EEPROM is supported (24LC256, 24LC512, or 24LC1024). Also make sure the RTC is supported (DS1307). There are a few things that might have gone wrong. First, you may have placed the EEPROM and the DS1307 RTC in the wrong slots. Check to make sure they sit in their right sockets. You may feel the RTC burning hot. Disconnect the shield and wait til the chip is cool enough to handle. Also check to make sure they sit in the correct orientations. On the white silk screen, there is a half circle, which should match the half circle notch on the chip.
Which way do the buzzers and LEDs go on the board?

For the buzzer slot, on the PCB, top hole is positive and bottom hole is negative. It is important.

For the LED, the left hole is negative and right hole is positive. You can also look at the the cut on the side of the LED, which should face left, as indicated by the white silk screen on the PCB. Normally, the short leg on the LED is negative and the cut is also negative side.

Can I use other pins for I2C bus?

The I2C bus on ATMEGA 328 chip (heart of Arduino Duemilanove and UNO) is multiplexed on the analog pins 4 and 5. This means the hardware I2C function block is hardwired to these two pins. You can’t move these to other pins. On Arduino MEGAs, these pins are digital 20 and 21. I don’t think you can move them either. All shields that use I2C bus will have to comply.smiley

There are software implementations of I2C bus by some people but that slows the arduino to a grinding stop. With software, arduino has to check on the I2C bus so often that it has no time to do other stuff. With hardware, arduino just gets stopped if there is something coming in and doesn’t have to check on the bus all the time. My best analogy is software checking is like tending babies, you can’t step away. Hardware I2C is like tending teenagers, you can do your stuff until they come to you with requests (often money).

What pins can I use for my project, sensors and etc?

Section 5 from page 3 to 4 and Table 2 on page 4 detail the pin usage on the shield. All the LCD related pins are tied to the LCDs and should not be used for other stuff. Digital 12 and 13 are not connected to anything on the shield. Use them any way you like. The button pins can be used for your sensors as long as you’re not pressing them. Among the 6 analog pins, the first 2 are connected to buttons B and A so you can use them if you don’t use these buttons. then analog 2 and 3 are channeled to the buzzer and LED, they’re free to use if you don’t connect the buzzer or LED. Analog 4 and 5 are hardwired to I2C bus so to use them, you need to remove the real time clock and EEPROM. That’s the ATMEGA requirement.

17 Responses to Phi-1 shield

  1. Pingback: Morse encoder and decoder « Liudr's Blog

  2. Pingback: How to connect Arduino with a character LCD « Liudr's Blog

  3. Pingback: Your keyboard drawer greets you! « Liudr's Blog

  4. Pingback: How I soldered header pins for arduino shields « Liudr's Blog

  5. Pingback: Arduino alarm clock with Phi-1 shield « Liudr's Blog

  6. Pingback: Connect Phi-1 shield with an EM 406A GPS « Liudr's Blog

  7. Pingback: Fully functional Arduino GPS logger « Liudr's Blog

  8. John Feeney says:

    Would this LCD shield also work for the Netduino? I have no electronic background but wish to put together some sensors and LCD to try the Netduino. I have Visual Studio and I am comfortable with C#. Also, if this will work for Netduino, would there be a driver for this or would I have to create a driver for my code?

    • liudr says:

      John, I just read the netduino.com. It is pin compatible with the mainstream Arduino (http://netduino.com/netduino/specs.htm)
      So my shield should work just fine on netduino. On the other hand, the netduino is a new thing and just started, possibly in the summer. I was hearing about it around the same time. Their forum admin started on 7/18/2010 😉

      I think the biggest challenge for you to get started with netduino is there’s not many people using it. You will have trouble receiving help. On the other hand, arduino.cc has countless members, myself being one, and has an extremely lively online community, where people go to ask questions and get answers. The Arduino IDE is not C# but compiles C++ so you should have no trouble with.

      All my codes depend on a few key Arduino included and contributed libraries: Arduino Core, LiquidCrystal, Wire, NewSoftSerial, and TinyGPS. The netduino may have LiquidCrystal as I saw one LCD on their example but I’m having a hard time finding any code on their website. My huntch is that they have wire, softserial but not tinygps, so you either wait for them to catch up with arduino or write a bit of code yourself to interpret GPS language, not bad but less fun.

      Long story short:
      Is Phi-1 shield compatible with netduino on hardware level? Absolutely!
      Is it compatible with netduino on software level? Mostly and the longer you wait the more compatible since netduino people are possibly closing up the gap between them and arduino.

      So suggestion? I’d buy one. It’s fun to try things.

  9. Pingback: GPS tracking – trip to the Cities « Liudr's Blog

  10. Pingback: Arduino parking sensor « Liudr's Blog

  11. Pingback: Arduino character art on LCD « Liudr's Blog

  12. Kyani says:

    Nice blog here! Also your website loads up fast! What host are you using? I wish my website loaded up as fast as yours lol

  13. Pingback: Phi-menu is about to be released! « Liudr's Blog

  14. leselaster says:

    Hello,

    I have update my arduino to 1.0 and am using your shield Phi-1 v. 1.8 10182010. I tried all your updated libraries including Phi_2_testing_v3, morse_translator_v5, clock etc. but the lcd doesn’t show up anything anymore and only the first line is activated. Are there some other modifications I have to make?

    • liudr says:

      There is a change of connections between phi_1 and phi_2 so pay attention to the pin definitions of the new files you downloaded regarding pins 3 and 4 you will realize they have been swapped between phi-1 and phi-2 😉 Swap them and you should have everything working. I have both so I make mistake sometimes forgetting to switch the pin definitions 🙂

Leave a Reply