HOME > > DALLAS MICROLAN SECTION INDEX > > HARDWARE VENDORS

Building Hobby-Boards Dual Counter Module for 1-Wire (aka MicroLan)

This information is meant to help anyone assembling the 1-Wire Dual Counter module designed and sold by Eric Vickery via www.hobby-boards.com. The experienced electronics constructor certainly won't need these notes... the board is not hard to assemble, but even he/ she may find that the notes help a little. It should be noted that these instruction are from a third party. Any faults are not Mr. Vickery's!

There is a circuit diagram and photographs which will help you at www.hobby-boards.com

Everything goes on the side of the board with the legend "CR2032W" (that's the battery), i.e. the side with the pads for the smt.

In the course of this document, you'll see "top", "left", etc. These references assume you are looking at the PCB with the hole for G1's "+" terminal at the upper right.

First, install (by which I mean throughout also to imply "solder in place") the DS2423. That's the little black rectangle of plastic with 6 metal legs, or "pins". In preparation for soldering that in place, I used a knife to GENTLY scrape the pads for it on pcb. I also VERY gently scraped the "feet" of the DS2423. Having both surfaces clean and bright before you start helps get a good solder joint.

You'll need a steady hand, at least a fine-tipped soldering iron, and probably some way to magnify what you are doing. Some very fine solder is also a help. There are various guides on the web to smt work. I'm afraid I must confess to building my Motion Detector with nothing fancy, just a little care. Would I want to do a lot of smt work with my very basic tools? No... but don't buy a $150 soldering station to do a few hobbyist kits! If you are doing something more extensive than the Motion Detector kit, you might find the notes I did for Atkins Bray barometer assembly helpful.

The corner of the chip with pin "1" has a dimple on the top side. That side goes AWAY FROM the left edge of the board, the edge with the five hole in a column for the screw terminal block. (qToAdd,NextEdition....show with arrow in illustration.)

If you are of the "clean the board after soldering" school of thought, this is a good time to do it.... if you have the proper solvent. Beware isopropyl alcohol sold for cosmetic purposes as it may have skin moisturizers (oils) which may make subsequent soldering harder.

Before I go on, I should mention: Don't drill out any holes in the pcb, if you feel the "need" because something is a tight fit. In some cases, there is a film of metal lining the hole, and it is a vital part of the circuit, linking traces on one side of the board with those on the other.

If you want to "test as you go", you can install the screw terminal block at this point. (You can do it now in any case, but you may prefer to do it later so that it isn't in the way (it isn't MUCH in the way) while you solder in other components.

From the 1-Wire adapter that you have (or will have!) plugged into the computer come two wires. The easiest way to make sure you're doing the hookup right is to connect a voltmeter to them, after plugging the adapter into the computer and turning it on. (You don't have to shut off the computer to plug in the adapter if the computer is already running. Also, the 1-Wire units are "hot-swappable".) One wire will be carrying a nominal 5v (from an iButtonLink adapter I was using I was seeing 7.8v when the wires were not connected to anything.) The other wire is the 0 volts, "ground", wire. (Note for beginners: If your voltmeter shows NEGATIVE 5v, it means that you have the "positive" lead from the voltmeter connected to the 1-Wire "zero", and the other lead from the voltmeter is connected to the 1-Wire "(positive) 5v". Don't worry... nothing is "wrong", and no harm will have come to anything.) The wire carrying 5v is usually called the 1-Wire Data, or Data/Power, or "DQ" line. It is PRIMARILY a data line, but some 1-Wire chips can "collect" the little power they need from the data line, hence the second name. (The Vickery Dual Counter (as do many others) uses this technique, called parasitic powering. The battery which comes with the Dual Counter kit is to keep the chip from "forgetting" the count-so-far when the module is not plugged into a MicroLan, or it is turned off.

Connect the zero volt 1-Wire wire to terminal 1, and the Data/Power wire to terminal 2. The terminals are marked in the silkscreen, but, just to be clear, "1" is at the top, i.e. far from R1, and the rest are arranged in order.

The iButtonViewer program (free from Dallas) should "see" the device, and can even tell you what's in the counters, probably 0 at the moment. The device ID will end with "1D". Disconnect the device from your computer, and proceed to...

Continue building...

(You may find that it pays to give a light scraping to the leads you are going to solder.)

Don't solder anything further for a moment! Read down to at least "Now solder in the diodes" first.

The three diodes will each be marked with a band at one end. With two of the diodes, carefully bend the lead at that end though 180 degrees, taking care not to stress the point of contact with the diode too harshly. With the other diode, bend the lead from the other end in a similar manner. The diodes go into the board in locations D1, D2 and D3. They will be mounted at right angles to the board. Each one will be "over" the hole near the edge of the board, and the lead that has been bent around 180 degrees will connect to the hole just below (i.e. closer to R1 and R2) the other hole.

Put the "oddly" bent diode in the left hand position, D1's. The other two (bent the same way as one another) will go in the positions marked D2 and D3. This should leave you with the band on the diode near the board for D1, away from it for D2 and D3. This assumes that you have the bent over wire on the "inside" in each case, as described above.

If you want to check you've understood, however you fit the diodes, the end of the diode with the band should be connected to the hole the diode-symbol-arrow, printed in the silkscreen, points towards.

Now solder in the diodes.

The remaining components can be installed either way "around". When you install the resistors, also mounted at right angles to the board, make them "face inwards", the way the diodes were installed, to minimize the chance of the exposed lead (which has been bent through 180 degrees) shorting to something off of the module.

The small yellow (probably) blob with two leads is "C1". Insert it in the circuit board. Insert the two resistors, R1 and R2.

That's it, for assembly, except for the battery, which, as I said, isn't "needed"... you might want to postpone installing that until the module is brought into use.

(Re-)connect the module to the computer. (See above, if you didn't do it then).

Start up the iButtonViewer, double click on the 2423's line (It will end "1D"), and select "Counter Viewer". Check the count for page 14 and 15. They're probably both 0 at the moment, don't be too alarmed if they aren't. Be sure that the iButtonViewer is sampling continually, at once every second or two.

Select the view of page 14. Short terminals 3 and 5 a few times... You should see the count in page 14 rise. Don't worry if it rises by tens of counts per short... more on this in a moment.

Select the view of page 15. It should be still be whatever it was previously. Now short terminals 3 and 4. That should make the count on page 15 go up.

The name for the reason that the count may rise more than a single unit if you use a wire or somesuch to short terminal 3 to 4 or 5 is "contact bounce". As the wire connects, it may connect/ disconnect/ connect many times over a very short period of time, as the pressure of the contact rises quickly from zero (not yet touching) to something higher. The sorts of things you are likely to connect to the counter, in particular reed switches, have minimal contact bounce problems. If you do not need to count things that go on/ off/ on/ off very, very rapidly, there are ways to get rid of false counts due to bounce... see the web!

If you wanted to monitor a wire with a voltage which is sometimes high, sometimes low, counting the transitions, it can be done with the dual counter. If you are unsure of the right way to go, you might want to consider putting an opto-isolator between your wire and the dual counter. It isn't hard, and can have other advantages, too.

You don't by the way, have to use a CR2032 battery soldered to the board. If you need to replace yours, and have trouble buying one with "wires" attached, you can connect an external battery. Two AAA cells would be fine, as would any other source of 3 volts.

DO NOT try to solder connections onto any battery or cell. They really can only be attached by the manufacturer! (And try to solder the battery to your pcb with the minimum heat. Don't be TOO timid, but avoid one of those poor joints that take inordinate heating.)

Remember that if your counter module is resting on a metal surface, or even sitting, say, on top of a screw driver, if the wrong parts of your module touch the metal, the battery will be drained flat in no time at all.

I hope that helped.

Tom Boyd

Sheepdog Software Homepage

Matters 1-Wire / MicroLan

Tutorials on Delphi programming, including lessons on 1-Wire.



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.

Here is how you can contact this page's editor.
Click here to go up to general 'electronic projects' page by editor of this page.