Take the 2-minute tour ×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free, no registration required.

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.

share|improve this question

3 Answers 3

up vote 6 down vote accepted

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

share|improve this answer

The tiny 6-pin microcontrollers are very inexpensive (e.g., PIC10F200 is $0.40 to $0.50, depending on quantity), and would provide the most flexibility. You could identify the peripheral type as well as give each one a unique serial number. This would require power, ground, and at least one contact for communication.

You could also go with something like the Maxim DS2401 1-Wire Silicon Serial Number ($0.50 to $0.60 in quantity). This would only require one contact plus ground.

The cheapest I2C EEPROMs are on the order of $0.20 in quantity. These would require power, ground and 2 contacts for communication.

share|improve this answer
2  
A problem with the serial number approach is that each sensor would be unique, instead of each sensor type. Hence producing a new sensor PCB would require a firmware update of the main board. –  Wouter van Ooijen Mar 31 at 7:02
    
Well, you could restrict the sensor type to only one region of the ROM and have the rest be the serial number. The host would only have to read the type, and could ignore the serial unless the user specifically asked for it (e.g. "Product Info" menu option). –  Ignacio Vazquez-Abrams Mar 31 at 7:05

Two free pins gives you two voltage dividers. For 60 boards you need 8 voltages each. Even the crappiest ADC in the world is capable of more than 3 bits.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.