Dangerous Prototypes

In development => Project logs => Topic started by: jbeale on November 10, 2011, 07:49:02 pm

Title: decade frequency generator (1 Hz ... 10 kHz)
Post by: jbeale on November 10, 2011, 07:49:02 pm
I made a project page for a decade frequency generator. This is based around a 26 MHz OCXO (ovenized oscillator) and a PIC16F1823 doing the frequency division to get a stable square waves at 1 Hz, 10 Hz, 100 Hz, 1 kHz and 10 kHz (3.3V or 5V levels, your choice). 

It's fairly small and can be battery powered but don't confuse this with a 555 timer or a simple crystal circuit.  The OCXO-based frequency output drifts only about 1 ppb (1E-9) per hour typically after warmup, which makes it the most precise instrument I have. The 1-PPS output on my cheap GPS receiver ( http://www.sureelectronics.net/goods.php?id=99 (http://www.sureelectronics.net/goods.php?id=99) )  has more drift unless you average a very long time (many hours). True, the GPS would probably work better if I could mount an outdoor antenna, and there were fewer tall trees around the apartment, but a good OCXO always has better stability than GPS in the short term (minutes to hours, and maybe days).

Schematic, board files, and notes at http://www.bealecorner.com/pcb/dd1/ (http://www.bealecorner.com/pcb/dd1/)

The prototypes I made and hand-wired are working. The PIC firmware is still missing one feature, the blinking LED output on pin 11 (that pin was used as an osc. freq. select input in past versions of the FW).  Neither the circuit nor the firmware is original to me, I just changed a few things here and there from the original from Tom Van Baak ( http://www.leapsecond.com/tools/PPSDIV.ASM (http://www.leapsecond.com/tools/PPSDIV.ASM) ) and later mods by Richard H McCorkle ( http://ko4bb.com/dokuwiki/doku.php?id=p ... ing:pictic (http://ko4bb.com/dokuwiki/doku.php?id=precision_timing:pictic) ) to permit use with a cheap 26 MHz oscillator (this part, "Pletronics 26MHz OCXO" is available on ebay).

My project page includes the PCB layout but it is untested; current status is waiting for PCBs back from Seeedstudio. I guess it takes about a month.

Warning: to test a clock, you need another one that's better (or an ensemble of equivalent ones), so this project might be your entry into a spiral of ever-more elaborate clocks... to see where it all might lead, visit Tom V.B.'s most impressive website at http://www.leapsecond.com/ (http://www.leapsecond.com/)  ...and this has happened to quite a few people, witness the community of "time nuts" on their mailing list, http://www.febo.com/pipermail/time-nuts/ (http://www.febo.com/pipermail/time-nuts/)
Title: Re: decade frequency generator (1 Hz ... 10 kHz)
Post by: rsdio on November 11, 2011, 03:40:46 pm
Very interesting! Thanks for the report and links.
Title: Re: decade frequency generator (1 Hz ... 10 kHz)
Post by: jbeale on November 14, 2011, 09:17:16 pm
Thanks DP for putting this on your blog page! It's still amazing to me I can have a signal source that can be adjusted to 1 ppb accuracy (at least short-term) for under $30 in total parts cost.  The key is the OCXO device for $5 from ebay. This type of part is generally $75 and up when sold new.

You can get more accuracy from rubidium standards for $100-ish used, but they're bigger and take more power.
Title: Re: decade frequency generator (1 Hz ... 10 kHz)
Post by: arhi on November 14, 2011, 10:48:31 pm
you can check military dumps, you can find old 1MHz or 4MHz or 10MHz oscillators in oven, where oven is most usually controlled by the mercury thermometer turning the heater on/off .. older they are - more precise they are ..
Title: Re: decade frequency generator (1 Hz ... 10 kHz)
Post by: jbeale on November 14, 2011, 11:11:19 pm
Interesting! Unfortunately, I don't know of any military dumps nearby :-).  But just today I noticed that several sellers are offering used Frequency Electronics FE-5680A Rubidium standards online for under $40, and from what I saw on the "time-nuts" list these devices work ok. If you really need accuracy that's a good deal, as they are stable to 2E-11 (0.02 ppb) per day. 
Although, if you want to test it, or calibrate it, you might need to buy two because unless you work at a standards lab, you probably don't have any other clock nearly as accurate.  (Maybe could have it calibrated by a test lab-- probably still cheaper to buy two.)
Title: Re: decade frequency generator (1 Hz ... 10 kHz)
Post by: hak8or on November 15, 2011, 07:32:32 am
What on earth would you mean by "military dumps"? :P
Title: Re: decade frequency generator (1 Hz ... 10 kHz)
Post by: arhi on November 15, 2011, 07:40:39 am
excuse my english :D :D :D

Military (in every country) uses a lot of electronics and mechanics, from time to time (in some countries every few years, in some every few decades) military by new equipment and dumps the old one. Also they break a lot of stuff. The "secret/sensitive" stuff is destroyed using special procedures but everything else is "dumped" in a "military dump" and often you can go there and by stuff by the kg/pound/stone (or whatever your weight measurement unit is)... In most countries these military dumps are open for anyone, in some only a company can get in and "purchase in bulks" so then they resale that in electronic outlets ..
Title: Re: decade frequency generator (1 Hz ... 10 kHz)
Post by: arakis on November 15, 2011, 07:51:05 am
I think its called "Military Surplus", http://www.fairradio.com/ (http://www.fairradio.com/)
Title: Re: decade frequency generator (1 Hz ... 10 kHz)
Post by: arhi on November 15, 2011, 08:05:04 am
Well, taking into account usual smell and feel there, a "dump" is imho a better word :D but surplus does sound like a proper one :D
Title: Re: decade frequency generator (1 Hz ... 10 kHz)
Post by: jbeale on November 21, 2011, 06:58:13 pm
Just in case anyone's interested: the PCBs are still (I hope) on their way. They were shipped from Seeedstudio the cheap way, "registered air parcel" via Hong Kong Post. According to USPS, they left HK on Nov. 11 and were in the US on Nov. 16, and only 30 miles away from me,  but no more tracking updates since then (last Wednesday):

USPS Track & Confirm:  November 16, 2011, 9:15 am  Missent
Missent : Your item was misrouted. The error has been corrected and every effort is being made to deliver it as soon as possible. Information, if available, is updated periodically throughout the day. Please check again later.
Title: Re: decade frequency generator (1 Hz ... 10 kHz)
Post by: hak8or on November 22, 2011, 01:42:56 am
Oh, that never happened to me but I heard that other people who had that happen to them did not have a awesome time with UPS. I certainly hope that it is only a day delay at most!

I was not poking fun at you by the way, I was just curious as to what you meant by military dumps, because in the USA the only thing that resembles that is as said above, a surplus store for military stuff. Problem is that it is mostly online, and not that much cheaper than buying things through normal outlets. :( And I know of none that you can physically enter and take stuff out, most places I tried contacting did not even respond to my emails asking for more information.

Anyone else had any luck with such military surplus places in the USA?
Title: Re: decade frequency generator (1 Hz ... 10 kHz)
Post by: arhi on November 22, 2011, 02:18:14 am
I always count that anything I order from seeed will travel 5 weeks. In 90% cases stuff arrives in 3-4 weeks, few times it took 5, and only few times they traveled 5 days .. it's something you calculate in and order "in advance"
Title: Re: decade frequency generator (1 Hz ... 10 kHz)
Post by: blarson on November 23, 2011, 02:50:55 am
[quote author="hak8or"] because in the USA the only thing that resembles that is as said above, a surplus store for military stuff. Problem is that it is mostly online, and not that much cheaper than buying things through normal outlets. :( And I know of none that you can physically enter and take stuff out, most places I tried contacting did not even respond to my emails asking for more information.

Anyone else had any luck with such military surplus places in the USA?[/quote]

How the US military seems to handle it is auctions of large lots, usually poorly described.  You can travel to and inspect the lots, but that may cost you a large fraction of the value of the lot.  I've read about someone buying military trailers that way, with condition varying widly with nearly identical descriptions.  (Not much more than a part number and low-res picture.)  Sorry I don't remember the web site, but search for "government auction" and you should find it.
Title: PCBs arrived!
Post by: jbeale on November 26, 2011, 01:58:19 am
The mailman was kind today: http://bealecorner.com/pcb/dd1/PCB-blank-scan.jpg (http://bealecorner.com/pcb/dd1/PCB-blank-scan.jpg)

I ordered online from SeeedStudio on Oct. 31 and the boards arrived here in California on Nov. 25, so it was less than one month overall. There are 12 boards, 6 of which were taped together and marked on one edge, I suppose these are the electrically tested ones (?) In any case I had large design rules and didn't expect any issues. All the boards look just fine visually.

Looking forward to a chance to stuff one and try it out. So far in the "stupid mistakes" department, I realized that for the 2.1m DC power input jack, I got pins 2 & 3 reversed on the footprint. However I wasn't using the connector side pin (a switch contact that closes when a plug is inserted?) so I think I can just short 2 and 3 together, to make it work.

UPDATE: it works, after a few fixes:

Rework on 26MHz 1PPS generator PCB "dd1 v.1" (OCT.30 2011)  as of Nov. 25 2011
------------------------------------------------------------------------------------------------------------
1) J1,J5: pins 2,3 reversed.  FIX: remove unused side pin on jack, and short pins 2+3 on PCB
2) RV2: footprint pins straight, should be staggered. FIX: bend pin 2 on pot to fit footprint
3) U5 pin 3 missing pullup. FIX: add 10k between U5.3 and U5.1
------------------------------------------------------------------------------------------------------------

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.01262101536session_write_close ( )...(null):0
20.01302233128ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01302233904Database_MySQL->query( ).../DatabaseHandler.php:119
40.05742372640Database_MySQL->error( ).../Db-mysql.class.php:273