Shop OBEX P1 Docs P2 Docs Learn Events
A simple protoboard project — Parallax Forums

A simple protoboard project

Rich MRich M Posts: 33
edited 2007-11-20 22:18 in Propeller 1
Here's a simple protoboard project I've built.

It's essentially a remote display terminal, using Zigbee radio modules and a K107 serial display controller. A "server" process on my Linux machine dumps data from my personal weather station to a serial port that is connected to a Zigbee radio. Additionally, it uses Amateur Radio APRS to compute the distance from our house to my wife's and my car, and sends that, as well.

The remote display then receives the data, formats it according to some control codes, and then displays it on the LCD.

For example, the server might send:
pushString( "~C" );
pushString( "~P000Temp: $Temperature Humid: $Humidity");
pushString( "~P001Wind: $WindSpeed Gust : $Gust" );
pushString( "~P002Rain: ${HourRain}Hr ${TodayRain}Tdy" );
pushString( "~P003" . "Mom : " . getData( $mom ) . " Dad: " . getData( $dad ) . " Mi." );

The ~C clears the screen
The ~PXXX codes are X/Y positions on the LCD

Here are some pictures:

The Remote Terminal, starting up and getting a Zigbee address assignment:

www.mulveyfamily.com/projects/remotedisplay/startup.jpg


Displaying current weather data, and my wife at the store. wink.gif

www.mulveyfamily.com/projects/remotedisplay/display.jpg


And finally, the guts ( where I had to take a nibbler to the protoboard to get it to fit ).

www.mulveyfamily.com/projects/remotedisplay/inside.jpg


What you see here are the LCD & K107 backpack at the top, and the protoboard with one of Selmaware's AppBee modules soldered to it at the bottom. I installed the AppBee module at a steep angle above the prop so that there would be lots of airflow to help keep things cool.

The next part of the project will be to add some buttons so that the remote terminal can send requests for data back to the server, issue audible alarms, etc.

Comments

  • rokickirokicki Posts: 1,000
    edited 2007-02-21 01:51
    Awesome! Really cool. Congratulations on getting it all to work!
  • Martin HebelMartin Hebel Posts: 1,239
    edited 2007-02-21 02:30
    Very nice Rich, that distance to the car ability is slick!

    -Martin
  • Paul_HPaul_H Posts: 85
    edited 2007-11-20 21:04
    Rich,

    Can you share the code you used for the APRS connection? I'd love to use APRS for my RC / UAV plane for position tracking as well as lon range command and comtrol.

    thanks!
    Paul
  • Rich MRich M Posts: 33
    edited 2007-11-20 22:18
    Sure, it's quite minimal:


    sub getAPRSData {
    my $station = $_[noparse][[/noparse]0];
    my $url = "http://www.findu.com/cgi-bin/posit.cgi?call=" . $station . "&comma=1";
    my $command= "/usr/bin/lwp-request '" . $url . "'";
    my @results = `$command`;
    my @locations = grep( /^(\d+\.\d+).*\
    /, @results );
    my ( $latitude, $longitude ) = split( /,/, $locations[noparse][[/noparse]$#locations] );

    return 0 if( !$latitude ) ;

    return getDistance( $latitude, $longitude );

    }


    sub getDistance {

    my $lat1 = deg2rad($homeLat);
    my $lon1 = deg2rad($homeLong);
    my $lat2 = deg2rad($_[noparse][[/noparse]0] );
    my $lon2 = deg2rad($_);
    my $dist=acos(cos($lat1)*cos($lon1)*cos($lat2)*cos($lon2) + cos($lat1)*sin($lon1)*cos($lat2)*sin($lon2) + sin($lat1)*sin($lat2)) * 3963.1;

    return int($dist * 10 )/10;
    }


    Just pass in the callsign to getAPRSData, and it will get the latitude and longitude. It assumes that you have the perl LWP package installed.
    Oh, and you'll want to set $homeLat and $homeLong to get the distance, like:

    my $homeLat = 43.13050;
    my $homeLong = -77.51150;


    - Rich
Sign In or Register to comment.