SDi-12 + GPS USB adapter test

I was able to perform some tests on the new SDI-12 + GPS USB adapter. I don’t have the GPS module but do have an arduino shield that features the same GolbalTol GPS module so I used some jumper wires to connect the GPS to the adapter. I did tests last night and overnight. Things are looking good. Here are some results:

Commands:

To get longitude and latitude, you will issue “zM!”. The return values are z(long)(lat)\r\n. The longitude and latitude are both in standard NMEA format of 100*(degree.minute). For instance, a longitude of -9412.3411 means -(94 degrees 12.3411 minutes).

To get day, month, and year, you will issue “zM1!”. The return value is again in standard NMEA format of +DDMMYY. For example, a date of +190317 means the 19th of March, 2017.

To get hour, minute, and second, you will issue “zM2!”. The return value is also in standard NMEA format of +hhmmss. For example, a time of +123507 means 12:35:07 in 24hr style so it is 12:35:07 PM for those that use 12hr style.

Sample commands (in red) and returns (in green):

Single-sensor measurement:

zM!
z0012
z
zD0!
z-09456.1234+4578.9012
zM1!
z0011
z
zD0!
z+190317
zM2!
z0011
z
zD0!
z+065402

Concurrent measurement:

zC!
z00102
zD0!
z-09456.1234+4578.9012
zC1!
z00101
zD0!
z+190317
zC2!
z00101
zD0!
z+065713

Phi-shield revised and released

phi-3-shield-on-in-hand

It has been a while since I gave the phi-shield a major revision. I’ve been working on this for a while and now I am releasing the Phi-3 shield. This shield continues to support user interaction with LCDs and buttons. Here is a list of the features:

The following hardware are provided by the shield:

  • 20X4 LCD with back light on/off control
  • Six buttons (up/down/left/right/B/A)
  • Two LED indicators
  • Speaker
  • MicroSD card slot
  • Real-time clock (DS3231)
  • EEPROM (32KB 24LC256)
  • Connector for Adafruit Ultimate GPS module or Bluetooth module
  • Stacking headers for easy access to all pins.
  • Recessed board right edge for easy access to MEGA’s 18X2 pin headers on the right side.
  • Reset button

phi-3-shield-lcd-side-by-side

The following software functions are provided by various supporting libraries:

  • User-selectable menu (LCD + buttons)
  • Number and text entry (LCD + buttons)
  • Scrollable long text (LCD + buttons)
  • Date and time (DS3231 or GPS)
  • Location (GPS)
  • Data and configuration storage (MicroSD card and EEPROM)
  • Playing simple tones (speaker)
  • Indicators (LEDs)
  • Wireless connection (Bluetooth module)

phi-3-shield-lcd-removed-annotated

There are three tiers of Phi-3 shield kits: kit0, kit1, and kit2, none of which includes a GPS module. The kits are immediately available. Buttons with color caps as pictured will be included while supplies last.

Here is the Phi-3 shield’s own page. There are links on the page to make purchases. Or you can visit the BUY page to see what stores carry this shield.

Phi-3 shield

Video demonstrations will be available next week. Meanwhile, the support of Phi-2 shield will remain. If you need Phi-2 shields, I have them available.

phi-3-shield-bottom-rtc-lcd-wire-removed

phi_prompt 1.0 beta release

I am happy to release the beta version of the phi_prompt library. There are sample codes to get you started while I work on adding a few functions for beginner programmers and finishing the documentation. Except for the init function, everything is the same as the 523 version. Now it’s compatible with arduino 1.0 and uses phi_interfaces library as the physical layer for inputs.

Library download includes phi_prompt, phi_interfaces, sample codes, and modified TinyGPS (by Mike Hart) to run on arduino 1.0:

http://code.google.com/p/phi-prompt-user-interface-library/downloads/detail?name=libraries.zip&can=2&q=#makechanges

GPS logger program version 5 is also available if you have a phi-2 shield 2004 and a GPS module:

http://code.google.com/p/phi-prompt-user-interface-library/downloads/detail?name=Phi_2_project_gps_logger_v5.zip&can=2&q=#makechanges

Shopping trip with GPS logger

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

Now that I have built a GPS logger with my Phi-1 shield and arduino, I decided to take a trip to a local supermarket for a test run.

I used a car adapter (12VDC) to power my arduino. It took quite a while for the GPS to pick up signal, maybe because it was raining outside (raining in Minnesota winter? Really?)

