Shown on the left is the circuit diagram for the receiver part of the clock. This schematic is essentially a sensitive 60kHz receiver and ASK demodulator. You could use it as a simple receiver for other frequencies by just taking the signal at point 4 and adjusting the Inductor (antenna) and shunt capacitor to match the frequency you wish to receive.
The circuit should be fairly self explanatory. Firstly the power for the receiver comes from the PSU/decoder, and can be around 13-20V. A 7809 9v voltage regulator brings this down to 9v for our needs, there’s no need for a heatsink on the regulator if it’s the 1A type. As far as receiving the signal is concerned, the ferrite antenna and two shunt (parallel) capacitors adjust the frequency that they resonate at, according to this equation:

We can’t really change L, it’s set by the ferrite rod antenna (code LB12N from Maplin) Once you have found a C value to set f as 60kHz (I found C to be around 840pF), they will resonate and you’ll be receiving any 60kHz signal in the air. This signal is obviously tiny though, so we amplify it. The first stage of amplification is a JFET (2N3819). This has an extremely high input impedance, which is exactly what we want. The JFET’s gain is set to 10 by the 1k and 100R resistors. After a DC blocking capacitor there are two identical stages of op amp amplification. The gain of each op amp is set to -214 (the - indicates that there will be a phase shift, we don’t care about phase so that’s ok). Each op amp also acts as a low pass filter, attenuating frequencies higher than 72kHz, which helps us a lot.
After this we’re at point 2 in the schematic and we have a big 60kHz signal. This signal is turned into a DC level by the use of a low voltage drop diode (a germanium type would be ideal, silicon types e.g. 1n4001 are not suitable) and a 10n capacitor. The resulting DC level is then fed into a comparator, a low pass filter to weed out any fast spikes, then another comparator. The levels of each comparator can be adjusted. Simply adjust each 10k potentiometer until you get a decent signal. The LED will flash at 1Hz when a good signal is received.
The best way of setting the circuit up is by the use of an oscilloscope. If you live near Anthorn then you can ditch one of the TL081 op amps. The shunt capacitor value next to the ferrite antenna will need fiddling with to get a decent signal, and you may find that the resistors around the comparators may also need adjusting, the 10k potentiometer may not have enough adjustment for your needs.
So there you have it - the schematic for a sensitive 60kHz receiver. Feed the output of this into part one of the schematic and you’ll have a perfectly working, completely accurate clock!
The circuit could be improved significantly by ditching the germanium rectifier diode in favour of a system that does not give us a voltage loss. There are plenty of example circuits around for op amp based rectification circuits, but I didn’t have the veroboard space to try some other rectification methods.
I’ve just moved back to University for my final year, and as such have found some time to draw up half of the schematic for the rugbyPICclock! I was pleased to find that as soon as I arrived in Bath, I plugged in the clock, it received the signal fine and was displaying the time in no time.
Shown to the left (click for a big version) is the schematic for the digital part of the circuit. This schematic has four inputs, Mains Live, Neutral and Earth and the digital signal input from the receiver. A common cathode 6 digit LED display is connected to the MAX7219 in the schematic. Exact details on how to go about connecting the display up to the MAX7219 are given in the datasheet.
Note that if you are building this circuit you should be very careful when dealing with the mains parts if you don’t have experience, you could really seriously injure yourself. As an alternative to the power supply, you can buy a 12v DC power supply (or use a 12v battery) and connect it to the ground and input pins of the 7805. You should bear in mind though that the receiver won’t work as well if the 0v isn’t connected to mains earth. Thinking about it, connecting the mains earth to the low voltage parts of the circuit probably goes against some kind of wiring regulation. The general rule is fairly obvious, just don’t touch mains parts in the PSU when it’s on. That way you’ll live.
I tried for ages to find a decent free program to draw the schematic in a pretty fashion, but couldn’t find one so in the end resorted to drawing it (messily!) by hand.
I’ll post up the PIC code soon (or can email it to you if you mail me), because it’s still a work in progress. Losing my PIC Programmer power supply in the Cheltenham to Bath move doesn’t help.
Just as an aside, I’ve now confirmed that the clock receives a signal and works fine in Cheltenham, Bath and Stevenage, all in the south of England.
I’ll get to work on the receiver and demodulator schematic. This is nowhere near as simple as this schematic though, so it may take a while.
minor update…
The clock still isn’t in a case, I managed to find a metal case just big enough for the receiver board, so I trimmed the receiver board down to size to get it in, to then discover that it hates metal boxes and stops working all together, d’oh!
I’ve spent a long time reworking the PIC code, to try and make it more robust, and have it decode the time successfully more often. As the official NPL Datasheet shows, 2 bits are transmitted a second. To decide whether you’ve received 00, 01, 10 or 11 in any second, you look at the length and timing of the pulse that is sent. The PIC code used to sample the incoming pulses 3 times, and then make a decision on what the received digital bits were based on those 3 samples. I have now reworked the code so that the incoming pulse is sampled 300 times, and averaging is used to decide whether the incoming pulse should be 00, 01, 10 or 11.
Still need to put it in a case though!
hurrah! it works again!
In order to receive the now super low power signal, I had to add another amplification stage to the receiver. The new stage is identical to the first stage. I’m using a TL081 JFET input op amp, but any decent op amp will do the job (note that a 741 isn’t decent!). The op amp is set up as an inverting amplifier, R2 (feedback) is 47k, R1 is 220R. There is a 47pF resistor in parallel with R2, to turn the amplifier into a low pass filter. The 3dB cutoff point is described by the equation below:

