# Method for assigning unique per-board addresses

We're designing transmitter/receiver boards for an RF remote-control application. To avoid talk between mismatched pairs, we want unique per-board addresses. The address is specified to encoder/decoder chips through 8 address pins.

We'll probably assemble a small batch (about 25) by hand, but will have the PCBs professionally fabricated.

What's your favorite way to do unique per-board addresses in a situation like this? I've pondered DIP switches, jumpers, and cutting/jumpering traces. I'm leaning toward cutting traces, but I'd like to hear what more experienced people typically do.

• how reconfigurable would these need to be? and how physically robust? is it safe to assume from RF remote control that there will be a hostile vibration environment? – JustJeff Jul 10 '11 at 3:25
• Avoid DIP switches; people will change them. – Brian Carlton Jul 10 '11 at 3:44
• @JustJeff, they shouldn't have to be reconfigured unless one of the controllers fails and needs to be replaced, or something like that. There won't be much vibration. – Steven Ourada Jul 10 '11 at 4:56
• @Brian, yeah, there is that possibility, but I'm not too worried about it. – Steven Ourada Jul 10 '11 at 4:57
• I'm realizing that my question was probably too broad and opiniony. I like the answers and have learned good things; thanks to all who have contributed. – Steven Ourada Jul 10 '11 at 15:11

I'm surprised nobody mentioned EEPROM. We've had to put unique numbers in products a bunch of times, and most of the time they have gone into the processor's EEPROM or sometimes reserved locations of program memory. This is usually a simple thing to do as a final step of the production test and calibration process. Once the unit is deemed working and any calibration has been performed, the production test system sends a command to the micro to give it its serial number, or uses the programming interface to write the serial number in the appropriate location directly. Sometimes the HEX files that is programming into the micro is a one-off modified from the master template HEX file with the unique serial number for that device, with checksums and possibly other information modified accordingly.

A few years ago I was working with a company that was producing 100s of thousands of little thingies a year via a contract manufacturer in China. We sent two complete test systems to the Chinese manufacturer. The test program would maintain a serial number file, and we could send them new files to configure the units for new serial number ranges. All went well enough for a while, until one day we got units with duplicate serial numbers. It turns out the Chinese did something stupid with one of the systems so that it wouldn't run anymore. Instead of telling us, which they had strict orders to do if anything went wrong, they did a complete disk copy from the working system to the other system. This of course copied the serial number files and current state too, so from then on both systems handed out the same sequence of serial numbers. That was a pain to unravel.

I got to design newer test systems, so I made sure the serial number range and current state was kept in a EEPROM in the tester hardware and didn't provide any documentation about that to the manufacturer. We had about a dozen of the tester boards made, and we carefully assigned separate serial number ranges to each. When the manufacturer needed to be updated with a new block of serial numbers, we sent them updated tester boards. So far this system has worked very well. It also makes it easy to produce the occasional unit back here or at a different manufacturing site. Each place has its own tester with its own serial number range, and only one person was the master keeper of the serial numbers and would assign new ranges to testers. You could then pick up any tester and use it to provision units without having to worry about serial numbers.

• Hi Olin! Brian mentioned EEPROM in his answer, but didn't add detail. Your story lays the finger on the weak point of programmatically assigning unique IDs. There's a production chain which involves some logistic steps where things can go wrong. It also happened to us one time when our disti's programming service forgot to increment the counter. Sooner or later these things happen. IMO nothing beats the SSN (see my answer): no programming, no administration, no nothing :-) – stevenvh Jul 10 '11 at 14:56

My favorite is the Maxim DS2411. It's a small SOT-23 part which contains a unique SSN (Silicon Serial Number). Not very cheap in itself, but may be the cheapest overall, when you think of logistics overhead and programming cost in other solutions. The SSN solution doesn't require any manual intervention/operation in addition to the automated pick-and-place.
Risk of duplicate IDs is almost zero.
In a comment to this answer mikeselecticstuff pointed to these MAC address EEPROMs. They're common EEPROMs with a unique ID programmed in a write protected area of the EEPROM. They're cheaper than the DS2411, and have some storage for user data left.

If you would like to "program" through soldering I would skip the 0$\Omega$ jumpers; soldering those simply takes too long. Instead place two half-circle pads 0.1mm apart.

The operator simply has to lay a drop of solder over both halves to "program" one bit. Less than half the time (one solder point instead of two, and no component to pick and place), and no components required. So you save twice. And like Olin says, with the right size and gap, they are both easy to bridge and to unbridge.

