Monday, February 11, 2013

31


I'm 31 today.  Which isn't a particularly remarkable birthday.  No grand new opportunities are open to me today that were unavailable 24 hours ago.  Although, I have been thinking a lot about being 31 in the last week.  The strangest thing about getting older, for me at least, is that I find myself older than a growing fraction of the population.  I'm older than the people in sitcoms, I'm older than people I work with, it is a strange feeling.

The hardest one for me to deal with is being older than the men and women I read about dying.  Dying for whatever reason but dying before your 31 is tragic regardless of the circumstances.  I feel like I'm just getting started, they never got the chance.

31 is a breakpoint in federal statistics about active duty military deaths.  It is a categorical break and seemingly a statistical one as well.  Going through the data available in the Defense Casualty Analysis System (https://www.dmdc.osd.mil/dcas/pages/casualties.xhtml) it is easy to see that the majority of deaths occur in age groups younger than 31.

To date:
Operation Enduring Freedom, 1,642 men and women who never had a 31st birthday.
Operation New Dawn, 51 men and women who never had a 31st birthday.
Operation Iraqi Freedom, 3,481 men and women who never had a 31st birthday.

Totalling 5,174 men and women who willingly signed up and subsequently lost their lives before turning 31.

I come from a relatively small town.  My high school had about 2,000 students.  Double that, add a hundred or so.  Think back to the assemblies in the gym and how many people were there.  Now double that.

I don't mean to be a big downer here, the scale of military casualties over the last few years and the tragedy of their ages has just been weighing on my lately.

I guess my point here is that it's important to appreciate the people who willingly put themselves in harms way on days that we don't get off from work.  It's a profoundly brave thing to step up and serve.

Wednesday, January 25, 2012

Trimble Copernicus GPS Receiver & Arduino

I recently got my Arduino and Copernicus GPS receiver to communicate nicely.  Here’s how I got it working:
User Joezawaki at Sparkfun Electronics posted this very helpful diagram about a month ago:
copernicus_connection
I followed that almost to the letter to get the unit powered up properly. 
I had a bit of trouble because the above graphic shows the underside of the module, so I made this to make things a bit clearer:
Arduino GPS 003
I used an Arduino Duemilanove which runs at 5 volts, so I also used a Sparkfun Logic-Level Converter in between the serial port on the GPS module and the Arduino.  I tried for a while to build a voltage divider to knock the serial communication down but I never could get it right (I know, my n00b is showing).  The Sparkfun convertor is a great piece to have in your parts arsenal.  They’re cheap, breadboard friendly and make life much easier.
Now to the matter of code.  As would be expected, the code you use is really driven by a matter of what you want to do with the Copernicus.  The TinyGPS library is a great NMEA parser and the example code will get you up and running if you want to pull data from the GPS into text.  If you want raw NEMA sentences in order to use your Copernicus with software such as ArcGIS or Google Earth you will need to use a sketch designed to output unparsed NMEA data such as the one provided in the Aduino Playground. 
There’s a few things I learned in my futzing with the Copernicus that I think are useful.
1.  Realize that you are working with a serious GPS unit.  The Copernicus is capable of a lot of great things and as such it is a bit more complicated than working with other units.  With great power comes a lot of headscratching.
2.  There are two serial ports, one (RXB and TXB) default to outputting NMEA sentences at 4800 baud.  The other (RXA and TXA) default to outputting Trimble Standard Interface Protocol (TSIP) data, which is Trimble’s proprietary data stream.  TSIP is incredibly powerful and cool.  I have no idea how to use it. 
3.  RTFM.  Just do it, the manual is 238 pages long and it’s written in really good english.  It’s not something to be trifled with.
Feel free to comment or email with any questions or corrections, I’m always up for input!


UPDATE:
Here is a very basic GPS sketch that I was using when I was working with this unit more frequently.  I'm pretty sure it works - it at least outlines the basics of what you need to do to receive data from the unit.  I don't have a decent workbench set up right now so I'm not able to test it out.

It's pretty straightforward.  Bear in mind that this code is four years old now, there have likely been updates to the libraries that it uses - I would highly recommend looking through the documentation for those before diving into this.  (But who am I kidding - you're just going to copy/paste it and see if it works before you do any of that.)
#include
#include

//GPS Shield switch set to UART
#define RXPIN 0
#define TXPIN 1

//Set this value equal to the baud rate of your GPS
#define GPSBAUD 4800

// Create an instance of the TinyGPS object
TinyGPS gps;

// Initialize the NewSoftSerial library to the pins you defined above
NewSoftSerial nss(RXPIN, TXPIN);

// This is where you create prototypes for the functions that will be used.
void getgps(TinyGPS &gps);

//General variables
float latitude, longitude;
float velocity, azimuth;

void setup()
{
  //Serial for debugging purposes
  Serial.begin(4800);
  Serial.println("Serial Started");

  //Sets baud rate of your GPS
  nss.begin(GPSBAUD);

}

void loop()
  //Serial.println("Out of loop");
  
  while(nss.available())     // While there is data on the RX pin...
  {
      int c = nss.read();    // load the data into a variable...
      if(gps.encode(c))      // if there is a new valid sentence...
      {
        // Do Stuff
        gps.f_get_position(&latitude, &longitude);
        //lcd.noBlink();
        //lcd.clear();
        //lcd.setCursor(0,0);
        //lcd.print(latitude,4); lcd.print(longitude,4);
        //lcd.setCursor(0,1);
        
        // Get speed and azimuth
        velocity = gps.f_speed_mph();
        azimuth = gps.f_course();
       
        //Debugging serial stuff
        Serial.println(latitude);
        Serial.println(longitude);
        Serial.println(velocity);
        Serial.println(azimuth);
      }
  }  
  delay(3000);
}