In our case, fc works out to be 72kHz, so all frequencies under this are passed, frequencies over this are attenuated.
The newly amplified signal is then fed into a diode and smoothing capacitor, as before. After this stage, a comparator is used that can be set to output high when the 60kHz time signal is present, and low when it isn’t. When the signal was being transmitted from Rugby this was the last stage of the circuit, but unfortunately now there are so many spurious pulses detected as a result of the extra amplification, that I have had to add an RC series low pass filter on the output of this comparator, to filter out any short spurious pulses. R has been set to 47k, C is 220nF. This filtered signal is then fed into yet another comparator, the output of which produces the digital pulses that comprises the time signal. Yay!
Sadly that wasn’t the end. The scan rate of my display is 330khz, that is to say that each digit is flashed on and off 330,000 times a second. This is so that many digits can be controlled with not may pins, every display segment is linked to the next one. Only one display digit is ever on at a time, but the human eye cannot see this. This display scanning creates a lot of RF interference, which leaks into my amplification stages and completely swamps the time code signal. I’d managed to make a time code signal jammer with my display. Brilliant.
In order to overcome this I tried putting the display in a screened box, but this did not help. A long bit of wire with ferrites on each end also did not help with the interference problem. In a moment of genius (even if I say so myself), I wound some old thin copper wire I had kicking about around a ferrite rod, and connected it in series with the 12v supply line between the receiver and the display. This eliminated the interfering signals enough on the line for the receiver to work as it should. Yay! So now the clock is happily sitting telling me the time, without fault.
Time to put it in a box then!
Time Signal Moved to Anthorn….
…..and I can’t decode it anymore!
The signal has moved from being transmitted 60 miles away from me, to being transmitted 360 miles away from me, and my receiver isn’t having any of it.
I’ve tried a few little things to try and improve the sensitivity of the receiver, but so far to no avail. I also tried using the lock detect line on a phase locked loop (PLL) to see if I could lock to the 60kHz signal. This posed a problem though, because of the nature of an amplitude shift keyed signal, which is what the 60khz signal is. The power level of the signal I was receiving was not enough to get the PLL to lock, and if I increase the amplification in the signal, the entire circuit oscillates, putting the PLL into a permanant lockup. All very annoying!
I’m going to work on making an ultra sensitive receiver, to hopefully get a decent signal to feed into my already constructed PIC decoder and display.
building the display..
Now I’ve got to the point where the display needs to be built. True to form, I’ll be mounting the digits on stripboard. I’ll be using three double digit red LED displays, two for hours, two for minutes and two for seconds. Every segment of each digit needs to be connected to the corresponding segment on the other digits, and then to the display driver IC. This means that 48 segments need to all be interfaced and connected up to the right places, a wiring nightmare!
Below you’ll see an image of me working on the wiring. I have decided to wire in two modules (4 digits) first, and then just piggy back the third module off the second. It’s quite hard to explain, but when I get the wiring diagram up and sorted it should be fairly self explanatory!
The display driver and PIC are going to sit on the same board as the display. I’ll be mounting the display driver IC as close to the actual display as possible to try and minimise the effects of electromagnetic interference, something that could cripple my sensitive receiver circuit.
On a slightly different note, it’s interesting to note that the 60kHz time code transmitter is currently in the process of moving from Rugby to Anthorn (probably should have thought about that before calling this the rugby pic clock..). The transmitter at Anthorn was being tested today, but unfortunately I was at work so couldn’t check whether my receiver still worked well. It would be a bit of a bummer if the signal is now too far away to decode reliably, but I’m sure it’ll be fine!
That’s it for the time being! It’s probably all very tricky to understand at the minute, but I will get a complete schematic up soon, which should make things much simpler.
time signal decoded
I’ve built a simple decoder circuit on some breadboard, using a PIC. The inputs to the decoder are +5v, 0v and the time code signal obtained from the receiver. The PIC has code running on it that decides whether each pulse is a 0 or a 1, it does this by using simple time delays and bit reads.
I started writing the PIC program in assembly language, but it became hideously complicated when trying to extract the time from the list of 1’s and 0’s, so I moved on to using a program called mikroBasic. This program allows me to write a PIC program in BASIC, which is then compiled into assembly language, which I feed to Winpic to program the PIC using the programmer I made.
The program I have made stores the current time in variables in the PIC’s memory. I then needed a way to somehow get the time out of some memory onto an LED display. I tried a few different chips for interfacing with an LED display, and finally settled on a Maxim MAX7219. This is a ‘Serially Interfaced, 8-Digit, LED Display Driver’, which essentially means that I connect this chip with up to 8 LED digits (I’ll only be using 6, hh:mm:ss) and then program the chip through a serial SPI BUS, telling it what numbers to display. There are three inputs on the MAX7219; CLK, SDA and CS’. These three inputs are connected to a PIC output port. I have then written code that accesses the SPI capability on the PIC, allowing us to send data to the MAX7219, telling it to display whatever digits we want.
I had originally stated that I was going to use a PIC 16LF84A, but I’ve now decided to use a PIC 16F88. This is because the 16LF84A doesn’t have a built in SPI capacility and the fact that the 16F88 has more memory and is cheaper.
The only problem I face now is finding an LED display to use! Farnell sell a perfect display (click), but you need to spend £20 before they ship anything to you, so that’s not really an option. I could use Maplin, but they only have red digits in stock (the green ones are in their catalogue but there is no stock in any store, work that one out), and I’d like the display to be green. Also, I’d like the seconds to be smaller than the hh:mm, and Maplin don’t have any small LED digits in stock, not very helpful at all really.
Looks like I have some hunting to do!
Note that I have decided to wait until I’ve finished this project before knocking up a circuit schematic or putting the code up, it doesn’t make sense to stick anything on the net until it’s final, as it changes so often.
receiver success!
After going through the theory on the receiver circuit below, I’m pleased to report that I’ve had some success with a fairly simple little circuit that I knocked up.
After a lot of trial and error with capacitor values (which culminated in me asking the guy in Maplin for 2 of every value capacitor he had) I managed to hit upon the right combination of capacitance and inductance for me to receive a fairly good 60kHz signal, as the rather shaky mobile phone video below shows! The combination that worked for me was a 470pF in parallel with a 330pF capacitor, making a total capacitance of 800pF. The inductor (antenna) that I used was Maplin code LB12N, with all of the windings wired up in series. According to a datasheet Maplin provided for this antenna, this should equal an inductance of 3.5mH, but I’m not convinced. Hey ho - it receives the signal fine!
Click here to see a video of the receiver in action, showing the signal on my scope. The length of time that the carrier is sent (i.e. there is fairly big signal on the display) decides whether a 1 or a 0 is being sent. This results is a string of 1’s and 0’s, which can be decoded to give the current time and date.
I’ll knock up a quick diagram of the 60khz receiver circuit and post it here in the next few days, incase anyone’s interested!
Receiver Circuit
Been a little while since I’ve updated this, but I’ve been hunting down an oscilloscope to try and develop a receiver circuit, trying to work on the circuit at work (where I have access to every piece of test equipment under the sun) in my lunch breaks has proved difficult as I’m too busy at work to give it time!
I’m using a bog standard LC circuit (simply an inductor and capacitor in parallel) to pick up the 60kHz signal, by choosing certain values of inductor (L) and capacitor (C), the inductor can be made to resonate at a particular frequency, given by the equation below. Basically, if you have the LC circuit resonate at 60kHz it’ll pass anything it receives on 60kHz into the next stage of the circuit.
 where f=frequency (hertz), L=inductance (henrys), C=capacitance(farads)
