Relative proximity sensor?

I’m trying to design an experience where the proximity (or location) of one Particle Electron affects the other.

For instance, let’s say one person is holding a peripheral with a Particle Electron & as they approach the other, the second Particle Electron powers an LED to change its color. What would the best sensor be for this experience?

I’m concerned the onboard cellular location is not granular enough for the effect if two people are in the same room. Is there a sensor that would give more specificity?

Any advice or suggestions? Thank you in advance.

What you are trying to do is definitely not easy and may require proprietary tech from a commercial company. I’ve been brainstorming how to do a “follow me” robot of sorts but with distances over 10 feet or so. Here are a few ideas to start.

At close range (several inches to maybe 12), you could use magnetic fields (i.e. a hall sensor and a magnet). Just outside that (12 inches to several meters) you could use time-of-flight distance sensors such as the TFMini LIDAR . The down side is that the 2 devices have to see each other (orient themselves to point at each other.) That orientation tracking is a whole other problem to solve. Still in this distance range you can start to use other “beacon”-type sensors such as Bluetooth proximity tags. You might be able to use RFID tech but usually it is difficult to sense proximal distance as opposed to simply detecting a tag is in range. And then you can get into wifi detection and triangulation but I don’t know that I’ve ever seen that in DIY form. The Bluetooth tracking is also difficult in DIY form but I think you might have more success there.

You might want to look at “follow me” robot projects on Hackster.io for some ideas as they are essentially doing the same thing.

Bluetooth could be the most viable option in this setting, since an exact location is not required, but merely a relative distance. Couldn’t the signal strength be used for that? That way you don’t have to bother with triangulation, or LIDAR.
I could be way off on this, but that’s what I though of first.

I am definitely waiting to get my hands on the mesh devices with Bluetooth… I could see them in such a use case. I also tend to overthink and over complicate the issue… like there will be many of these devices, or you also need to track orientation.

Cellular tower based location is certainly not going to work as you have stated.

Out of all the sensors I have browsed over the last year the only thing that makes sense to me personally would be a radio signal and measuring its signal strength.

Or the radio could simply be looking for a data packet received via the non-cellular radio chip that each Electron transmits and when it receives that data packet it turns on the LED you're talking about.

The radio platform could be Bluetooth, RFM95w, RFM69, depending on how far away you would want to be able to detect each other. Most of the radios allow you to turn the transmit power levels up or down based on your needs.

The RFM95 can get you 1-mile range outside with simple wire antennas. The RFM69 is like 1/10 of that if I remember correctly. Bluetooth is usually only for very short distances. Bluetooth 5 has the ability to go much further but that tech is not really be used in the Hobby market yet.

How about ultrasonics? I have a cat door that works by looking at the signal strength of an ultrasonic pulse emitted from a collar worn by the cat. I think this would be more sensitive to distance than a radio signal at relatively short distances. At what approximate distance do you want the devices to react to each other?

Unfortunately from what I’ve read, Bluetooth won’t be available for user code. It’s my understanding that it’ll only be used for setup and particle use. @Moors7, isn’t this correct?

While it might not be fully fleshed out at launch, Bluetooth will definitely be available for use. Priority lies in getting it to work for a smooth setup experience, but once it’s been released, more can be made available through system firmware updates. That’s what I got out of it at least.

3 Likes

@ric what sensors are you using for that? I only know of the ultrasonic distance sensors which come on a preassebled board and accessed via I2C or SPI.

The ones I have are part of the cat door and the collar, so I haven't tried to use them with a Particle device. I presume that you could remove the ones on the HC-SR04 or similar devices, and use them. I think you would need an amplifier to amplify the incoming pulses, and then rectify that signal to get something you could measure the strength of. I did remove one of those sensors from a HC-SR04 to act as a microphone to look at (with an oscilloscope) the pulses coming from the cat collar; it worked fine for that purpose.