Ice Tube GPS Mod

For RTC breakouts, etc., use the Other Products from Adafruit forum

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
russell 27
 
Posts: 242
Joined: Thu Sep 12, 2013 3:59 pm

Re: Ice Tube GPS Mod

Post by russell 27 »

If you want a photo resistor like that right away, Radio Shack has those.

User avatar
jarchie
 
Posts: 615
Joined: Sun Jun 24, 2012 2:16 pm

Re: Ice Tube GPS Mod

Post by jarchie »

PhilD13 wrote:I had a case where the chip erase during programming did not appear to erase the lock bits which caused the chip not to program...
Thanks for the lock bits explanation and suggestion.
PhilD13 wrote:If you don't know the environment the clock may be in or if the clock will go from a dark area to a bright area, then I would recommend something around 5.6K.
I've updated the xmas-icetube docs to recommend a 5.6k and the PDV-P8001, with the Adafruit photoresistor mentioned as an acceptable substitute.

rcb
 
Posts: 25
Joined: Sun Sep 15, 2013 6:25 pm

Re: Ice Tube GPS Mod

Post by rcb »

wpb,
Apologies for the newbie question - but is the hex file you've included w/ your
gps firmware zipfiles (eg, 120112wm) compiled then for the 328p? (I
guess so because as you say it all won't fit in a 168...) I ask only because
the makefile says MCU = atmega168 at the top. Thx.

User avatar
phild13
 
Posts: 247
Joined: Mon Sep 10, 2012 1:05 pm

Re: Ice Tube GPS Mod

Post by phild13 »

The xmas_icetube firmware ( https://github.com/johngarchie/xmas-icetube ) includes the GPS options in the firmware and is made specifically for and will only fit on an ATMEGA328P-PU chip (I use the ATMEGA328P-PU-ND - digiKey number). While you can get a chip from Adafruit, their chips have an Arduino bootloader installed and will present reprogramming issues (and the need for additional hardware to reprogram the chips) when trying to re-purpose for the clock.

The original firmware available from Adafruit ( https://github.com/adafruit/Ice-Tube-Clock) contains GPS compatibility and will fit on the 128 chip that comes with the clock. I believe this is the same firmware that comes with the clock kit.

User avatar
wbp
 
Posts: 260
Joined: Mon Mar 07, 2011 1:18 pm

Re: Ice Tube GPS Mod

Post by wbp »

rcb,

The line you are referring to in the makefile is actually a comment - doesn't that line with "168" start with a "#" ? With all of the mods that are enabled in that firmware, it won't fit on a 168.

The latest version of my firmware for the Adafruit Ice Tube clock is on Github - you can find it at https://github.com/wbphelps/Ice-Tube-Clock

The current version is v130406wm, dated April 6, 2013.

328P chips are very inexpensive now, check Mouser.com. You'll need a programmer of course. If you prefer to have a chip programmed and sent to you, I can do that for a nominal fee. I use an Arduino as a programmer...

William

rcb
 
Posts: 25
Joined: Sun Sep 15, 2013 6:25 pm

Re: Ice Tube GPS Mod

Post by rcb »

William,
ah, you are of course correct: the older version I was looking at, 120112wm,
seems to have the MCU set to the atmega168, but the latest version 31jul12 has the MCU as
atmega328p. I was wondering how it all fit. Thanks for the ptr to the latest version.
I will try using usbtiny (so uncommenting that line, and commenting out arduino), and
see how it goes.

thx

rcb
 
Posts: 25
Joined: Sun Sep 15, 2013 6:25 pm

Re: Ice Tube GPS Mod

Post by rcb »

wpb,
Hi, do you mind posting the revised firmware list of menu choices?
I've loaded up the 328 (successfully), but w/ my poor eyes can't
make out the new menu list on the tube. Also - how does one
check that the GPS is working? Thx.

rcb
 
Posts: 25
Joined: Sun Sep 15, 2013 6:25 pm

Re: Ice Tube GPS Mod

Post by rcb »

wbp,
sorry for the typo re your login! i was able to make out most
of the menu settings, so got to the 'set gps' one... but still
could use some help re what 'set rules' does, and the full
suite of menu choices. thx.

rcb
 
Posts: 25
Joined: Sun Sep 15, 2013 6:25 pm

Re: Ice Tube GPS Mod

Post by rcb »

wbp,
btw, your firmware runs great!

User avatar
wbp
 
Posts: 260
Joined: Mon Mar 07, 2011 1:18 pm

Re: Ice Tube GPS Mod

Post by wbp »

I just added a "readme.txt" in the firmware folder for version v130621. It's not very polished, but it lists all the menu choices.

About DST support: the "rules" are set for the current US DST rules. Don't change them unless you understand what the fields are.

Code: Select all

Clock has 3 buttons: Menu, Select, Set

1) MENU - cycle thru Menu items
2) SELECT - select (next) Menu item
3) SET - adjust/store setting

Clock has the following Menu items:
(if all features are enabled)

) ICE TUBE - press SELECT to see firmware version
) SET ALAR - set alarm time
) SET TIME - set clock time
) SET DATE - set clock date
) SET ADIM - enable Auto Dimming feature
) SET BRIT - set Brightness level or levels
) SET DST  - set DST feature Off/On/Auto
) SET DRFT - drift correction
) SET GPS  - GPS feature: Off, 48, 96
) SET LDBB - last digit brightness adjust
) SET VOL  - set beeper Volume Low/High
) SET REGN - set display "Region" 12/24 hour
) SET RULE - set DST rules (do not adjust)
) SET SECS - seconds display mode
) SET SNOZ - set Snooze time
) SET ZONE - set time zone, 0 for GMT, negative for West, Eastern US is -5