Only a very small signal is received (sometimes only a few millionths of a volt), so this needs to be amplified before anything can be done with the signal. I will be using a JFET for an initial amplification, which will then be fed into an op-amp. The reason for the JFET is that it has a very high input impedance (as good as an open circuit), so none of the signal will be lost to ground, which is very important when you’re talking about millionths of a volt.
Once the signal has been amplified, it can then be rectified (turned into a DC voltage level). I’ll probably then use a comparator to make the signal a perfect digital signal, before feeding it into an input pin of a PIC.
Due to the nature of the circuit, I probably won’t be able to build it on a breadboard (prototype board, plug board whatever you want to call it!) before putting it onto stripboard, because breadboard is famous for being useless for RF applications because of stray capacitances and inductances through the board, which make any half sensitive circuit you put on it oscillate horribly.
My local Maplin seems to have sold out of everything I need to make a suitable inductor (antenna), so the building is delayed until they get their act together and order some bits in!
Meanwhile, I’ll plan and get the amplification stages of the circuit onto some stripboard and test basic amplification functionality.
It took a while to get working, but I’ve finally got the PIC programmer working perfectly with my PC!
I’ve included the final circuit below, I can confirm that this works 100%, with Winpic PIC programming software, using NOPPP.ini that is included with Winpic (don’t bother with the NOPPP software on the official site). You can write and read code from the PIC, it works a treat!
The reason it took a while to get working was the fact that one of the resistors in the NOPPP schematic was causing the logic levels on the input to the parallel port to be a little on the low side, meaning that the 1’s and 0’s weren’t being read into the parallel port correctly. The resistor in question is R6, which I’ve removed from the schematic linked to below. I’ve also added the 7805 voltage regulator that I talked about previously into the schematic.
I constructed a simple test circuit on the corner of some stripboard and came up with some simple code to flash an LED to confirm that the PIC was being programmed correctly, it was! If you’re not sure how to write code for PICs, then I’d recommend the PIC Tutorial, this will show you how to construct a simple test circuit for your PIC, and give you all the information you need to know to start learning how to program your own PIC.
The final PIC Programmer circuit that I used and can confirm works perfectly is given below. It’s important to note that the power supply for the circuit must be at least 12.0v, if your power supply provides 11.9v then it’s likely that your PIC will be programmed, as the 12v is used as a signal for the PIC to initiate the programming sequence.
Revised, working NOPPP schematic:
Next on my to-do list is to come up with a simple receiver circuit to receive, amplify and demodulate the 60kHz time code signal that will eventually be fed into one of the PIC’s input ports. I suspect that this will take a while, based on the fact that my only (realistic) component supplier is Maplin Electronics. Maplin have become notably poor in recent years for supplying electronic components, discontinuing hundreds and hundreds of components in order to replace them with stuff you can buy from Argos, hey ho!
I’ll get to work on a 60kHz receiver circuit!
Search
Recent entries
About
This is the about text


