Maker Pro
Maker Pro

Trying to create a plug and play set of devices

While I originally went to school for EE, that was over a decade ago so my skills are extremely faded, now just a computer nerd. Not sure if this is the best place to ask, so I apologize ahead of time.

What I am trying to figure out how to build in short:
A way to build a sub $5 device (in bulk) that I can connect to a Raspberry Pi and have it recognize what it is uniquely.
The challenge is that multiple of the same device can be connected so from my understanding I2C is out.

This will be for an end user product. So what I would like to do is detect what was plugged in (via an rj45 jack unless there is a reason to use something else) and recognize what it is. Along with that, it needs to recognize it uniquely. So for example, if a person added 3 temperature sensors, It would be able to see all 3 differently and if 1 of the 3 is disconnected, it would be able to know which one was removed.

I realize most of it will be done through code, but I am trying to figure out how to uniquely identify each device. I plan on having about 20 different sensors that can be connected. So my vision is that each one has a GUID of some sort where the first set of numbers describes the type of device (Temperature sensor vs humidity sensor vs many others) and the rest is a unique identifier so I can differentiate multiple like sensors.

Completely open to ideas, but my main concern is low cost. If it costs much over $5 it makes more business sense to have the user do more work setting it up.

Thanx ahead of time.
 

KrisBlueNZ

Sadly passed away in 2015
I'm not really sure what you're asking for, but if you want a component with a unique ID, have a look at the Dallas/Maxim one-wire devices. They are manufactured with unique identifiers and can be read with a single I/O pin on many micros. Many of them have basic I/O features - the DS1822 is a temperature sensor with 16 bits of NV storage, for example.
 
Thanks for the reply Kris. At first glance that seems like it will work, but I will have to do some more reading up on it.

I do have a follow up question tho, sorry hard to explain.
I am picturing when this goes to production, I will take a 1 wire device and attach it to a sensor of some sort. Would I have to essentially record the unique serial number and what type of sensor it is attached to for every one? To put it another way, if I could buy a batch of 1 wire chips whose GUID(the unique serial number) started with 123 I could attach that batch to only temperature sensors with another batch starting with 234 would only be for light sensors. That way I wouldn't have to record the details (serial number and sensor type) somewhere.

Maybe I could special order the 2483 1 wire chips with specific starting numbers, but I doubt it. So is there a similar alternative or something I could do to accomplish something similar?

Hope that makes sense.

Maybe a better way to think about what I am trying to accomplish. Picture buying a small weather station where the end user can buy unlimited sensors. I want the user to be able to buy a sensor, plug it in and have the system recognize what type of sensor it is along with differentiate it from other like sensors.
From my understanding of your solution, I would have to pre-program all the serial numbers and what they are attached to into the system so it could be properly recognized. Doable, but an extra step/cost.

Thanx for the help.
 

KrisBlueNZ

Sadly passed away in 2015
Different members of the 1-wire component family can be distinguished because the bottom eight bits of the 64-bit serial number identifies the device type. So you can distinguish between a DS1822 temperature sensor and a DS2408 I/O expander. But if you use the DS2408 on several different types of devices, you won't be able to distinguish them automagically, unless you reserve some I/O bits to carry the module type information, or implement some other behaviour through the I/O bits that you can use to detect the module type.
 
Top