Here is the map I got using GPS visualizer from http://www.gpsvisualizer.com

Everything seems nice although further zooming indicates that I “was driving on the other side of the road”. I guess commercial GPS does a lot of averaging to stabilize their readings. Next time I go to the cities I will carry it with me to record my trip for sure.

Fully functional Arduino GPS logger

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

There exist endless ways that you can use a GPS sensor in your projects. Geocaching and reverse geocaching are just two typical applications. Last time I made an attempt to use GPS with Arduino and my Phi-1 shield and it was a great success. The GPS sensor fits nicely under the LCD and I got lattitude and longitude readings of my home (checked on google map). This time I made up my mind to make it into a fully functional arduino GPS logger. It will feature a menu to choose from many functions including:

  1. Send data to PC
  2. Erase EEPROM
  3. Record GPS to EEPROM
  4. Display GPS coordinates on LCD
  5. Parameters

It took me more than one whole day, thanks to the winter break, to finish all the above and again provide the code freely to anyone that uses it non-commercially. If you use this commercially, come on! Don’t you think a whole day’s work deserve something especially if you’re planning to use it for montary gain? 🙂

Here’s some details:

Menu gives you several choices:
* Send to PC: sends recorded GPS information to PC via the USB connection.
Two modes are available:
Verbose mode generates information as shown below.
Non-verbose mode sends only the column labels followed by tab-separated data, ideal for spreasheet programs to import. You may copy and paste.
* Erase EEPROM: erases the EEPROM
* Record: records GPS information, lattitude, longitude, altitude, date, time, speed to EEPROM
* Display: displays the GPS coordinates without recording
* Parameters: allows the user to adjust parameters such as period between two consecutive recordings, PC data format, to start recording at which data entry and end at which entry.
* Up and down cycle through the menu options.
* Left, right, B act as confirm or enter.
* A escapes and only will preserve the latest value.

The verbose mode outputs human readable format but takes longer time as the USB link is only as fast as 115200BPS:

(I’ve blocked out the last 5 digits so you won’t find my exact location on map:)
Lat/Long(10^-5 deg): 45xxxxx, -94xxxxx Date(ddmmyy): 291210 Time(hhmmsscc): 5170500
Alt(cm): 33470 Speed(mph): 1.64

This is easy to read but very hard to import into a spreadsheet to analyze. So I added a non-verbose mode (choose under parameters). Here is its non-verbose output:

Lat(10^-5 deg) Long(10^-5 deg) Date(ddmmyy) Time(hhmmsscc) Alt(cm) Speed(mph)
45xxxxx -94xxxxx 291210 5170500 33470 1.64

(I’ve blocked out the last 5 digits so you won’t find my exact location on map:)
The above output can be copy+pasted to excel.

To make this GPS logger, you need the following:

Phi-1 shield kit from dipmicro.com

Arduino Deumilanove or Uno from sparkfun.com

GPS module from sparkfun.com

GPS connector from sparkfun.com

Here is the main page of the multi-functional Phi-1 shield, where you will find documentation, assembly guide pictures, and FAQs.

Here’s a picture of how to connect the GPS to the shield (only 3 wires are needed): If you have been following my posts, please make the change of wiring. On my last post, I used analog pins 0 and 1 to connect to the GPS. This was my first attempt and it cost me the two buttons B and A (since they’re using analog pins 0 and 1). This time I realized I only need one pin since I am not talking TO the GPS, rather, only LISTENING to it. So I am using pin 12 for this.

Here is a picture of the shield powered up and displaying menu:

Everything fits nicely together. Here is a side view:

Here is a video of the action: In the video I just went through the menu items and sent GPS data to PC. Next time I travel (even to work), I will take it and record my trip 🙂

Most importantly, the code:

Download code

TinyGPS library

NewSoftSerial library

A Phi-1 shield is needed. Please consider purchasing this multi-functional Phi-1 shield if you plan to prototype anything including LCD, GPS, clock, EEPROM, buttons, speakers, etc. I am sure you will enjoy it.

Connect Phi-1 shield with an EM 406A GPS

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

Have you thought of making a fun Geocache box for outdoor adventure or a wonderful reverse-Geocache box for friends or loved ones? Maybe you want a GPS tracker for field trips or position-sensitive projects? Yes, you can buy a GPS shield from sparkfun but then you also need other functions for your project, like an EEPROM to log positions and LCD with push buttons, then a real time clock in case your GPS loses signal. Maybe add a speaker. Then you need a bunch of shields. Asume they are all compatible with their pins (good luck if they’re made by different people), then as your shields stack sky high, so is your cost. 

