Tuesday, May 13, 2014

GPS Pack v1.1 is a go

The prototype boards came, and they worked flawlessly.

I am, however, going to roll a v1.2 for the hardware. This version will add a connection between the PPS pin on the GPS module and D3 on the ATMega. It will also add an LED connected to the FIX pin on the GPS module. As I tweeted a few days ago, it costs nothing to NOT stuff parts you don't need, but you have to roll a board revision ($$$) if you want parts that are not on the board.

I'm adding the PPS output in case someone wants to build a particularly accurate clock. I may rework my GPS clock sketch to run on this board. Not 100% sure about that, though (it doesn't need to be battery powered, for instance).

But in any event, the first version of the reverse geocache sketch is just about ready for GitHub. I want to spend a few more minutes checking it out this evening before I release it.

The sketch has three "modes" - Setup, Open and Game. Under normal circumstances, the box alternates between "open" and "game" mode. If it's in game mode, you push the button and if the box is in the right location, it will congratulate you, unlock the servo and switch to "open" mode.

In open mode, it will ask you if you're SURE you're ready to lock the box. If you are, then it will lock the servo and switch back to "game" mode.

In open or game mode, if you hold the button down for 5 seconds when it's asleep, it will prompt you for the "cheat code" (more on that later). If you enter the cheat code correctly, it will unlock the box and switch to "setup" mode (the very first time you start it up after a firmware update it will start in setup mode too).

In setup mode, you'll be shown the current fix and can, if you wish, convert that into the target location. You can also edit the target location if you wish. You can then specify a "target radius," which represents how close the box must be to the target for a "win." This distance can be 10, 20, 30... 100 meters in radius. It then asks you for a "hint type." When in game mode, if you push the button in the wrong location, the box won't open, but will give a hint. That hint can be either both the distance and direction (as a compass cardinal - ENE, SW, W, etc), just the distance, just the direction, or no hint at all. The next step will be setting the 4 digit cheat code. After all of that, it will ask you if you wish to exit setup mode. If you do, the box will revert to "open" mode.

While operating, the unit draws about 140 mA from two alkaline batteries. When sleeping, it draws less than 1 mA. If you do the math, a pair of 2000 mA-hr AA batteries should last either 14 hours of power-up time, or 90 days of standby time. Operating parameters are, however, stored in EEPROM, so if you can design a box where the batteries can be replaced without opening it, then you can replace the batteries without having to reprogram everything. There is a battery voltage sampling connection on the ATMega, and the current firmware is programmed to show a "low battery" error and shutdown when the voltage drops below 2 volts (lower than this and the GPS unit will lose it's warm start abilities). Given what the discharge curve for most alkaline cells looks like, there's a pretty good "knee" right after 1 volt (each) anyway. Still, even if the battery is low, it will allow you to attempt to enter the cheat code, which should let you open the box if it's necessary to do so to get at the batteries.

Like all "backpack" boards, the boards cost me around $7.50 from OSHPark. The LCD is around $12, and the rest of the parts are close to $10. But the Ultimate GPS module from AdaFruit is $30.

So I'm going to sell the "quick kit" without the GPS module for $35; a complete "quick kit" for $65 or a fully assembled unit for $75.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.