If your board has a microcontroller (which board doesn't these days?) you can have a serial number programmed in it by the programming service. Logistic cost on your side is minimum: just keep track of which serial they should start with at each programming batch.
Risk of errors resulting in duplicate IDs is low, depending on how well the programming service is organized, but I've known it happen.

I've known about the following, but I didn't remember what they were called, and I also thought I needed a picture to explain it better.

Apparently this is called a programmable DIP shunt. You use it like a DIP-switch, but instead of using miniature switches it uses weak connections which you can "program" by breaking them with a pen or small screwdriver.
This has the same big disadvantage as the selective soldering solutions: the operator must decide which connections to break and which should be left intact, and then human error is never far away. Reliability as far as uniqueness is concerned: low.

• I agree about the solder jumpers if a human has to do each one. I tried a few different things, but found two half-circle pads to work the best. With the right size and gap, they are both easy to bridge and to unbridge. You can see some of these on a board at embedinc.com/products/ready02/qprot05_1280.jpg below the right end of the DB-9 connector near the top of the board. – Olin Lathrop Jul 11 '11 at 14:12

I2C EEPROMs are good and small. 1-wire serial number chips exist.

• Hmm, hadn't thought much about that, though I'd have to design some interface to read that and continually present the address to the encoder/decoder, since I don't have ready access to the internals of said chip. Now that you mention it, though, seems like the vendor could offer that since the encoder/decoders are just microcontrollers with some proprietary firmware. Might have to talk to them about that. – Steven Ourada Jul 10 '11 at 5:00

If the address is to be set by someone with soldering capability, you could lay out a surface mount resistor footprint for to each pin and selectively solder in 0 ohm jumpers.

• Yeah, that's one way to go. My theory is that it's somewhat easier to cut traces than solder jumpers, but I could be wrong. – Steven Ourada Jul 10 '11 at 5:00
• @Steven - at first sight cutting traces may look simpler since you don't need components, but cutting is messy, and it's costly to check if you have a proper interruption. Soldering is cheaper, esp. when you don't need the jumpers (See my answer). – stevenvh Jul 10 '11 at 7:30

For simple 8-bit addressing I usually use cut-tracks. It's more permanent than jumpers / solder links, and dissuades people from changing it as much. This is how I usually do it on the board:

Each link is a pad (but that's a limitation of my software - I'd prefer it not to be tinned) so it gets no solder mask, and only 5 mils (as opposed to the 10 mils for the rest of the track) which makes it easier to cut. 5 mils is the minimum for the signal they are carrying in my case - you could use thicker. In my example it's just using a resistor pack as pull-up resistors. You could obviously replace this with whatever you want.

Just remember to ensure there's no solder mask over them.

Another option is to (as someone else mentioned) use SMT resistor pads and bridge them. But, if you're just going to then go to resistors to act as pull-ups, why not just leave off the resistors you would not be connecting to in the first place?

• To answer your last question: because selective component placement costs is expensive; you have to to it by hand. It's cheaper to have the component placed by the pick-and-place and solder 1 point by hand than pick-and-place manually and then manually solder two points. Also, if you place all resistors you can use a resistor array (just like you did), which is also cheaper. Cost of placing 1 resistor >> cost of the resistor itself. – stevenvh Jul 10 '11 at 8:59
• How is cutting more permanent than soldering? I can resolder your cut as easy as you can remove my solder. Soldering is more reliable too (how do you know it's properly cut). To be honest I don't like the cutting idea at all, but that was obvious, I presume :-) – stevenvh Jul 10 '11 at 9:06
• This is very true. I don't use P&P yet myself - my volumes don't make it worth while. I'd like to build my own P&P machine some day though... But first I need to build a CNC drill machine for the holes ;) – Majenko Jul 10 '11 at 9:06
• You can solder it as easilly, yes. The permanancy is more psychological than physical. – Majenko Jul 10 '11 at 9:07
• If your P&P will be able to do 01005s (0.25mm x 0.12mm) I want to come and have a look! I have no idea how they do it! – stevenvh Jul 10 '11 at 9:08

If you have any 1-Wire device in your circuit your board will be born with a serial number.

I have a power inverter board and since the MOSFETs tend to get very warm I added a DS18B20 temperature sensor on the heat sink, sensing the temperature of the MOSFETs. This also gave my inverter a serial number, as assigned to the temperature sensor.

Also you can use have a few fuses on your board and blow some of them before leaving factory to function as a serial number device.