My Phi-1 shield can solve this problem. It easily connects to a 16X2 character display onboard, 6 buttons, speaker and LED, real time clock, EEPROM, and GPS connector. The board design has a surface mount connector to incorporate an EM 406A GPS. But I have not been able to purchase a GPS module till recently so here goes how to add a GPS onboard and make this shield a multi-functional sweet tech pie 🙂

First, purchase a Phi-1 shield from dipmicro. I would go with the kit. If the kit is not available, just go down the page and purchase the items listed below. If the yellow LCD is not available, buy a different one. If the variable resistor is out of stock, buy another one like this. The only thing missing is an EEPROM. It really depends on how much storage you need. I use this but you can also buy the 1024KBit version for more space.

Then, purchase a GPS module and connector socket from a reputable vendor. I purchased mine from sparkfun:

GPS module:

EM 406A

Connector socket (to be soldered on the Phi-1 shield):

EM 406A compatible socket

I would purchase at least two of these sockets since they’re tiny and may get damaged if not soldered properly.

If you have not yet soldered your Phi-1 shield, make the above socket your priority. It is easier if you don’t have already soldered all parts that will be in the way when you solder this socket. If you have not handled surface mount components, google a few videos on how to hand solder them. I did it just by carefully soldering with a fine soldering iron tip and patience.

My suggestion: set the board on a flat surface. Put the socket on the board. Position the socket so that it is lined up with the solder pads. Make sure you get the right orientation. First solder the two side pins (possibly strain releif). Heat your iron, clean its tip, add very small amount of solder. If you see a solder ball forming on the tip, wipe it off. Then carefully place the tip on the solder pad and the side pin and hold it there for several seconds. Once you can see the solder start to move to the solder pad and the pin, hold a few moment and move to the other side pin. Occasionally the surface tension of the solder is large enough to drag the socket out of alignment. Just watch out for that.

Once the side pins are secure, check to make sure the solder pads on the PCB are lined up with the pins on the socket. Repeat with the minimal solder and hold the tip on the pin to solder all 6 connections. When done, inspect with a magnifying glass to make sure there is no shorting.

Now solder six female pins to the holes that break out the socket connection, just above the socket. Also solder the 5V and GND with female pins to its right (between the two channels on the right). This will make wiring extremely easy.

Now, wire the GPS as per picture:

Top pin to GND, 2nd pin to 5V, 3rd pin to analog 0, 4th pin to analog 1. You may use pins other than analog 0 and 1 and you need to change the definition in the code to reflect the change. These pins are used by the B and A buttons so you will no longer be able to use these buttons. If arduino has more pins, or you’re using the Phi-1 shield with mega board, go right ahead to use some unused pins.

Now, put some double sided tape on the botton of the gps module and tape it to the board, with the position and orientation indicated by the picture below. You should check clearance (avoid the metal in the red circle) by carefully putting the LCD back on the shield. If you get the GPS to the right location, the LCD should be slightly above the GPS but not touching it. I think I’m just that good of a designer 🙂

Plug in the GPS to the socket, observe that the grey line will appear on the right side, per the connections picture. Secure the connection.

Load the sample code. Make sure if you have changed which arduino pin the GPS is connected to, make change in the code as well. Power it up and wait. Nothing? Well, the GPS takes a while to start up and inside of a building is always going to be poor reception, especially on the first floor. I will try it in a car, with a 9V battery. Notice that the red LED on the GPS will flash at 1 second interval if it has a lock on the satellites. It is steady if it is powered on but has not locked on the satellites. Make sure you see the flash.

You can see the GPS module sits nicely underneath the LCD. The red color on the push buttons comes from the flashing light of the GPS indicator LED.

Here is a picture showing my GPS coordinate, and my El cheapo TomTom GPS with no reception. The coordinates are in 10-5 degree units.

Here is the code:

GPS basic display

Support library The newsoftserial and tinygps are needed for the code. These can also be downloaded at the author’s website. After you download the libraries, unzip them under your arduino sketch/libraries folder so that you will have something like arduino/sketchbooks/libraries/NewSoftSerial.

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 (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)

 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… 

Documentation:

Phi-1 shield documentation revision 11/19/2010

PCB design:

Schematic:

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.


%d bloggers like this: