HOME > > SENSING AND CONTROL MAIN PAGE > > SENSORS > > WEATHER > > DALLAS

Assembly instructions for the 1-Wire Lightning Detector kit

If you want to assemble a 1-Wire Lightning Counter kit, these instructions may help. The kit should be available from Eric Vickery's Hobby Boards is the same one! ($8.50 for bare board, $30 for kit of parts at 5/05, on sale since at least 10/04.) At one time, the kit was available from JJWare, then from Buffalorun. Sadly, at 10/04 both seemed to be defunct. Hurrah for Hobby Boards!

In a nutshell: When a lightning strikes, a pulse of electromagnetic energy radiates from the bolt. The Lightning Counter detects that pulse, and uses it to cause a register in a Dallas DS2423 chip to increment. The Lightning Counter kit will be of little use to you if you don't have a PC with an adapter for the 1-Wire, also known as the MicroLan. (Although you could intercept the digital signal that ordinarily drives the 1-Wire counter chip, and send it to the counter of your choice.) The adapters cost about $40 (2/05, from www.ibuttonlink.com, one of several sources), but they open up a whole range of fun possibilities. I've written a whole set of web pages about using 1-wire.

With luck, you'll read this before you open your Lightning Counter kit: Beware: one of the parts is very small... about 3mm on side. That's your DS2423- don't lose it! Also beware the inductor... it is a smallish cylinder that looks like it might be a magnet... and it is quite likely to roll off your desk if you don't restrain it!

You should have the items in the following list. Each line starts with the device's name according to the silkscreen on the pcb. The same name is used in the schematic, which you could once download from www.jjware.com, but can no longer. If anyone can supply what Jim had on that site, I've be very grateful for an email. Word of Jim himself would also be welcomed.

