Encoding version or configuration on PCB

Off the top of my head, two easy solutions come to mind.

  1. Have n lines attached to the GPIO of your microcontroller. Tie these high or low depending on your board version. This would give you \$2^n\$ board configuration options. This would use n pins on your microcontroller. Static current draw would be negligible.
  2. Have an input to the microcontroller's ADC and use a voltage divider with different values depending on the board configuration. This would only use a single microcontroller pin. This has the disadvantage that there will be static current draw through the divider. It would also be prone to BOM errors, while the first suggestion is hard wired to the board.

Both of these suggestions do have a weakness in that the end user could easily alter them, say to open up "locked" features. This may not be a concern for you, but something to bear in mind.


I have used a shift register with pins tied high and low to encode board revision before now, if you're already using SPI for something on your board it's trivial to read it.

If you need to be able to change ID at run time then using jumpers rather than tying the inputs with traces would be a good idea.


Some options I can think of:-

SMD PADS/ O OHM Resistor Links. Use a binary system for hardware configuration to reduce pin count for your processor.

Jumpers. The board would 2xN connector pins adding a jumper to the right pin would let you select your configuration. A mistake is easier to resolve. This maybe a little costly and use more board space depending on jumper.

If you have EEPROM on the board then it may be possible for you to embed the configuration into memory.

Is it possible to have you change the firmware itself using a #define or similar? Then you don't need board space and extra pins for version detection.