Electronic – How to uniquely identify which PCB is plugged in / connected

adcpcbvoltage divider

I am designing a board (Main PCB) into which any one of about 60 slightly different boards (Peripheral PCB) may be connected/plugged-in.

The challenge I'm facing is to autonomously identify which of the Peripheral boards is plugged in at any given time.

  • The Main PCB has a microcontroller available to do some processing.

  • However, to minimize part count, the Peripheral PCBs each have only a (unique) sensor, and no intelligence — i.e., no microcontroller on board, e.g., to send information via digital pins or I2C — as of now .

  • Both boards are open to design changes, although the inter-connector pin count leaves me at the moment with only two more free pins available to use for any further modification.

What is the simplest, least expensive way (< $1 USD) I can modify the circuits to let the Main PCB identify which of the Peripheral PCBs is plugged in?

Will I have to add a microcontroller to each Peripheral PCB, or is there a smarter way?

ADC reading of a unique voltage divider on each Peripheral board seemed like a good start but for such a large number of different boards to be identified, this does not seem like a very reliable strategy.

Best Answer

You could use two resistors with a common to ground to give group and number within the group. 10 x 10 should be no problem with fractional-cent 1% resistors. I wouldn't bother with dividers- put the other resistor on the board doing the reading.

Another option would be an I2C EEPROM. That would use your two pins, no worries about voltage drop to the ground, and could be easily reprogrammed if you need to re-jig a board to be another variant. A 24C01 1K bit EEPROM costs about 20 cents in small quantity, so it's not extravagant, and you could accommodate serial numbers and batch numbers, production date as well as board identification, if so desired.

enter image description here