U1: The aforementioned DS2423.
L1: The aforementioned inductor.
OK1: An opto-isolator packaged in a 6 pin DIN (dual in line) package.
NE1: Neon bulb. (Don't expect to see it glow, by the way.)
Connector for 9v battery.
3 way screw terminal connector.
Resistors R1-R5. Their values are as follows. The ones I had were marked with the numbers shown, rather than the traditional color bands indicating their resistivity:
R1: 15k, marked 1502
R2: 100k, 1003
R3 and R5: 1 Meg, 1004
R4: 430 ohms, 4320
D1, D3, D4: Diodes. There is no D2. Ignore the one shown in the circuit diagram you could download from www.jjware.com at 9/03. Black cylinders with wire coming out each end, and a band painted on at one end.
T1,T2: Transistors. Little blobs of plastic with three legs coming out from one end.
C1: capacitor (There's only one... it's what's left when you've taken out everything else above!

These instructions are for the 1-Wire Lightning Counter module marked "Lightning V 2.0a (c) 2002 JJWare, Inc". In what follows, "down" will mean towards the edge with the text I just quoted; "right" will mean towards the end with the pad marked "ant". Everything you add to the board is added on the side with text printed in white, e.g. "DGND" in the upper left.

Examine your board carefully. A bright light and a magnifying glass may not be excessive. I've never had trouble with a Hobbvy Boards board, but there's always a first time, and faults are much easier to find and fix before you've added components. There should be no breaks in any tracks. The two pads at the upper right of U1 are both supposed to connect to OK1, in case you see the link and wonder.

You can skip this paragraph: Speaking of the boards tracks: I would be inclined to make the following modifications to the board so that the two counters in the Dallas chip can both be used. As supplied, the board will use both counters to count the lightning events. This is nice if you want maximum compatibility with software for reading the device, but there is nothing to stop the programmers from making it easy for you to specify which counter has the lightning information. In any case, it is easy enough to reconnect the input I'm suggesting disconnecting!

Continuation of first "you can skip": To make the spare counter available: Read all of this paragraph before starting. Very carefully cut the track between the two pads at U1's upper right. When you've done that OK1 connects only to the corner pad of U1. (The pin 6 pad. The pins are numbered counterclockwise around U1, starting at the upper left.) Drill a suitable hole near the pin 5 pad so that it will be easy to attach a wire to the board that will solder to the tiny bit of track leading away from the pin 5 pad. If you cut the track between pads 5 & 6 intelligently, you will have maximized the available track connecting to pad 5. Scrape away the green solder resist material covering the part of that track which you will eventually solder your input to.

Another paragraph you can skip: I would be inclined to mount the neon bulb lying flat on the pcb. If you want to try this, you might want to drill two holes in the board's right hand edge, near the bottom of that edge, and perhaps cut the ANT/R1/NE2 track where the leg down to NE2 branches off from the ANT/R1 track. This will make it unlikely that the lower of the neon's lead, stretching across the bottom of the board to where it needs to connect, can short to something it shouldn't.

Back to things you don't want to skip: The tracks and pads on the board are so well spaced that shorts are unlikely. If you want to put an ohmmeter across possible shorts, you can. I tested the three pads of the connector at the left end of the board and the pads of U1, and the only shorted pads in this set are 5 & 6 of U1.

This is the time to check that you received the right parts, and know which is which. Check them all now.... you don't want to have to take out of the board something that you THOUGHT was, say R1, only to discover later that it wasn't. I recommend a tray with a piece of paper in the bottom. As you identify things, draw a circle around them, mark which part they are.

Good news! This project has lots of duplicate parts: The two transistors (Black plastic half cylinder with three legs) are both the same, so either can go in either T1 or T2. The three? diodes are all the same. (Black cylinder, wire out each end. On the cylinder, there's a band around it, near one end.)

The five resistors are of four different values. It matters which one you put where.

A word about "polarity": Most of the parts can be inserted into the board either way "around". I'll be explicit in cases where this is not true.

Start by soldering the DS2423 into place. The device is called U1 in the Lightning Counter circuit. This must be turned the right way. There is a tiny dimple in the plastic near one corner on the device's top face. That goes to the upper left, i.e. to the pad which connects to D4's upper pad. If you have a bunch of these tiny devices (known as SMT, for Surface Mount Technology) to solder, see my notes about working with them in my notes on assembling the Bray/Atkins barometer circuit. For this project, a low tech answer works well: Very carefully, getting the alignment just right (both up/down and left/right) stick the device in place with a piece of Scotch tape! Apply the tape across the narrow dimension of the board, leaving one side of the chip, with the tree legs of that side, exposed. Solder carefully... don't apply too much. Then, holding the chip carefully to the board, so that you don't strain your new joints, remove the tape and solder the other three legs to the pcb.

Solder in the diodes. They too are polarized devices. The band on the device goes the same way as the band marked on the board, i.e. D1 & D3: to the right, D4: down.

Solder in the capacitor and R5. (Neither is polarized... remember: I'll say if a device has to go in the right way 'round.)

Solder in the screw terminal connector block, being sure to turn it so that the openings for your wires are to the left.

Solder a short (about 4") piece of wire into the upper left hole of the pads for OK1. This will come out again in a moment, but it will simplify initial testing.

Inspect your work carefully, especially the soldering of U1, the tiny Dallas chip. Be sure no short circuits have been created by careless soldering. Then attach the Lightning Counter board to a 1-Wire system, running Dallas's very useful iButtonViewer software. Connect the 1-Wire Ground to the top connector of the Lightning board, marked "DGND". Connect the Dallas Data/Power to the middle connector, marked "DQ".

The iButtonViewer should reveal the presence of a DS2423... the device ID ends "1D". Set the counter page to 14 and the sample rate to 0.5 seconds. If you touch the wire going to OK1's pad to the center connector on the terminal block (Dallas Data/Ground), you should see the count rise... probably quite dramatically. The multiple counts are due to something called contact bounce, and shouldn't be a problem in the finished device. The counter in page 15 should also be increasing, unless you took my suggestion and broke the trace shorting pins 5 & 6 of the DS2423.

Get that much working, and then we can proceed....


Remove the "short piece of wire" which you had in OK1's pad.

Slip a lead from R1 into the hole though the inductor, L1. If you are lucky, the resistor itself will fit inside the inductor, which will make a neater assembly, but it isn't necessary for the components to be arranged that way. Solder R1 into place. If the resistor would not fit inside the inductor, having the resistor sit at right angles to the pcb is probably the neatest solution.

Install the remaining 3 resistors.

Solder the 6 pin IC into position OK1, being careful to install it with the end with the notch pointing towards the bottom of the board.

With the neon and the transistors, don't push them down tight against the board. Two or three mm of lead showing above the surface of the pcb will provide a little "safety margin" between the hot soldering iron and the possibly sensitive transistor innards / glass bulb. Don't make the leads so long as to be sloppy, though. And I've had more problems over the years from underheated joints than from overheating.

Solder in the neon and the transistors. The flat face of the transistor "cans" faces to the right, as indicated by the markings on the board.

Solder the battery connector to the pcb. The red lead goes to the hole marked "+9v", the black lead goes to the unmarked hole just to the left of the +ve connection point. The battery is just to power the LED in the opto-isolator (OK1), and I'm told that it can be expected to last at least a year.

Solder a length of wire to the pad marked "ant". This is the antenna which will be picking up the electromagnetic pulses emitted by the lightning you are trying to detect. The specs call for a 12" of antenna. I am tempted, and have had a little encouragement from someone who knows more about it than I, to install a much longer wire so that I can have my electronics indoors, but still get at least part of the antenna located where it can "see" the storms well.

By the way... I suppose this is as good a place as any... please understand that this information is presented without accepting any liability. YOU are responsible for what YOU do... and this includes doing anything suggested in these notes. Lightning is dangerous to life and to electronics. Am I going to connect one of these circuits to my home and my PC? Yes. But don't come whining to me if you somehow get a lightning strike, or some other problem, that does anything you don't like. Sorry. Now I'll put the lawyer back in his box and get back to more interesting things.

The circuit will not work if you do not provide the right sort of ground-to-earth. The 1-Wire data ground that you connect to via the upper terminal in the block, marked "DGND" (Dallas GrouND), is one sort of ground. Necessary, yes, the "ordinary" electronics ground. For the Lightning Counter to work, you must also provide an ground-to-earth. You do this by connecting the lower terminal from the block, marked "GND", to a wire connected, eventually, to some bit of metal buried in the ground. Connecting to a water pipe is one option, if you are sure that the plumbing is metal from where you attach your wire until the pipes go underground. Even this may not be good, if the pipes are too efficiently coated with, say, tar, to prevent corrosion. Except in very dry areas, a 4' metal rod driven into the soil is another option. Bottom line? If your unit isn't working, consider your earth-to-ground.

While I have tried to be comprehensive in these notes, you might want to check www.jjware.com to see if there's any late breaking news. Several things above come from things posted there, as does the following:

Mount the device with a 12" antenna about 10' above the ground. That should give you lightning detection over about 50 miles.

If you want suggestions on an effective and economical weatherproof housing, visit www.jjware.com and download the zip called LD Assembly Pics by William Sheehan. If you want to see a good picture of an assembled module, to check your work, that's the "Lightning Detector Pix" by Eric Vickery.

Best wishes! I hope your counter is up and working quickly, easily.

Oh yes! There you sit with a shiny new detector... and no thunderstorm! You can create "fake" lightning, to test the device, by clicking a piezoelectric sparker, as used for lighting gas stoves and fires in barbecues and fireplaces, near the antenna. It must be a piezo type sparker, not one using a flint-type substance pressed against a round file-like thing that scrapes a spark from the flint. Anything that makes a radio "click" is a possible source of fake lightning. When I first set my counter up on my worktop, the antenna happened to run close to an old computer monitor. Turning it on and off produced counts.

Enjoy. Feedback welcome. Even more appreciated would be if you were to visit my freeware/ shareware store and try, or pass on to a parent or school, some of my freeware or shareware!! (There's a link just a little way down this page)


You may want to visit my other page with Dallas 1-Wire specific stuff. Some is related to weather sensing, and some is more general.
Be sure to check other pages of this site for things which might have appeared on this page, but were either mis-sited or had a more general relevance. Click this to search this site without using forms, or just use......
powered by FreeFind
Site search Web search
The search engine merely looks for the words you type, so....
*    Spell them properly.
*    Don't bother with "How do I get rich?" That will merely return pages with "how", "do", "I"....

Please also note that I have two other sites, and that this search will not include them. They have their own search buttons.
My site at Arunet.
My oldest site. (It's at Compuserve).
Ad from page's editor: Yes.. I do enjoy compiling these things for you... hope they are helpful. However.. this doesn't pay my bills!!! If you find this stuff useful, (and you run an MS-DOS or Windows PC) please visit my freeware and shareware page, download something, and circulate it for me? At least (please) send an 'I liked the parallel port use page, and I'm from (country/ state)' email? (No... I don't do spam) Links on your page to this page would also be appreciated!
Click here to visit editor's freeware, shareware page.

Other projects

This is just one of the guides I have published on the net. Please visit any of the following that relate to interests you have....

Delphi Tutorials
Pascal programming tutorials
Electronics for hobbyists and schools
Main Home Page

You can email this page's editor, Tom Boyd. Click here for details.

Index of sensing and control pages (From there you can also go to other help from the editor of this page.)

-- Page ends --