Adafruit #570 in Inc 5000 & #11 in manufacturing - fastest-growing private companies in America - INC 5000 - Read more!

ICE Tube Clock Oscillator Modification

by bikegeek on Mon Mar 08, 2010 9:10 pm

I made my second mod to my ICE Tube clock last week (first was the dimmer mod with digisage firmware as you may notice in my pic.)

I replaced crystal Q1 with a Maxim DS32kHz Temperature compensated crystal oscillator (see: http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2940). Although it's only been a week, I have no/negligible drift - previously I had been tweaking the calibration feature and was not quite 100% on my timing. I unfortunately ordered a BGA package which was a PITA to solder - since I'm much more comfortable with through-hole, I might order a DIP version, make a quick board and clean up my installation a bit. Not the prettiest work, but it was quite simple:
1) I desoldered and removed crystal Q1 and the 22pf capacitors C8 & C9
2) Soldered wire to the 32kHz pins of the DS32kHz (C4,C5,D4,D5 - sorry don't know how to designate pins on BGA)
3) Soldered the other end of #2 to pin 9 of the ATMega
4) Soldered wire to the Vcc pins of the DS32kHz (C2,C3,D2,D3)
5) Soldered wire from #4 to a power pin (just past diode D2)
6) Soldered wire to the GND pins of the DS32kHz
7) Soldered wire from #6 to the ground pins for capacitors C8 & C9

I haven't wired up the battery backup yet - I'm trying to find a clean way to get to the battery (plus I got lazy and decided to quit while I was ahead.)
Here's the results:
MyClock.jpg
Clock Mod with Maxim DS32kHz floating below the 08 and 12
MyClock.jpg (102.74 KiB) Viewed 5374 times
bikegeek
 
Posts: 1
Joined: Sun Dec 20, 2009 7:52 pm

Re: ICE Tube Clock Oscillator Modification

by kero905 on Fri Mar 12, 2010 1:20 pm

Awesome! That's some nice BGA soldering. I like the simplicity of your solution. I am using an I2C RTC for the Ice Tube Clock but that took a lot of code writing. I had not thought about getting a better xtal to replace the included one.
kero905
 
Posts: 13
Joined: Sun Dec 06, 2009 11:58 am

Re: ICE Tube Clock Oscillator Modification

by adafruit on Fri Mar 12, 2010 2:25 pm

nice work! it should be ultra precise, eh? :)
User avatar
adafruit
 
Posts: 11663
Joined: Thu Apr 06, 2006 3:21 pm
Location: nyc

Re: ICE Tube Clock Oscillator Modification

by revnull on Sat Jan 08, 2011 2:24 am

Hi, did you ever finish wiring the battery backup for your DS32khz? If so, do you have any more pictures of your mod. This seems much easier and more compact than using the DS3231/chronodot.
Although it would be nice to see a firmware port that used the DS3231 for both time keeping and temperature display. I guess I better starting reading & learning. :D
revnull
 
Posts: 22
Joined: Mon Aug 30, 2010 9:06 pm

Re: ICE Tube Clock Oscillator Modification

by revnull on Wed Jan 12, 2011 8:48 pm

Since this was bikegeek's one and only post in the this forum I think he may never answer my question. :D
I've ordered some samples from Maxim in all 3 available packages to see which would fit best given the limited space in the case.

Image

The operating temperature is normally 0c to +70c. The "-N" part number is the industrial version with an operating temperature of -40c to +85c (maybe useful if you leave your clock in the garage in the winter). On the upper left I have 2 EDIP pin-through versions. The upper right is the BGA version bikegeek used in his mod. The 2 on the bottom are the SOIC versions.

Image

The PDF shows there are only 4 pins used in each package. If one was so inclined to use the BGA or SOIC packages, you could clip the extra pins to make soldering a little easier.

To keep soldering and placement nice and clean, where is the "best" place to tap into the battery? I assume I can just tag a wire directly the side of the coin cell holder. Also, would placing the chip in heat shrink (to prevent shorts) mess with the temperature compensation of the DS32khz?
revnull
 