Tuesday, July 19, 2011

Router Update

In case anyone is actually interested in reading about my new cooling system on my router I thought I’d post an update.

It’s been running for a couple days now and things seem to have improved.  The stability of my wired connections has improved quite a bit.  I used to have significant hiccups when browsing or watching Netflix and while things are definitely a bit herky-jerky they don’t cause timeouts all the time like they used to.

Also, I haven’t had the problem with the router rejecting new wifi connections like it used to.  That is probably the best thing about the whole project.  I was thoroughly annoyed about having to go and restart the router every other day or so when it decided to stop letting wifi devices connect.

Lastly, I think that Netgear wants you to mod your router.  Seriously.  Check out the cool tabs they put on the rubber feet so they can be reattached after you take out the screws.  Companies that don’t want you to mod their stuff use glue, not fancy tabs Smile.

Router Fun Time 2011-07-16 029

Saturday, July 16, 2011

Turbo-Cooling My Router

Router Fun Time 2011-07-16 035

I’ve hated my router for some time now.  It’s really spotty, even with my wired connections.  It’s worst habit has been that is won’t let wireless devices connect, sometimes, just at random intervals it seems…  Anyhow, I hate it, I want to replace it-but my geek pride prevents me from buying anything that doesn’t have USB ports, and is Open-Source compatible-all of which seem to run around a hundred bucks.

I ran across a post where a guy modified some RAM heatsinks and put them on the ICs on the router board because he was having problems similar to mine.  He said it helped, I was inspired, geeky-fun-time ensued.

I started by pulling my router apart and checking for the telltale discoloring of overheating ICs:

Router Fun Time 2011-07-16 015

It was pretty clear that the IC on the left had been getting really hot, and the other one, at least a little bit.  I had an old 40mm fan left over from a motherboard I salvaged it from and decided it needed to go on the board but I knew it was not going to fit in the case…

So I set up to cut a hole in the top of the case for the heatsink and fan to stick out of.  Hoping I wouldn’t screw up and leave my router all ugly.

Router Fun Time 2011-07-16 008

I laid out the heatsink, and started drilling holes…  I used a sanding bit in my drill press and a couple of chisels to get it cleaned up as best I could.

Router Fun Time 2011-07-16 013

Of course, then I realized I needed a way to power the fan…  It runs on 12V, same as the router, so I figured the best way was to just jack into the power as it came in from the wall-wart:

Router Fun Time 2011-07-16 019

Then I needed to make a heatsink for the smaller IC.  I had another one lying in a defunct case from a PC I had stripped down a few weeks earlier.  So I saved it from the recycle bin and got out the roto-zip with the cutting wheel and chopped out a 1cm square.  I had to chop about 2/3 of the fins off.  Then I sanded off the rough spots and mounted it up:

Router Fun Time 2011-07-16 020

The larger one had this crappy adhesive pad on the bottom, so I just went with that.  The smaller one I stuck on with a glob of Artic Silver thermal compound.

Then it was just a matter of putting it all back together:

Router Fun Time 2011-07-16 033

I don’t have any hard data as to whether or not it’s making a difference, especially considering that I just finished up a few minutes ago.  I think it looks cool and I’m quite pleased with myself for completing it.  It seems like it should make a difference, especially in terms of stability.  I know heat is a major enemy of ICs, especially when they run nearly 24/7.

I love projects I can conceive of and execute within a couple hours.  I really like that the fan is quiet enough that I don’t really notice it over my computer.  I’ll post an update later when I have some more data as to whether or not I noticed a difference.

Tuesday, January 18, 2011

Why I left Facebook

It’s been a little over a week since I cut the cord and asked Facebook to delete my account forever.  I have to admit I really do miss it.  I miss knowing what my friends are up to without having to put any real effort into finding out.  I miss posting about my accomplishment or whining about something that went wrong and getting some support back from people.

I really like that I left though.  I feel more honest, like a better representation of who I am and want to be.  I mean, it’s a little silly to post links on facebook about how you shouldn’t be on facebook isn’t it?

My primary objection with facebook is a response to the nature of the business deal inherent to joining and using facebook.  In return for providing the facebook corporation with your personal information, your whereabouts, your habits, things you like and dislike, who your friends are and a myriad of other information you get to talk to your friends with little or not effort.  In reciprocation for your personal information you get to be lazy, a little more connected with people you generally don’t talk to, a little creepier than you want to be (the term ‘facebook stalk’ comes to mind), but generally, in my opinion, a bit lazy in comparison to the manner in which socialization and friendship are generally conducted.  I find this tradeoff to be unfair and biased towards the corporation.  I value the information I was sharing on facebook the same as I do any personal information.  We have federal laws about protecting our medical information, why not the bands we like or our pictures from last weekend?  Is one really more valuable or inherently personal than the other?  In sum, facebook gets too much in return for what they give me.

This leads me to my second major issue.  I think that our economy is not set up to deal with putting a value on a non-consumable good.  All the content (data) you generate on facebook can be mined, related to your friends data, and used in very powerful ways to target marketing towards you in an unrelenting effort to make us think less and buy more.  I think that people generally do not understand this and therefore undervalue their own information.  This is made abundantly clear to me when people give up their online privacy to find out what their ‘Stripper Name’ is, what ‘Sex and the City’ character they are, or whatever other asinine thing some insidious data miner has come up with to get access to you and your friends information.  Your data can be collected and resold an infinite number of times to whomever wants to buy it.  This commodity is fundamentally different than traditional consumable goods.  That fundamental difference is what drives the misunderstanding among the public regarding the value of their personal information and the data you create just by using the service.

There’s a reason facebook is “free and always will be” – it’s that your information is incredibly valuable and they’re getting the long end of the stick.