What tech to use for wireless detection of proximity? - Page 1
Forum section: electronics / projects

author: chebeba
author_rank: Contributor
timestamp: January 15, 2014, 06:45:07 am
content: I'm looking at different technology alternatives, and finding no alternative I really like...The task:A little microcontroller device I am building needs to know when it passes through doorways, using some kind of wireless technology.The range needs to be somewhat controlled, so it doesn't think it's passed the doorway just by being close to it.I want to use some existing stuff that has decent reliability, since I do not have resources to do a lot of testing and tuning...So I looked at:27MHz remote control chips - Range control is very hard. I need to be able to tell if I'm 5 or 1 meters from the door, RSSI is too unprecise?WiFi and Zigbee type modules: To much handshaking and negotiation going on before the device is connected, can take several seconds and then I am already passed the door.RFID tags: The market is full of different systems, but they all seem focused on the base station knowing about where the tag is, not the tag knowing about where the base station is, which is what I need.In fact, the base station by the door can be totally dumb, all the intelligence sits in the mobile unit.Any one with ideas around here?

author: Psi
author_rank: Super Contributor
timestamp: January 15, 2014, 06:47:48 am
content: Does it actually need to know the instant it passes through a doorway or does it just need to keep track of which 'room' it is in?You could put transmitters in the center of each room (or multiple transmitters for large rooms).RSSI comparison between all received 'room' signals will allow you to figure out which room your in.With some hysteresis and intelligent thresholds you should be able to work out when the device passes through a doorway between rooms.

author: chebeba
author_rank: Contributor
timestamp: January 15, 2014, 07:43:42 am
content: Thanks Psi, but yes it does need to know the instant it passes (instant being defined as within 2 seconds or so in this case).Explaining it in algorithm form might help. This is what I want to be able to do in the mobile device, in some kind of pseudo-C:if( accelerationSensorSaysWeAreInMotion() ) turnOnRadioModule();passedDoor = false;timeInRange = 0;do {if( inRadioRange() && distanceToDoorBaseStation() < config.DistanceThreshold ) {if( timeInRange != 0 ) timeInRange = now();if( now() - timeInRange > config.TimeThreshold ) {passedDoor = true;break;}}} while( accelerationSensorSaysWeAreInMotion() );// Handle door passage...

author: Codemonkey
author_rank: Regular Contributor
timestamp: January 15, 2014, 08:34:22 am
content: There's no reason why the ZigBee type modules should take so long. If you just use the MAC layer rather than one of the protocols that sit higher up like ZigBee, you should be able to just send packets at will. If you just pick a fixed channel and don't bother with all of the scanning/association stuff you could do it all in less than a second no problem (my experience is with using the NXP/Jennic JN51xx modules).

author: zapta
author_rank: Super Contributor
timestamp: January 15, 2014, 02:33:08 pm
content: Look for electric l electronic collars for dogs, you bury a wire in the ground and when the dig gets close the cost reacts. Similar for shopping carts in the parking lot, one wheel locks when you crosses a buried wire. Probably a low power transmission from the wire an a receiver on the cart.

author: NegativeONE
author_rank: Contributor
timestamp: January 15, 2014, 03:38:42 pm
content: You can look at this - it's an IC for applicable in indoor localization systems.http://decawave.com/scensor.htmlhttp://www.decawave.com/assets/files/products/DW1000%20-Product-Brief.pdf