Posts: 22
Joined: Mon Aug 30, 2010 9:06 pm

Re: ICE Tube Clock Oscillator Modification

by ortsac on Thu Jul 21, 2011 7:23 pm

Just curious....what was your first mod on the Ice Tube Clock?
ortsac
 
Posts: 31
Joined: Tue Jul 19, 2011 4:32 pm

Re: ICE Tube Clock Oscillator Modification

by revnull on Mon Dec 31, 2012 5:37 pm

Well, after longer than a year, I finally got around to trying this mod.
Image

I started by removing the crystal and 2 tuning caps:
Image

I tried the SOC package first, but could not get it to work (maybe because I clipped all of the NC legs instead of grounding them). I opted for the next easiest to solder, the EDIP package.
Image

I was able to tap the voltage regulator for the 5V Vcc (Red) line. Ground (Black) from the C9 ground hole. The Vbat (Also Red) line I tapped directly from the side of the battery holder. The 32kHz (Green) went to the crystal hole on the right.
Image

Different vantage point:
Image

Even though I believe I have everything hooked up properly, I still have 2 issues.
1. The clock keeps great time when externally powered, but when I remove the plug to simulate a power failure time freezes. I've checked all voltages (Vcc/Vbat) in both powered and non-powered states, everything is as it should be, but no joy.
2. I can not get the clock to work using an atmega328p. The tube lights and I can cycle menus, but time does not advance. The 328p worked fine with the crystal and caps in place.

If anyone can help shed light on either of these 2 problems, please let me know.
revnull
 
Posts: 22
Joined: Mon Aug 30, 2010 9:06 pm

Re: ICE Tube Clock Oscillator Modification

by jarchie on Mon Jan 07, 2013 9:58 pm

I managed to get this hack to play nice with the 328p and sleep.

On the DS32kHz, the Vcc, GND, and all N.C. pins are wired to ground. The Vbat pin is connected to system power, which is 5 volts under regulated external power and around 3 volts on battery. The 32kHz output is connected directly to the ATmega328p XTAL1 pin.

On the firmware side, the code needed to use an external clock instead of a crystal oscillator. Specifically, the line that sets ASSR needed to be changed from
Code: Select all | TOGGLE FULL SIZE
ASSR |= _BV(AS2); // use crystal

to
Code: Select all | TOGGLE FULL SIZE
ASSR |= _BV(AS2) | _BV(EXCLK); // use external clock


Hope that helps! Also, I'd like to publically thank revnull; he sent me the DS32kHz to play with. :-) :-) :-)
--John <www.jarchie.com/email>
jarchie
 
Posts: 408
Joined: Sun Jun 24, 2012 1:16 pm
Location: Santa Cruz, California, United States

Re: ICE Tube Clock Oscillator Modification

by revnull on Tue Jan 08, 2013 1:37 pm

jarchie wrote:On the firmware side, the code needed to use an external clock instead of a crystal oscillator. Specifically, the line that sets ASSR needed to be changed from
Code: Select all | TOGGLE FULL SIZE
ASSR |= _BV(AS2); // use crystal

to
Code: Select all | TOGGLE FULL SIZE
ASSR |= _BV(AS2) | _BV(EXCLK); // use external clock



It works like a charm John! Thanks for looking into this. I think I'm going to try to hook up the much smaller SOC package in single power supply mode to my Icetube tonight. I'll then move my DIP to my monochron.

Final pictures to follow.
revnull
 
Posts: 22
Joined: Mon Aug 30, 2010 9:06 pm

Re: ICE Tube Clock Oscillator Modification

by jarchie on Wed Jan 16, 2013 4:52 pm

I ended up installing the easily-soldered EDIP package, and glued it to the coin-cell holder with marine silicon. Even with the larger package, I don't think the DS32kHz detracts too much from the aesthetics of the clock, but judge for yourself:

