Every now and then I need to tune up a radio. One of the most difficult things to do is to make the radio accurately tune to a given frequency or "channel". Setting up the radio so that it will actually tune to a known good frequency makes this job a whole lot easier. To this end I've tried to build a 10MHz Frequency Standard.
My 10MHz gizmo should have the following features/design goals;
As this project could be very useful to the members of the NJQRP's mailing list (of which I'm a member) I decided that rather than bombard them with a dirth of email as to my progress (which some are following avidly) I thought it better to do a sort of "blog" style progress report. Below the pictures on this page you'll find a progress report in reverse chronological order (newest first). Feel free to email me your comments and ideas to g7ltt@@g7ltt.com and don't forget to remove the extra @ symbol.
This is the PSU
This is the back of the chassis
This is the inside of the chassis as of 20051115
Three resistor Atmel programmer
This is the Superclock with a 16x2 display (click for larger image)
This is the Superclock with a 24x2 display (click for larger image)
This is the 50MHz frequency counter (click for larger image).
This is the new inards of the enclosure (click for larger image).
This is the completed G3RUH 10MHz board.
This is my counter connected to the G3RUH board.
The GPS output displayed in a more useful fashion.
The GPS clock output.
Saturday, December 3, 2005
Last night I completed the G3RUH board and installed it along with the Jupiter GPS RX into the 1U case. When connected to my frequency counter it read a steady 10.000.010MHz so I retuned my counter to read 10.000.000MHz. Then, for some odd reason the power died on my bench. I poked and pressed all the plugs and switches and then for no reason the power came back on. I happened to be looking in the direction of my counter at the time and I saw that it was reading 9.999.980MHZ whilst still connected to the RUH board. For the next few miniutes I watched as the counter climbed in frequency until it said 10.000.000MHz - WAY COOL!!!. Just to make sure that the counter wasn't taking its time about warming up. I disconnected it and let it sit on the bench while I drank a well earned beer.
About half an hour later I plugged the counter back into the RUH board. Instant 10.000.000MHz readout. Excellent!! I still have to take it on faith that the RUH board is actually on frequency though. I have no know standard to measure it against. I'm fairly confident that it is on frequency. I just can't prove it. I also tested the other features of the RUH board. It acts as a TTL to RS232 converter so that one can use the NMEA data for something as well as supplying the power to the GPS engine and its antenna. Above are a couple of pictures of the raw NMEA output and the decoded NMEA output. So far so good.
Now that I have some GPS disciplined 10MHz I set about removing the 12MHz TCXO from the Superclock I had built. I re-programmed the AVR with the ZL1BPU GPSclock firmware and then connected the new 10MHz oscillator to pin 5 of the AVR. Pin 5 is where one would normally connect a crystal so as to clock the chip. The Superclock is missing the VCXO facilities that the GPSclock should have but I didn't need to correct the VCXO as I already know that my 10MHz is acurate. I connected the 1PPS output of the RUH board to the GPS input of the GPSclock and connected the clock's serial port to my PC. Above is a picture of the clock doing its thing. The mess to the right of the time is the clocks phase error. As you'll see its gradually getting less as it brings itself into line with the signals its getting.
I'm going back and forth on what to do about the other outputs. As I intend this thing to live in my rack I'm thinking that I won't add the switch and the divider circuit. Instead I'll build a divider for the bench and feed it with a cable from the rack. I still want to put a frequncy counter into the 1U box though. The 2 that I built over the last 2 weeks are not quite working as I thought they should. The 50MHz counter seems to happily read the floating RF in the room and even reads the 15KHz frequency of my computer monitor and strip lights when I touch both its input and the light/TV. Whenever I directly attach it to a signal it displays nothing. I'm very confussed by this. Thinking that there may be some sort of voltage issue here such as applying volts to the counter input by way of the thing I connected it to I attached a 103 cap to the input and then the signal to that. Nope. I'm stumped. I have a similar problem with the IK3OIL 1.5Ghz one I built too. The IK3OIL counter only breifly shows a reading when I disconnect the signal from the counter. I guess I'll have to ask for some help on this one.
This leaves the NTP server. I've ordered a WRAP 2C single board computer from http://www.pcengines.ch which is a 266MHz Geod processor with 128MB RAM, 100Mbps ethernet, CF socket, IDE connector and 2 Mini-PCI slots. This will fit just nicely into the remaining space in my case and can run from the 12V supply. Unfortunately I need the board for a "proof of concept" PBX project (I do this for a living) so it'll be a while before this board is free for use in this project.
I have a couple more sockets to add as well as a hole to cut in the front of the case for the counter to go into and then I'll be hanging it into the rack.
Monday, November 28, 2005
Things are a bit slow on the project front. I'm awaiting parts and boards for the G3RUH Standard.
In the mean time I've been playing with the Superclock. I've found a HUGE bug in the firmware. It took me a few tries to get ZL1BPU to agree that there was a bug too! To cut a long story short the bit of the code that works out the local time zone is majorly flawed. It's just a fluke that it works for its creator. In my email conversations with BPU he said that he never actually tested it on any other time zone other than New Zealand (UTC+13). He apparently manualy set the clock to all of the other time zones to see if they displayed local time correctly - which they do when UTC = 00:00:xx. If UTC is any other time the local time may or may not be correct. I had to set the UTC time to the top of every hour and then cycle through all the time zones to work out what was correct and what wasn't. Suffice to say that if you set the local time to UTC+1-9 it'll be OK. Otherwise it's in fairy land. BPU suggests that the bug is present in the GPSclock firmware too as it shares much of the same code.
In my email conversations with BPU I also mentioned that my Superclock was loosing about 10 seconds a day. I'm using a 12MHz TCXO which according to his web site and documentation is fine. He makes no mention of the fact that one has to change the sources to reflect the change in reference oscillator. However, I'm not too stupid to have worked this out and made all the relevant changes when I first built it. What BPU didn't document but told me in email was that the resulting "divide by" number that one gets when the frequency of the ref-osc is divided by 2KHz should have 1 removed from it and then converted to hex. In my case the result was 6000 (0x1770) but should have been 5999 (0x176F). Changing this value made it all work properly and its keeping very acurate UTC when compared to my many WWVB based clocks.
My new favourite radio station is CHU 3330KHz. I've found WWV to be very variable on all bands but CHU seems to be very stable from late afternoon until the following mid morning which co-incides with my shack ocupancy time. Not only that but it comes in here (Northern NJ) at a rock busting S9+60dB when it's dark. I'm able to listen in AM mode unlike WWV where I have to slope detect using SSB. Added to that, the way in which they read the time makes it much easier to set the clock. WWV has a 2 second gap between when the voice stops talking and the time signal sounds. CHU sounds the signal immediately after the voice anouncement thus no anticipation of the signal is required when setting the clock.
My wife often describes me as scaterlogical. I tend to flit from one thing to another seemingly unrelated thing very easily. Ha! She clearly doesn't understand the mind of an Engineer! One of the things that I've come to realise whilst persuing this project is that I am somewhat lacking in proper bench tools. Sure, I own an iron and a DVM. I even have a cranky old 20MHz scope to go along with my 5MHz hand held one. The problem I'm finding is that as the junk piles up on my work bench it gets more an more difficult to find a spot in which to put my meter down whilst using it. Due to the fact that I only have one of everything I often find myself removing tools from the bench too.
I think I know what I'm gonna spend my shack clearance money on now;
Looks like I might have to sell some more stuff ;-}
Update - 1500hrs
The mailman brought me lots of goodies. The G3RUH board has arrived as too have all the Digikey components except for the 74AC86 gate which is on back-order. Looks like I'll be getting the iron hot this evening.
I've decided that I'm gonna use the spare 10MHz and the 1PPS output on the RUH board to run the GPSclock. I'm thinking that as the 10MHz output is already disciplined it'll be in sync with the 1PPS and so that should satisfy the clock
Saturday, November 19, 2005
I went to the NJQRP meeting down in Princeton this morning. Whilst there I met up with one of their members (who's call I forget) whom is into microwave stuff. He'd built the G3RUH Frequency standard and had brought it along. Turns out that N1JEZ is making these boards in a few variants and that he has a few hundred for sale. The member claimed that the Standard is up and running within 3 minutes of GPS lock rather than the day or so for the ZL1BPU GPSclock/Standard.
I left there feeling both upset at myself and excited about the new way in which I'm gonna take this project. I'm gonna abandon the ZL1BPU GPSclock idea and instead go with the G3RUH board instead. I'm then gonna use one of the 10MHz outputs of the RUH board to drive the BPU Superclock instead of the 12 MHz TCXO I have installed on it currently (which is losing about 10 seconds per day!).
I've placed my order for the RUH board with N1JEZ and so I should see that some time later this week. I've also got the required Rockwell Jupiter GPS RX engine it needs and a circuit to divide the 10MHz down to the other frequencies I wanted. Looks like this is the way I'm gonna go now.
I spoke with George N2APB at the meeting. He's interested in this project for both personal and potential club use. He sugested that rather than use the divider circuit to get the other frequencies from the 10MHz source, use a PIC or similar and a push button to select the relevant division. This is actually quit a good idea not that I've had chance to think on it. The problem with using the divider circuit is that one gets divisions of 2 or 10 but that they are fixed. The PIC could do lots of funny stuff and offer powers of whatever. OK, so this would be fixed too (you'd have to re-program the PIC for different powers) but the point is that you could have more than just 1MHz, 100KHz, 10KHz, etc. You could have divisions of 3 if you wanted to.
Whilst thinking about this I had another idea. Why not make the frequency counter do the division and then count the result? That way one could have the LCD display the current division in use and it's acuracy. One to put to George I think.
I built the 50MHz frequency counter and currently have it using a 16x2 LCD. This is a bit of a waste as the display only uses one line but at least it works. The thing I like about this project is that it only took me an evening to build. I had to do everything from etch the board through to program the PIC. The download I found had everything in it one would need to complete the counter project. Click here for my web page on the counter.
Friday, November 18, 2005
I've found a damn good compromise and none of it requires me having to re-invent any wheels (although my square wheel is coming along nicely). I found the website of a firm called Almost All Digital Electronics. They make digital frequency displays for boat anchors. One of the things they make is a Frequency Standard and it's quite cheap. A rubidium source it is not but for $40 they'll ship you a pre-made board with a 20MHz TCXO calibrated to their rubidium source with outputs for 10MHz, 1MHz, 100KHz and 10KHz. They are using a public domain circuit and if I'm right I can connect this to the ZL1BPU GPSclock that I've built to keep it from wandering off over time.
They also sell a rather natty little 3GHz frequency counter kit too which gave me an idea. Perhaps I should build one of these and add it to the 1U chassis with a rotary switch. That way I can turn the switch and see that the different frequencies are doing their thing. The minor flaw here is that the counter uses a TXCO which is calibrated to the frequency standard in the first instance. One would have a collection of free running equipment.
I've been poking around the net again and found a Gazillion PIC based freq counters. One I particularly like has everything including the PCB artwork and it fits onto the back of the display. More about this when I get it built.
Thursday, November 17, 2005
I got the serial port stuff working on the clock last night so I can now set the time. One of the things that I've discovered is that the clock's firmware is preset to show NZDT (which makes sense as the author is a Kiwi). This can be changed by pressing some buttons on the computer. Problem is that the clock cannot be made to show UTC -5 or in fact any UTC negative time.
I got it to display the correct local time by forcing the clock to show UTC +19. Now the am/pm indicator displays correctly but is acutally tomorrows time rather than todays.
I took a quick look at the source code for the Superclock as found on BPU's web site. He make vague mention in his notes as to how you change the source to show a negative time shift but when I tried it I got a time of C3:00:00 when I tried it so that's not right. It seems that the +/- indicator is permanently set to + too. Again, a look at the source revealed that this is a fixed value rather than a dynamic one. I can fix this by changing the symbol in the source but it doesn't make the clock very versatile. Whilst I can't write code I can read it and it looks to me as though BPU has taken many short cuts. Either that or he only meant for the clock to be used in NZ?
I tried to calibrate the clock last night. The cal routine is based upon a PAL TV signal. Another indication that this clock is aimed at NZ. His notes make mention of the use of a GPS 1PPS signal but he doesn;t say how to do it. I think the way would be to use a dual trace scope. The GPS signal would connect to the REF pin and to the scope (as would the TV signal) and then the 1Hz output of the clock would go to the scope's other channel. Sync would be acheived by fiddling with the TCXO. That's what I think anyway. I'm not gonna spend too much time on the Superclock as It's gonna get converted into a GPSclock when then firmware arrives anyhow.
Wednesday, November 16, 2005
It's just past 2AM and I've spent the evening building the ZL1BPU Superclock. As you can see from the above pictures I got it to work. I built this clock as a learning tool. I've never handled or programmed an Atmel before and so this seemed to be a good place to start. It could also serve as the foundation to the GPSclock if that's the way I go. I have yet to attach a serial cable to it and set the time. I'm a little confused as to why the RS232 data gets inverted (see Superclock diagram) so I'm leaving that one until I've had some more sleep.
I had an email from someone asking why I put the WWV RX into the project. Why not? It was kicking around the shack getting in the way so I figured it might be useful to listen to the time every now and then. Of course, it'll get hammered by the Frequency Standard when I get that going so it might not be all that useful after all.
10am. Now that I've slept a bit and I've had time to reflect on this whole thing I think that the ZL1BPU GPSclock is the way to go forward for a number of reasons;
BPU's Superclock is almost identical in design to the GPSclock. The only variance is in the manner in which the T/OXCO is used. Thinking that I could build the GPSclock I went to ebay to see if there were and TCXO's or OCXO' s for sale. Yes there are and DAMN are they expensive! Sometimes ebay is not the place to go shopping and so I've been trawling the electronics supply wesites like Digikey etc. They are about the same price here too. Almost $70! In an effort to work out how much it'll cost to do this project I've started a little shopping list.
So I'm guessing that for $120ish one could build this project.
The more I read up on this the more I reaslise that the way ZL1BPU does his clock is actually the right way to do it. It seems that GPS time suffers from creep in that the seconds (and in turn the minutes and hours) are a calulation based on the amount of seconds that have passed since Unix Dawn Of Time (Jan 1 1980). This does not take into account things like Leap Seconds and political movements. Whilst this time is generally correct GPS time cam be as much as 10 seconds +/- of true UTC.
Luckily the 1PPS signal is kept within 1 micro second of true. In other words the 1PPS signal is actually transmitted every second. All we need do now is make sure that our clock can use this timing reference as its source. It still doesn't solve the problem of our local clock being wrong but it does make sure that it is stable and won't gain or lose. We'll just have to make sure that it gets set correctly I guess.
So that's it. I'm decided on the ZL1BPU GPSclock and its derivative, the GPS Disciplined Frequency Standard.
I guess I should have held off on buying that Rack mount box now. I have a bunch of different project boxes on the shelf from my local RadioShack's clearance. The whole thing would fit very nicely into that black and grey box they used to sell. The front would allow for the clock display and at least 3 BNC's that could carry the 1Hz, 1KHz, and 10MHz outputs. Oh well. I have the 1U case not and I've already drilled the holes etc so I guess I'm stuck with it.
The PC104 board arrived today. It won't fit into the 1U chassis. Oh well, back onto ebay it goes. It's not quite a proper PC104 board. It has PC104 facilities and will take the PC104 cards. It's more like a predecessor to the Mini-ITX boards that one can get now. This has given me an idea! Why don't I use a Mini-ITX as the NTP server? For about $40 one can get a case made especially to go in the car. It has mounting holes so that you can screw it to a panel in the car. It will also run on the shack 12V supply too.
Tuesday, November 15, 2005
Just started this web page today.
So far I have a 10" deep 1U rack mount chassis I bought from Lashen's for $60 (far too much money for what it is) and have installed into it an Axiom 12ch GPS RX with 1PPS and 2xNMEA serial outputs, a Ramsey 10MHz WWV receiver, 12V 2A switch mode PSU, 24x2 LCD display with back light and all the relevant plugs/sockets to get this lot to work. I wish I had better metal bashing skills. My rectangular hole for the LCD to poke through isn't as pretty as I'd like. Luckily I had the electronics kicking around the shack.
I've been looking around the net for some PIC or AVR code to take the NMEA data from the GPS and turn it into readable info on the LCD. Would you believe that I can find quite a few project like this but no-one has released their code? I find this a little odd. I was hoping to get a head start on this project by reusing someone else's code rather than try to write some (which I can't do). I was hoping to display the UTC time from the NMEA data on the screen as well as some engineering info like the amount of visible satellites etc. I contacted a few folks and even offered them money to give me a copy of their compiled code but they weren't having it.
I've found 3 projects that kinda sorta do what I want but not quite. ZL1BPU's Superclock, GPSclock and Frequency Standard projects look interesting but neither device reads the time from NMEA data. The 2 clocks free run. BPU's GPSclock can be disciplined by a number of sources such as a PAL TV signal or the 1PPS output of a GPS RX. All devices use an Atmel AVR AT90s2313. The firmware for the Superclock is free but the GPSclock costs $10 and this firmware is also used in the Frequency Standard. As BPU insists on cash for his software (no paypal or similar) I had to mail $10 to New Zealand so it'll be a while before I can get this running to test it out.
Mean time I ran across G3RUH's GPS Stabilised 10MHz Oscillator. Whilst it is no longer in production he was gracious enough to send me all the Gerber files and a diagram so that I could make my own. This circuit takes the 10KHz output of a Rockwell Jupiter GPS RX and uses it to kick an OCXO running at 10MHz. I think that this might well be the solution to my 10MHz aspirations.
I've been doing well with my shack clearance on ebay lately and my paypal account is somewhat flush so I spent some money on parts I'd need to move forward. I bought a PC104 based PC to put into the 1U chassis. This will serve as the NTP Stratum 1 server. The NTP software can directly ready the NMEA data from the serial port and make the time available on my Ethernet network either on demand or via broadcast. I'm very familiar with how all this works and so It'll be a piece of cake to get it working.
I've also had to buy some AVR's and a few 12MHz TCXO's to get the ZL1BPU stuff working. I also need to get an AVR programmer as it seems I don't have the required daughter board for my Willem programmer. I had a poke around the net and found that I could program my AT90s2313 chip via my PC's printer port with the help of 3 220 ohm resistors. Click here for more info.
I have hooked up an LED on the front panel of the 1U chassis to the 1PPS output of the GPS. It now winks at me every second
© & ® Mark A Phillips, G7LTT 1995-2005