Lightning Detector

After messing around with coherers for a bit I wanted to use one in an actual application. Somewhere I read about using a coherer to detect lighting. This caught my attention and I've designed a circuit that detects lightning, as well as being general enough to test different coherer designs.

The schematic is available in two formats, Dia format and as a PNG image. My design criteria were: 1) Isolation between the radio frequency part of the circuit and the microcontroller. 2) Use as little power as possible, battery operation would be nice. 3) Be flexible about the characteristics of the coherer that is used.

O.K. There were more than three criteria, but the ones I listed are the big ones. The circuit is flexible, fairly low power, and not too hard to build. One of the main components is a 8-pin microcontroller, this may be the hardest part to get. The assembly source file is available at this page. The components that I used aren't exotic, though some folks won't be able to program the microcontoller I used. The above link offers some options with regard to programming the microcontroller. As an aside, I think an electronics hobbyist should consider this diatribe:

In my opinion, the time for projects using discrete TTL/CMOS logic chips is almost gone. Discrete logic chips will continue acting as "glue" between other circuit components, but aside from one-two chip designs, I think their use is waning. A microcontroller isn't necessary to build this circuit, but using one does make it much more simple. The functionality of an 8-pin microcontroller has no comparison to a 555 timer chip (which I briefly considered using for this design.)

Using a microcontoller greatly enhanced this circuit. Please consider using a microcontroller in your next circuit, the benefits are enormous. For this circuit, I have easily replaced 4-5 logic and analog chips with an 8-pin, 8-bit, microcontroller! For a hobbyist, this screams for attention. Please don't discount this idea, what could be more fun than an electronics project that also involves programming? Invest in a microcontroller programmer today!

Circuit operation

When a radio frequency signal is received and its magnitude is great enough to trigger the coherer into conduction, a current flows through the LED in opto-isolator U2. Transistor Q2 amplifies the current from the photo-transistor in U2 and creates a interrupt signal that is tied to pin 5 of the microcontroller U3.

A low to high voltage transition on pin 5 of U3 causes a series of actions to take place:

    1. The LED D1 is turned on.
    2. If sufficient light is falling on the CdS photocell R9 then the buzzer is turned on. (If it's dark, I'm likely asleep and don't want to be bothered by the noise.)
    3. The electromagnet L3 is pulsed to shake the coherer out of its conductive state.
    4. Both the LED and buzzer are now turned off.
    5. The microcontroller goes to sleep and waits for another interrupt.

I left out a bit of detail in step 3. Sometimes it can be hard to force the coherer back into its high resistance state. Because of this, the microcontroller treats the coherer as a mechanical switch that must be debounced. The firmware currently makes five attempts to de-coherer the coherer. If it isn't successful, the coherer must be stuck and the LED is flashed in an infinite loop to indicate this state.

Mechanical construction

Since steel screws are used in the construction of the coherer, an electromagnet is used to apply force to the coherer to shake it out of its conductive state. Below is a photo of the arrangement I used:

I have used lengths of steel wire (the type used to hang drop ceilings) to hold the coherer very near the electromagnet. When the electromagnet is energized the coherer is quickly pulled against the iron core and this gives it a good shake! The best arrangement is to have the end of the coherer and the iron core separated no greater than the thickness of an index card (about 0.5mm).

The electromagnet I used is the coil from an old relay. It has a resistance of about 70 Ohms. While the schematic shows using 9 volt batteries, I only use batteries when I need the detector to be portable. With the present firmware, the battery life is about two days :( This is due to the coherer being shaken at 8 minute intervals to keep it sensitive. A longer interval between shakes would improve the battery life, as would a electromagnet with a greater resistance.

The coherer side of the circuit

For the coherer to be an effective lightning detector a long antenna and a good earth ground are necessary. My antenna is simply a length of hook-up wire ran up a vertical 8 ft. piece of PVC pipe. A longer antenna should make the detector more sensitive. A dedicated ground rod is sunk in the soil near the antenna for the earth ground.

The rest of the coherer circuit provides an adjustable voltage bias for the coherer and isolation from the microcontroller circuit. Battery life for this part of the circuit is very good. The quiescent current is only about 150 micro-Amps; the battery should only need to be replaced a couple times a year. The value of the inductors L1 and L2 is something that can be experimented with. I had some 1mH RF chokes on hand and used those. The results seem good, though I'm interested in trying higher value inductors; hopefully with a greater reactance present from the inductors, the sensitivity of the circuit would improve.

The microcontroller side of the circuit

A 12F629 PIC microcontroller is the workhorse for this part of the detector. When I started the design, I briefly considered using a 555 in monostable mode to provide the pulse to the electromagnet. The microcontroller has been much more flexable though. This is my first experence using an 8-pin microcontroller, and because of this experence I don't think I'll ever buy another 555 chip again!

Some coherer designs (ones that use nickel filings in my experence) have a low resistance when in the sensitive or off state. This resistance can be as low as 20k Ohms. Other coherer compositions have better off state characteristics; pure copper powder is one example of a material that shows almost an infinite resistance during the off state (my measurements put the resistance at > 40M Ohms.) Variable resistor R10 allows the optoisolator circuit to be adjusted to match different coherer characteristics. R10 should be adjusted so that when no signal is detected the voltage at pin 5 of U3 is less than one volt (of course the closer the voltage is to zero the better.)

If the coherer can't be de-cohered the microcontroller sits in an infinite loop flashing the LED. In this case, switch S1 must be pressed to reset the device. The CdS photocell should have a dark resistance of at least 1M Ohm. If you always want the buzzer to sound, just tie pin 6 to ground and do away with parts R6 and R9.

For more nitty-gritty details, read the source code for the microcontroller. The 12F629 is a simple device and the code is commented fairly well, so if you're familiar with PIC microcontrollers the code should be easy to follow. This has been an interesting project, being a marriage of old radio technology and some of the newest semiconductor devices. If you build this detector it will make spring time thunderstorms even more exciting than usual!

Photos of the finished detector

The lightning detector had been breadboarded for quite sometime (as was the case when these web pages were first written) and I'm glad to have the circuit assembled on perf-board and mounted on a wooden board. Two changes were made to the assembled circuit that aren't reflected on the schematic: the first is that there is one test point on each half of the circuit. There are two copper wire loops, at the top of the perf-board, that allow the voltage across the coherer to be measured and another pair of wire loops that allow the voltage at pin 5 of U3 to be measured. The second change is that the circuit can be powered by batteries or an AC adapter with an output of 12-18 volts DC. In hindsight, I should have also placed a switch in series with Q1 and L3; doing so would have simplified testing new coherers.