Sensor Location

• The basic idea is this...

I will have multiple cabinets next to each other in a room. Each cabinet will have a sensor located at the top. Within the cabinet will be multiple other sensors at different heights located on shelves. I want the sensor at the top of the rack to be able to locate all sensors within its own cabinet and also determine the height of each sensor.

Im not concerned about its exact position in the cabinet, only its height. I figured it would be easier to accomplish this by placing a sensor at each cabinet instead of using triangulation with a few sensors within the whole room. This could also help make the margin or error smaller, hopefully down to half an inch.

What do you think would be the best way to measure the distance to determine the placement of the sensors height (Y axis)?

• I don't think it's possible with nrf modules..

You have to send out a ping, and receive a pong, then calculate the time it takes to travel back and forth, do some mathematics, and you have the distance.

However, this assumes that you have 100% control over when the signal is transmitted in both ends, and also when the receivers notify the processor of reception of the signal. And I don't know if this is possible with the NRF24 module (ideally you'll need a CW transmitter for this, to be able to send a short burst). and even then it wouldn't work.

some small maths on the travel of radio / light waves.
Radio waves travel with 299792458 m/s that is 299 meter every micro second, or around 30cm every nano second. If we assume that you have 100% control over the radio timing, and we live in a perfect world with no software delays, then in order to have a good resolution, you need to have a clock with a frequency of at least 1Ghz. Then for each tick of the oscilator, your radio signal would have travelled 30cm.

• With the max distance a signal would travel being 8ft, would the continuous wave method work?

• Do you want to measure how much full/empty are the shelves? If yes, maybe the distance sensor may help to you?

• With ultrasound, will there be issues with the pulse traveling through other objects within the cabinet until the pulse hits the tag?

• @rdevine said:

will there be issues with the pulse traveling through other objects within the cabinet until the pulse hits the tag?

the sound pulse will reflect off of the first solid object in its path

• The goal would be to have hardware on the cabinet that would be able to inventory all objects within the rack. I think ultrasonic would not be applicable in my scenario.

• @rdevine said:

would be able to inventory all objects within the rack.

perhaps contact sensors placed underneath the location of each 'object'

A friend of mine owns a company that is in essence an RFID toolbox sold to aircraft maintenance industry. The system is used to make certain no tools are left inside the engines and other critical spaces in and around an aircraft. His first sale was to Sikorsky Helicopter, and he is wildly growing!

• That is goal. I want to place a 'tag' on each device that goes into the cabinet. Not only do i want to know the object is within the cabinet but i need to know where its mounted within the cabinet. When the cabinet is scanned for objects it would return what objects are in the cabinet and their location on the Y axis only. Im only concerned about the objects height within the cabinet.

• @rdevine said:

Im only concerned about the objects height within the cabinet.

that will be a challenge here in MySensors world...

• I would think RFID pads on each shelf surface is your best bet; but that's likely to be cost prohibitive (you'll either need expensive high-range scanners or lots of not-so-cheap low range scanners).

Honestly I don't really see the point of going to all that bother. Is there any way to modify the design to something a little less automated? Perhaps one scanner per shelf that you have to wave each item by on checkout / checkin? My local library does something like that for self checkout.

• I guess it would make more sense if I explained the complete use case.

I have a plant store. Within the store I have 30 cabinets. The cabinets hold trays of plants. The plant trays differ in size and they slide in and out of the cabinets. There are 50 slots within the cabinet. A tray can slide within each cabinet at any of those slots. I want to place a sensor on one of the trays and when i move it in and out of the cabinet it will update my database and let me know where it is. The trays will be constantly moving from cabinet to cabinet depending on where the plant is in its growth cycle.

Once I am able to determine the distance the tray is from the reader on the cabinet I can associate the distance to match the number labeling system on the cabinet so i will know exactly what slot the tray is in.

Automation is the complete goal.

• @rdevine I am now researching rfid and and @rickmontana83 said the long range ones are a bit dear but they are an option.
Here is a summery of what I learned by now:
there are ultra cheap rfid readers and tags in the 125 or 13.6 band. if you place a reader behind each slot and can be sure the tag will be within 6cm of the reader this is a cost effective option, as the tags are cheap and passive and a reader costs about 5\$. you still have to wire, process, etc.
The other option is to use middle range readers with active tags and triangulation. these can read pretty long distances but each reader is ~200\$ and you need 3 of them. I think you must use active tags which are a bit bigger and run on batteries although they are extremely economical and can run for years.
All of this is only theoretical, so take it with a grain of salt.

another option would be to have qr or barcode readers behind each slot. did you think about this option? not sure its suitable for arduino but you can now buy very cheap cellphones that can read barcodes from impressive distances. just options....

• @rdevine and yet another option, maybe the cheapest if you are a capable programmer, is to place HD camera in front of each cabinet and process barcodes from the snapshots taken by the cameras. will be very accurate, fast and can be handled by one computer.

• @Moshe-Livne
Teaching a computer to see is one of he hardest problems computer science has yet tried to solve. I'd suggest giving this a miss if you value your sanity.

Not to be too snarky, but a Mechanical Turk might be the most elegant solution here. There are some things for which computers aren't really that well suited. (I know, I know... I'll turn in my nerd card and see myself out...)

• @rickmontana83 if the camera is fixed and the cabinets and shelves are fixed and we are talking barcode this is not too hard. if any of the above is not true we are into a completely different game....basically you only mark the areas in which barcodes can appear and there are some very good libraries that can "read" barcodes from photos. not a 5 min work but not a 2 years project as well. and dirt cheap. and no batteries or wiring to look after.

• @Moshe-Livne TouchĂ©. I still think it'd be more trouble than it was worth, but your constraints make it a much more reasonable possibility.

• @rickmontana83 have a look at http://zbar.sourceforge.net/ for example...

19

2

5

109

3

6

1

1059