Monthly Archives: September 2011

How the ISS killed the USA’s dominance in Science

First let me stake my geek space cred here so you don’t think I’m an “Earth Firster”. I love space, and I think one of the most important things we can do as a species is to become space-faring and multi-planetary.

I am not a space-hating, “solve the problems here on earth first!” type of guy.

But the International Space Station did kill the United States’ dominance is science.

On top of the world

Let’s rewind to the 1980s. The USA has long since beaten the Soviets in the Space race. We dominate the world in everything space. From fundamental research to commercial satellite launches. We are space to the human race. Also, being one of the largest economies, and still hot to trot to keep ahead of the Russians in everything, we fund science at levels not seen anywhere else in the world, perhaps in the history of our species. Continue reading

C3: Connection Durability Win

I’ve been super busy lately so I haven’t had a whole lot of time for this project, but I did manage to get some work done last nite and merge in a patch I found floating around the internet.

It was supposed to make my WiFi chip reconnect to the AP more reliably, and so far it appears to be working! My original soak tests lost connection to the AP after about an hour and failed to ever reconnect. Last night after merging and testing this new patch, I set up another soak test which has been going 10 hours strong so far!

I set up some port forwarding, so you can check out the test page running on the Arduino right now (this link won’t be live for very long): (Note: Some people report this link as not working, but it’s still working for me… go figure.)

Also note that it is currently NOT resynchronizing with NTP servers, so you will notice a widening divergence between the time reported and actual time (EDT).

Next up, (hopefully this weekend) I need to get it resyncing with NTP servers every 12 hours. And start pulling data from my Google Calendar. So hopefully by the end of the weekend this network connected clock will become a network connected alarm clock 😉

C3: NTP FTW! (And other acronyms)

LLOONNGG week of packing, moving, and unpacking. Still not done unpacking. Probably won’t be fully unpacked by the time we move again :P Oh well.

ANYWAY! Onward and upward!

Posted Image
[ I really like my little Paint.NET logo, so thought I’d throw it in again 😉 ]

So since my last post I began working on NTP (Network Time Protocol) synchronization. As with EVERY part of the project so far, there were a lot of snags along the way, but I got it there. It’s a truly crippling problem having the maker of my WiFi chip defunct. It leads to all sorts of problems with documentation and community support. But “Damn the torpedoes!” I say! FORWARD!

I had to implement the NTP protocol on my end. I simplified it quite a bit by not taking advantage of many features [40 bytes of hard coded zeros in the middle of my message 😉 ], so it was actually pretty easy. Sending and receiving the UDP packets, however, was a bear because of the poor documentation for my WiFi chip. Took quite a bit of fiddling, but I got it working.

Then I found the great little Time library for Arduino that allows for easy manipulation of time and time keeping, and set that up to use my new NTP code for synchronization.

Putting it all together, here you can see the current boot sequence for the C3:

With this working, I set it up for a soak test. I wanted to see how much time the Arduino would lose after it synchronized only once, that way I could figure out how often I would have to re-sync with the NTP servers. After 24 hours I had lost just under a minute, and after 48 hours I had lost just about 2 minutes, which looks pretty good because it doesn’t seem to be accelerating. It’s a pretty minimal, and a pretty linear loss. I could probably sync with NTP as little as once a day, but to be safe I’ll probably start by syncing every 12 hours.

So that’s all good! But during the soak tests I did discover yet another problem with my WiFi software stack. It doesn’t automatically reconnect when it’s connection to the WiFi AP is dropped. It’s a fairly minor problem in the software stack that I already found someone’s patch for. My version of the stack is already pretty customized however.

So my next goal will be to setup auto-syncing at 12 hour intervals. Merge the WiFi auto-reconnect patch with my customized stack. And finally further customize the stack in preparation for working along side the display shield I will eventually be integrating. (I need to move some pins around in the code)

With all of that I should have a rock solid NTP clock, which of course is the necessary basis for everything going forward. After that I can focus on Google Calendar integration and other “fancy features” like audio output and a display :P