ldbb is "last digit brightness boost"
drft is drift correction, compensates for small errors in crystal frequency
not needed if GPS is connected
secs is "seconds display" - try it, there are several choices. "full" is 
'hh mm ss'. "fullgps" shows gps signal status with a decimal point on the 
right seconds digit.
rules should be "3, 1, 2, 2, 11, 1, 1, 2, 1" (1st sunday in march, etc)

Always press Set button one more time after any adjustments - this
will store the new value(s) in the clocks eeprom memory.

If GPS feature is On and GPS has signal (red LED not blinking) and you
adjust time or date, clock will set itself again within a couple of
seconds.  To demonstrate GPS feature, turn it off, adjust time/date,
then turn GPS feature back on and watch the clock set itself.

GPS can now be set to "48" for 4800 baud, or "96" for 9600 baud

Auto DST will adjust time automatically when DST starts/ends based on
Rules.  Rules give start, end, offset of DST: Start(month, dotw, n,
hour), End(month, dotw, n, hour), Offset

rcb
 
Posts: 25
Joined: Sun Sep 15, 2013 6:25 pm

Re: Ice Tube GPS Mod

Post by rcb »

thanks! you are very quick! this is very helpful.

BTW, I placed my GPS under the clock base on the right, hidden away neatly.
(You can just about make it out in the first photo below.)
I had thought this might interfere w/ the signal as mentioned elsewhere, but it
doesn't. There's (just) enough space to also hold the coin battery backup for
the gps, even mounted upside down.
I had gotten the adafruit ext antenna and connector just in case,
but the ultimate gps chip is so good, it doesn't seem to need one.
Here are the pics, front and back (back not so neat - routing
thru the coin battery slot, next time I'll do something more clever). Front:
gps mod clock front
gps mod clock front
photo-9.JPG (106.63 KiB) Viewed 787 times
Back:
gps mod clock back
gps mod clock back
photo-8.JPG (119.72 KiB) Viewed 787 times
BTW 2, if you every want to start dreaming about an 'ultimate' gps clock,
you might want to borrow the features from one I built a while back,
IMHO the best nixie tube gps clock ever done, by John Thomas and a colleague,
here:

http://www.amug.org/~jthomas/gpsii.html

It does great things (you can download the pdf manual):
displays lat and longitude, temperature, various chimes, etc. etc.,
all under user control. Uses one of its colon dots to say when it is getting
a GPS fix. Amusingly, take a look at the size of GPS units back in 2003!
Mine is still going after 10 years -- but sadly and unsurprisingly,
Jeff is no longer providing the kits -- the lucite enclosures alone were
hard to do right, and there's no way now to update the DST (which is all based
on the universal standard before the US changed....) unless one reprograms
the chip (and there's no source code handy....)

User avatar
wbp
 
Posts: 260
Joined: Mon Mar 07, 2011 1:18 pm

Re: Ice Tube GPS Mod

Post by wbp »

I tested the Adafruit Ultimate GPS by putting it inside a couple of wire mesh strainers - with even a slight gap for the USB cable it was able to find signal. I have several clocks (IceTube and other) with the GPS module on the bottom under the PCB.

I've seen that clock before (jthomas). I'm not a fan of nixie tubes but it is a very nice case.

William

User avatar
wbp
 
Posts: 260
Joined: Mon Mar 07, 2011 1:18 pm

Re: Ice Tube GPS Mod

Post by wbp »

FYI - I have just done a mod to my Ice Tube firmware that reduces the memory requirement by some 1,500 bytes. This will probably make it fit in a 168 again. I'm still testing the changes but will post them to GitHub soon.

The changes involve moving all of the variables that are saved in EE memory to a structure. The data is read into the structure from EE memory on boot. When a value is changed, a subroutine is called that compares the values in the structure to the values in EE memory and updates any that have changed. The savings in code size comes from removing all of the individual eeprom_read_byte and eeprom_update_byte calls. I had done this same change on another clock and since it made such a big difference I decided to port it over to the Ice Tube's firmware as well.

William

User avatar
jarchie
 
Posts: 615
Joined: Sun Jun 24, 2012 2:16 pm

Re: Ice Tube GPS Mod

Post by jarchie »

wbp wrote:FYI - I have just done a mod to my Ice Tube firmware that reduces the memory requirement by some 1,500 bytes. This will probably make it fit in a 168 again. I'm still testing the changes but will post them to GitHub soon.
Nice work! I'll look forward to examining the code. :-)

ukewarrior
 
Posts: 14
Joined: Thu Jan 09, 2014 10:38 am

Re: Ice Tube GPS Mod

Post by ukewarrior »

Thanks for posting this code.
I have it running in a 328p and it seems to be running the clock just fine.
I do not have a GPS module yet to work on that integration but plan to get one.
Can you confirm the baud rate in the posted hex file? Is it 4800?

I especially appreciate the fact you posted a .hex file for those of us that don't want to install the whole tool chain and attempt a compile. The step by step for that work is not easy to find.

Locked
Please be positive and constructive with your questions and comments.

Return to “Clock Kits (discontinued)”