Image

Image


For this configuration, I removed the clock crystal and caps (Q1, C8, and C9) and connected the DS32kHz installed as shown:

Image

Image

The datasheet for DS32kHz claims an error of less than one minute per year. I suspect that the accuracy can be increased further with software drift correction to address systematic error, but time will tell. ;-)
--John <www.jarchie.com/email>
jarchie
 
Posts: 408
Joined: Sun Jun 24, 2012 1:16 pm
Location: Santa Cruz, California, United States

Re: ICE Tube Clock Oscillator Modification

by Kavett on Sun Mar 17, 2013 10:45 pm

Would I have to flash a new rom or is this a drop in replacement? I'm interested as the chronodot doesn't mesh well with the aesthetics of the clock and looks more complicated. I'm good with hardware but terrible with software so i haven't learned arduino yet. Thanks for the assist :-)
Kavett
 
Posts: 3
Joined: Mon Feb 25, 2013 3:51 pm
Location: Virginia Beach, Virginia

Re: ICE Tube Clock Oscillator Modification

by jarchie on Mon Mar 18, 2013 1:37 pm

Based on bikegeek's and revnull's observations, the DS32kHz seems to work as a drop-in replacement with the ATMEGA chip that comes with the Ice Tube Clock kit, but most likely, the clock will fail to keep time on power failure. For the DS32kHz to work well, I believe you will need a reprogrammed chip.

If you'd like to learn to reprogram chips, there are people on this forum, including myself, who would be happy to help.

If you'd rather spend your free time on other pursuits, I would be willing to send you a reprogrammed chip if you will reimburse my expenses. If you're in the US, that would be $10 (~$3 for the chip, ~$2 for overhead, and ~$5 for USPS Priority Mail shipping). If you're interested, email me to work out the details.
--John <www.jarchie.com/email>
jarchie
 
Posts: 408
Joined: Sun Jun 24, 2012 1:16 pm
Location: Santa Cruz, California, United States

Re: ICE Tube Clock Oscillator Modification

by jarchie on Mon Mar 18, 2013 2:57 pm

Although it would be nice to see a firmware port that used the DS3231 for both time keeping and temperature display. --revnull


If anyone is interested in using the DS3231, wd6cmu has posted his code, but noted that the temperature display seems too high. I've noticed the same thing; the clock seems to generate enough heat to raise internal temperature by five degrees or so. :-(

Just curious....what was your first mod on the Ice Tube Clock? --ortsac


I see a photoresister installed in bikegeek's clock and suspect his first mod was the automatic dimmer mod.
--John <www.jarchie.com/email>
jarchie
 
Posts: 408
Joined: Sun Jun 24, 2012 1:16 pm
Location: Santa Cruz, California, United States

Re: ICE Tube Clock Oscillator Modification

by jarchie on Sun Jul 28, 2013 2:16 pm

After reading William's post describing issues with a BOD threshold of 2.7 volts in the Ice Tube Clock, I realized a potential problem with the hardware portion of this hack as described by me. The DS32kHz temperature-compensated quartz oscillator has a minimum required voltage of 2.7 volts, but according to William's observations, some clocks may not be able to provide that much voltage while running on the backup battery.

The problem is primarily due to voltage drop across D4 (the battery protection diode) and would affect my wiring for this hack. Quite cleverly, revnull wired his clock using the DS32kHz in dual-supply operating mode with Vcc attached to main power and Vbat attached directly to the battery, before D4. Under revnull's configuration, the DS32kHz will receive the required 2.7v until the backup battery is almost completely dead.

I rewired my Ice Tube Clock as revnull suggests and can confirm that his configuration works perfectly for both normal and sleep timekeeping, provided the EXCLK flag is set in ASSR.
--John <www.jarchie.com/email>
jarchie
 
Posts: 408
Joined: Sun Jun 24, 2012 1:16 pm
Location: Santa Cruz, California, United States