author: AndreasF
author_rank: Frequent Contributor
timestamp: January 15, 2014, 06:49:33 pm
content: I have no idea what kind of technology you could use (considering that it's actually more than proximity you would need if you want to detect passage through the door), but looking at your pseudo-code I was wondering if you realize that this condition could never be true?Quote from: chebeba on January 15, 2014, 07:43:42 amYou're setting timeInRange to zero just a few lines earlier, and unless the two functions from the previous "if" can alter timeInRange it'll still be zero by the time you get to this line.

author: chebeba
author_rank: Contributor
timestamp: January 15, 2014, 07:32:09 pm
content: Quote from: AndreasF on January 15, 2014, 06:49:33 pmThank you Andreas. You would make an excellent compiler...

author: chebeba
author_rank: Contributor
timestamp: January 15, 2014, 07:38:03 pm
content: Quote from: NegativeONE on January 15, 2014, 03:38:42 pmThat looks fairly spot on. Their spec surpasses my requirements. But it seems it is not quite available for purchase yet.Currently I am looking at the MRF89X 865MHz module. Range is about right and it has a pretty high resolution (0.5dB) RSSI output with a threshold detector. I am sure the precision is not 0.5dB but that can be calibrated for each device.

author: dfmischler
author_rank: Frequent Contributor
timestamp: January 15, 2014, 08:37:04 pm
content: You say "wireless". Is that radio only, or is ultrasound an acceptable approach? Plenty of that technology around (but not always straightforward to use with multiple reflections).

author: Frant
author_rank: Regular Contributor
timestamp: January 15, 2014, 10:31:25 pm
content: Quote from: chebeba on January 15, 2014, 06:45:07 amSome kind of optical system could be suitable for this task. The advantage of light is that narrow beams can be easily formed (especially with lasers), enabling much better accuracy than with typical RF systems. A combination of a light detecting system and an RFID system can also be effective. For example, the RFID can be used for doorway identification, and the photodetector for detection of the exact moment when the device passes the doorway.

author: JackOfVA
author_rank: Unknown
timestamp: January 15, 2014, 10:52:07 pm
content: Determining range by measuring signal strength is a non-trivial task. For example, antenna patterns for the receiver and transmitter are not isotropic so their relative orientation will determine signal strength to some degree. Likewise, reflections from objects can easily result in 20 dB nulls. (Rayleigh fading.)It's not clear to me if your system has cooperating door frames or not. If it does, then perhaps something cheap and simple like a reflective strip couple be applied and sensed with an IR transmitter and receiver - looking for reflections, not a time of arrival system.If non-cooperating door frames are involved, I would, as has been mentioned, consider an ultrasonic detector or perhaps multiple ultrasonic detectors. You can get very decent accuracy with them and they are available in micro-controller friendly configurations.Or, with cooperating door frames, one could work up a transponder arrangement with an IR sensor and IR transmitter. Likely way more work than you care to engage in, however.

author: chebeba
author_rank: Contributor
timestamp: January 16, 2014, 05:46:44 am
content: JackOfVA: I like your "Cooperative door frame" term ;-)Yes, my door frames are cooperative. But I am inside a black plastic case, and can't change that.So optics are out.Ultrasonics could work, though. I haven't looked at that at all. Any suggestions for devices?

author: Rerouter
author_rank: Super Contributor
timestamp: January 16, 2014, 06:27:08 am
content: best way i can think of if you have a cooperative doorframe would involve 3 wires transmitting 3 signals at different phases, as it essentially becomes triangulation then there can only be a small range that creates a valid reproduced signal so it would be less passed through doorway and, near_door/in_door/near_door,if you amplify each signal to what amplitude you expect there should be minimal error, though reflections could still be a problem :/

author: cellularmitosis
author_rank: Unknown
timestamp: January 16, 2014, 08:34:19 am
content: The cricket system looks interesting.http://cricket.csail.mit.eduAlso, this paper looks interesting:http://www.sis.pitt.edu/~dtipper/2011/Survey1.pdf

author: dfmischler
author_rank: Frequent Contributor
timestamp: January 16, 2014, 10:57:18 am
content: Quote from: chebeba on January 16, 2014, 05:46:44 amI think you will find that to get decent accuracy you will need to be able to put holes in the case for ultrasonic transducers. Probably bigger holes than you would need for optics.

author: chebeba
author_rank: Contributor
timestamp: January 16, 2014, 12:58:37 pm
content: Quote from: cellularmitosis on January 16, 2014, 08:34:19 amThat's a really good paper, actually. Thanks for locating it, I have been doing lots of Googling but missed this one!

author: JackOfVA
author_rank: Unknown
timestamp: January 16, 2014, 02:40:44 pm
content: For ultrasonic range finders, a representative sample can be found athttp://www.pololu.com/category/78/sonar-range-findershttps://www.sparkfun.com/categories/84Resolution to 1 cm / 0.4" is achievable with some of these devices.

author: Frant
author_rank: Regular Contributor
timestamp: January 16, 2014, 11:36:49 pm
content: Quote from: chebeba on January 16, 2014, 05:46:44 amHow about the floor? Is it cooperative too? The problem with door frames is that you can pass through a doorway at many different angles and positions, so the distances between your device and the sides of a door frame can vary. The distance between the floor and the device could be much easier to control. You can use a permanent magnet tape on the floor across the doorway and a magnetic field sensor in your device.

author: fcb
author_rank: Super Contributor
timestamp: January 16, 2014, 11:45:16 pm
content: I'd study how supermarkets/shops anti-theft systems work. You can afford to reduce the size of the antennas on either side of the door as you can make the 'token' with a higher Q.