Well, I've made my National Grid frequency monitoring thingy as I mentioned last week.
It's taken longer than it should have done, which I guess is the way with these things. It took me about 2 hours to get the comparator to output a signal greater than a noisy 200 mV signal. Who'd have thought I needed to pull up the output to 5 V? Not I, clearly. I'm sure I've never had to do that with comparators in the past. Will hunt my 2nd year group project schematic which used one :) Or wait for Joe to say, "Yeah, we needed one".
Then the 5V regulator decided to have a hairline fracture on one of its pins, so I needed to swap it out... which was fun. Involved canabalising one of my final year project boards... so two times desoldering (which I despise!).
Then I spent too long wondering why my RS232 reading thing on the server kept bombing out... I'm transmitting in binary and when contol characters got in the data they kept getting in the way :( Yeah, I should have known better.
Anyways, it's done... wooo yeah...

The RJ45 keystone isn't actually required, it's there so I can reprogram the PIC should I need to!
Oh, so you want some results?
The graph is updated every 1 minute and shows the deviation from 50 Hz over the last 20 minutes. A new data point is added to the dataset every 2 seconds (its value being the mean over the last 50 cycles).
The device isn't logging at the moment because it may or may not have been causing my server to crash! I'm checking to see if that is the case at the moment...
I'm not sure how accurate the device is - it does show different results that the DynamicDemand website, but who's correct, nobody knows. I'd like to have calibrated it with a signal generator at work, but it was in another lab, and I didn't fancy breaking 7 grand of kit with my Mickey Mouse circuit...:-/
Yeah, we needed one :)
(I think...)
I seem to recall that particular section of our circuit board getting bodged around a little more than was strictly necessary.
Posted by: Joe Williams on August 28, 2008 2:08 PMI've still not looked :-)
I think a lot of the bodging was that we tried to use a 741 as a comparator, which added a shed load of bad touch to the circuit. The comparator we used in the end had a totally different pinout to the 741... hence the track re-laying and general bodgness.
Not having learnt from my mistakes I tried using a opamp as a comparator again with this circuit (having an opamp lying around on my desk rather than a comparator). This added badness again... 'causing everything to get very hot.
So, that's the last time I'm going to try that. Here's a tip for circuit building dudes, don't use opamps as comparators - although the idea of a device with high gain which will saturate it's arse off when there's no feedback seems to match the purpose of an comparator, the opamp isn't actually designed to saturate it's arse off... and might draw more current that you're expecting, get very hot and die...
Posted by: Ed on August 28, 2008 2:33 PMOK... so I had to check. We did indeed have a pull-up resistor on the output. If only I'd gone and looked at the report earlier when I was building - or even the simple example given on the data sheet for the comparator we used (LM393 - http://cache.national.com/ds/LM/LM193.pdf) instead of the one for the component I used (LM311 - http://cache.national.com/ds/LM/LM111.pdf), with the former making it blindingly obvious that it's needed!
Posted by: Ed on August 28, 2008 5:57 PM