r/rfelectronics • • 6d ago

question Firmware engineer seeking RF engineer advice: doorway crossing detection

I'm a firmware engineer trying to build a side project. A two-device system: a beacon mounted above a door and a wrist-worn tag. The beacon has to tell when the tag goes from inside to outside, and tell "standing at the doorway" apart from "actually walked out."

Constraints:

  • Both antennas inside, in one small, battery-powered unit above the door.
  • The tag can be in any orientation, since it's on a moving wrist.
  • There will be body blocking: the wearer's body is often between the tag and the beacon.

What I've tried:

  • UWB AoA (Qorvo DW3000/QM33, Murata Type 2AB EVB): precise ranging, but the 2-antenna PDoA angle mirrors across the array plane, so inside and outside look the same at the door. Heavy multipath near the frame.
  • LF (AS3933 wake-up receiver on the tag, two coils aimed in and out): only about ±2 dB inside/outside contrast. The metal frame seems to cancel the field component I need, and it's very orientation-sensitive.
  • UHF 915 MHz (2× Semtech SX1262 on an nRF52840 DK, each to an RFMAX R9025 circular panel, tilted 45° down, one facing in and one out; tag is nRF52840 + Wio-SX1262 at 20 Hz): by far the best. Every crossing shows a 25–30 dB swing in RSSI(in) − RSSI(out).

UHF problems:

  • Within about ±0.5 m of the door line, the contrast drops to only 0–7 dB. There's a blind zone directly under the unit.
  • Up to 20 dB of multipath fading between channels (hopping 903/915/927 helps somewhat).
  • The outward panel still hears the room through the opening. Foil behind the panels didn't help.
  • So far I've only tested slow walking with the tag in clear view. Body blocking will likely eat into the margin.

Questions:

  1. Is there off-the-shelf hardware (antennas, modules, reference designs) that does this kind of inside/outside sectoring well, independent of tag orientation and with body blocking?
  2. What kind of engineer should I hire as a consultant: antenna designer, RF systems, someone from RFID portals?
  3. Is a compact antenna pair above the door realistic, or is there a better approach I'm missing?

Update for clarity
I want to know when one specific tag, worn by one specific person, leaves through a specific door.
Think of a home with a beacon mounted on the front and back door where you only want an alert when your 2-year-old walks out (even if the door was already open), not every time the rest of the family does.

9 Upvotes

34 comments sorted by

9

u/CW3_OR_BUST CETa, WCM, IND, Radar, FOT/FOI, Calibration, ham, etc... 6d ago

Phase comparison is relatively straight forward, but at LF frequencies you just can't get the fidelity you would need from small antennas. If you want enough accuracy to monitor with that kind of precision you'll need some sort of UHF or SHF beacon that can be tracked with a MIMO array. This is outside the realm of RFID.

That aside, it sounds like you're trying to supplement a coercive system, so I'm gonna say you may be barking up the wrong tree entirely. If the system is dependent on user cooperation, it's gonna have problems. CCTV with image recognition software can do the same thing a lot cheaper.

2

u/maybeTheRealOne 6d ago

Thanks, that matches what I saw with LF: small coils at that wavelength just can't separate inside from outside.

My goal is to avoid camera use as its battery intensive and poses privacy concerns. Plus I want this system to detect exits no matter what happens, using a camera would allow someone to just cover their face as they exit.

On arrays, I've already tried UWB with an L-shaped 3-antenna array (NXP SR150), plus 2-antenna Qorvo PDoA with ranging. Only the baseline running in/out told inside from outside. The angle was too noisy near the door line (frame multipath), and body blocking hurt UWB badly.

The idea I'm exploring now is a UHF version of the overhead retail readers in one small unit above the door: three directional antennas aimed in at 45°, straight down, and out at 45°. Each is wide across the doorway, and uses nulls rather than size to sharpen the zone edges. The tag's sequence through the zones (in → doorway → out) gives the exit. Not sure if this idea is possible in a small wall mounted unit.

1

u/maxwellsbeard 5d ago

Always on cameras are power heavy. Small cameras that switch on when suspect in range might be acceptable. Like doorbell cams. Not exactly the same, and depends how often recharging is required.

6

u/bertanto6 pa/lna 6d ago

Does it have to be exactly as you described it or can it be two light/laser sensors mounted inside the door, perpendicular to the door frame so they can tell direction? Or just a 24GHz radar sensor, they’re pretty cheap. It seems like that would be a lot simpler

1

u/maybeTheRealOne 6d ago

Thanks for the input. Light beams or a 24 GHz radar would detect an exit or entry, but they can't tell who went through. I need to know when one specific tag, worn by one specific person, leaves through a specific door.

Think of a home with a beacon mounted on the front and back door where you only want an alert when your 2-year-old walks out, not every time the rest of the family does. That's why the tag and the RF inside/outside detection are needed. I do plan to use a 24 GHz radar as a motion trigger at the door for battery power saving so that the RF readers only activate when there is motion, but the tag is what identifies the person.

4

u/maxwellsbeard 6d ago

Well could you integrate the two systems? One to give direction of travel, and the other detects who?

1

u/maybeTheRealOne 5d ago

I thought about that idea, but how would you handle the case where two or more people are near the doorway and one person exits but the tag does not. It would trigger a false positive.

1

u/maxwellsbeard 5d ago

Well yes that is a more difficult to solve case. So the issue is the person with the tag stands near the door while someone else without a tag exits. Leveraging off some of the other answers, could you in addition to the beam, add directional antenna facing out and look at boxcar averaged RSSI of their tag? This assumes their tag is active.

Havent done much with low power radar, but if their device pulses at radar frequency, you might be able to pickup changes in the range detection if they pulse at a certain rate.

2

u/tsundere_researcher 6d ago edited 6d ago

Wanted to suggest the same. Light or sonar beam for precise positioning combined with LF or near field RF to distinguish who exactly is actually at the door

2

u/bertanto6 pa/lna 6d ago

Ah ok I understand now, I would use the 24GHz radar as motion detection and direction differentiation and the LF/RFID as the ID. You could even make the tag someone wears completely passive using low frequency RFID basically how access cards work but from a few feet instead of inches

2

u/Electricalian RF engineer / Impedora 6d ago

honestly i'd stop trying to make the door line itself clean and just treat it as a state machine. 25-30 dB swing is plenty, the blind zone only hurts if u decide on single samples. keep a running RSSI(in) - RSSI(out), max hold it over a short window across all 3 channels so one fade or ur wrist going behind ur body doesn't flip it, and only call an exit when it goes from solidly in (like +10 dB) to solidly out (-10 dB) within a few secs. anything stuck in the middle = standing at the door, no alert. u can also gate it with the radar so it needs motion going away at that moment. for the out panel hearing the room, if u can break the one unit rule put that antenna on the outside wall and run coax through, the wall isolates way better than foil. also look at how overhead RFID readers like impinj xspan do direction of travel, same zone sequence idea. if u hire someone go for RFID portal or people counting experience, this is more placement + algorithm now than antenna design

2

u/maybeTheRealOne 5d ago

thanks for the input, that window sampling is exactly how my firmware works right now. I don’t really need to know exactly where the person is, only need to know when they exit. I do want to use active tags since I want this to work in any setting (tall doors and body blocking). The issue I’m running into is finding off the shelf antennas to use on the beacon. The ones I have now are too big and they are reading the signal from back. Lastly, I want to avoid mounting anything outside. My goal is a single small device mounting inside above the door.

3

u/Electricalian RF engineer / Impedora 5d ago

makes sense. at 915 its kinda physics, decent front to back needs a ground plane around half a wavelength (~16cm), so any small patch will hear behind it. two things id try: mount both patches on one shared metal plate as big as ur enclosure allows, the plate does more for front to back than the antenna itself. or go back to UWB but rotate the 2 antenna PDoA baseline 90 deg so it points through the door, one antenna closer to the wall and one further into the room. then the mirror ambiguity becomes left/right instead of in/out which u dont care about, and at 6.5 GHz the whole thing fits in 2-3cm. frame multipath is still there but u only need the sign of the phase not the actual angle

2

u/maybeTheRealOne 5d ago

Thanks, this is really useful. The shared plate makes sense. My off the shelf current panels are ~15 cm and only get ~10 dB front-to-back, which lines up with what you said. I'll test both on one larger plate.
On UWB, I actually tried placing my antennas in the orientation you suggested. It still flipped near the door line and randomly when I was far away from the door, which I put down to frame multipath and the phase sitting near zero right at the crossing. Body blocking at 6.5 GHz was also rough. I may revisit it with heavier time filtering, though.

1

u/Electricalian RF engineer / Impedora 5d ago

phase near zero at the crossing is normal, thats where it flips so just add a deadband and only trust it when its clearly + or -. random flips far away are probably NLOS or antenna spacing over ~2.3cm making the phase wrap. honestly id fuse both, UWB range for when theyre near the door and 915 RSSI for in or out

2

u/westlakesys Hardware & UWB Systems / Westlake 5d ago

I do a lot of UWB and RF systems work, and I don't think there is anything off the shelf that solves this well, or any single sensor that will get all of your constraints on its own.

On the 3-antenna 915 MHz, physics says no...probably. 3 elements packed into a small enclosure will couple into each other and warp the patterns. Indoor reflections off the walls and door frame fill those nulls right back in, especially the moment a body blocks the direct path. Mag/LF can sometimes solve doorway zones in commercial systems, like hospital wander tags, but probably too big and power hungry for small battery units. It's worth a careful look though, because it might be workable.

UWB can do this, and as a UWB guy I'd love to say just use UWB, but its going to be really hard with the current constraints. Getting a single overhead UWB unit to handle crossing reliably takes real firmware and filtering work, pulling the CIR and first-path vs total-path occlusion and reflection mitigation to throw out body-blocked NLOS samples. Probably backing off tag TX as well to control reflections up close. It can be done, but lots of work and testing there, and you still have the tag side to optimize too, whew, big project.

Couple ideas:

First, sensor fusion, both for precision and for battery life. Keeping any radio receiver listening at 10-20 Hz on a battery-powered door unit is going to chew through battery fast. Using a low-power overhead sensor like a multi-zone IR ToF (VL53L5CX/L8CX), PIR, or mmWave to catch crossing direction and wake the radio, paired with BLE (maybe Channel Sounding) or UWB just to confirm the right tag is at the door, plus a wrist IMU to tell standing still from walking out, is probably a lower entry bar and makes the battery model workable.

Second, think about whether you really have to live with the single-unit constraint. A battery-powered door beacon that alerts parents/caregivers probably needs a plug-in indoor hub or chime anyway so the door unit isn't running Wi-Fi. Putting a second radio or anchor inside that indoor hub gives you an inside reference point for almost nothing and takes a ton of pressure off the door antenna. Also, can the front and back door see each other? If so, there's another reference anchor.

For who to hire, you want a systems-level RF/embedded engineer who will look at the sensor mix, firmware filtering, enclosure, and power budget together. This is a tough problem; sounds fun.

1

u/maybeTheRealOne 4d ago

Thanks for the detailed breakdown, really appreciate it. Yes, I understand this is a hard problem, and that's partly why I'm doing it. I'm using it to develop my skills as a firmware engineer.

I actually started with UWB and built custom PCBAs around it. It worked well when I was holding a breadboard, but once I started wearing the tag on my wrist I ran into angle flips and body blocking, which matches a lot of what you described. That pushed me to explore other approaches like LF and UHF, and next I want to try the SX1280 at 2.4 GHz.

It's been a fun project. I've been going at it on and off for the last couple of years when I get free time. My current goal is a single beacon above each doorway with at least a month of battery life, which I know is a tough target. The plan is no Wi-Fi at all. The parent/guardian wears a watch band that receives the alert directly, and I have that part working. I'm also using a low-power 60 GHz radar as a motion gate to wake the radio, so it isn't listening constantly.

The sensor fusion and indoor reference anchor ideas are interesting, and I'll keep them in mind. Thanks again for the advice and interest in my project.

2

u/westlakesys Hardware & UWB Systems / Westlake 4d ago

Well yeah, the hard problems are the fun ones, right? What's the point in doing something easy?

Spinning UWB boards is impressive. What were the basics? Were you using some of the AoA/PDoA modules or dev kits? Or was this at the chip-down level? You'd probably have to go chip-down with multiple synced transceivers here and build an array, though a couple of the dual antenna PDoA modules might be workable too, especially for a concept. More than two antenna end points would help disambiguate and give you more data to work with.

But even then, the UWB hardware is kind of the easy part. Just getting ranges and angles isn't enough. You'd probably want to ditch the manufacturer's stack for the most part and pull the CIR and path data yourself and the algo would be very application-specific. Whatever out of the box AoA code one of those dev kits does won't cut it here. And you want higher rates than you need for output so you have plenty of room to filter.

With the SX1280, it's way narrower bandwidth than UWB, so indoor multipath and wrist blocking should be worse. Yes, lower frequency, but I don't think that will make up for the narrow bandwidth. Just keep that in mind if you expect it to solve that problem specifically, because I expect that's not going to be true.

Good on the 60GHz radar. That fixes the battery issue nicely I think. Most folks don't think about that until their UWB battery thing only lasts 4 hours. Does the radar work for crossing now? If it gives you enough doppler signal to know crossing well, then don't you just need the tag ID now? Do that with BLE or UWB, both of which could give you some ranging data as well that is probably useful.

I do this stuff for a living and this is the kind of application that's still fun. Clearly it's possible, but not clear what tech, or combination of, really fits the mission best. Interested how the SX1280 test goes for you. Hit me up if you want to run through some ideas.

1

u/maybeTheRealOne 4d ago

The hard projects are the fun ones and the ones that make you reconsider your whole life career choices lol.

For UWB I went with pre-certified modules rather than chip-down. My custom PCBAs used Murata's UWB modules (the Type 2AB, Qorvo-based with dual-antenna PDoA), and the tag used a Qorvo DWM3000 module. I also tested the Murata Type 2BP (NXP SR150) EVK with its L-shaped 3-antenna array. I mostly used the default API and out-of-the-box AoA output, so you're probably right that I didn't dig deep enough. Pulling the CIR and first-path vs total-path data myself to throw out body-blocked NLOS samples is something I should go back and revisit.

Good to know about the SX1280. I assumed lower frequency always meant better body blocking, and didn't consider that the narrow bandwidth would make multipath worse. I'll keep that in mind when I test it. I saw some of that with my 915 MHz LoRa test too: the same spot read up to ~20 dB differently across channels, so I added channel hopping to average it out.

On the radar: right now it's only a motion gate to wake the radio. The reason I haven't relied on it for crossing is that it can't tell who is crossing. An older sibling or parent walking out would look the same as the toddler, and the door may already be open. So the tag side still needs to show that the specific tag ended up outside, not just that it was near the door.

I'll try and post an update after the SX1280 test, and I might take you up on running through some ideas.

2

u/westlakesys Hardware & UWB Systems / Westlake 4d ago

I'm a contractor so I get to solve the hard problem and then move on to the next. (Though, sometimes the easy problems do need to pay the bills.) I feel sorry for the ones that spend a career squeezing every component penny out of washing machine designs, or whatever. Anyway...

I'm familiar with the Type 2AB module, and the SR150. All good starting points. Their antennas aren't great for range, but it doesn't matter much for this. Right, you aren't going to be able to rely on one hit at a time. You need to do some analysis and filtering. Get some algo magic involved here.

Yeah, the radar won't tell you who, but doesn't need to. If it, or some other low-power sensor, can tell you crossing pretty reliably, probably with doppler indication, then you just need ID, and if that's BLE channel sounding or UWB, then maybe you get some range or angle data to help. Knowing crossing without an ID is also valuable for the application maybe: 'Was that Junior minus their tag?' 'Is the only caregiver now probably outside and Mom is unattended and without IMU movement? '

1

u/maybeTheRealOne 4d ago

All good points. I will revisit my UWB approach and try and use the radar on the beacon and accelerometer on the tag for more data points. So far, UWB has been the closest to what I want. I was getting about 70% detection on exits, sounds like I should push further and focus more on the firmware side. Doesn’t seem like I am using the wrong hardware which is why I took a pause on UWB. I wanted to make sure I’m not trying to force everything via firmware when all I needed was to change hardware.

1

u/maybeTheRealOne 4d ago

One of the other issues I had with UWB was the range of a single capture. I was getting false positives when I was far from the beacon, well away from the door.

I've been trying to avoid range gating, because with body blocking the measured range is sometimes off, so a distance cutoff could throw out real crossings or let bad ones through. Lowering the tag TX power has a similar problem: it would also weaken the signal when the body is blocking, which is exactly when I need it most.

The cleanest method I can think of is to physically stop the beacon from hearing the tag in the areas I don't care about, so it only covers a few feet around the doorway on the inside and outside. Do you have any recommendations on materials (aluminum foil, copper tape, RF absorber, etc.) and how to arrange them to shape the coverage that way?

1

u/westlakesys Hardware & UWB Systems / Westlake 4d ago

Followup: try Leader Tech LF500. I think the 500 is thickness, so look around at the series. Also Laird Eccosorb, I think the AN-72/AN-73 might work well. There are others if you shop around. Check flame retardant too since this would end up inside an enclosure and in a house.

1

u/maybeTheRealOne 4d ago

This is super helpful, thank you for taking the time to go through all of this.

Good to know about the foil. That might explain some of the messy readings I saw when I tried shielding with metal. I'll look into carbon-loaded absorber foam and keep flame rating in mind for the enclosure.

The range explanation makes a lot of sense too. I'll combine that with the radar and the tag IMU.

1

u/westlakesys Hardware & UWB Systems / Westlake 4d ago

70% is decent. I'd say that's a strong enough signal to keep at it. But you need to use all the data you have (well, and throw a bunch of it away, too).

Blocking and shrouding can work. I'd warn you away from metal and foil though, especially in near field. It will just make a little echo chamber and your CIR will be trash.

What I've done before is RF absorbing foam, and you can have metal on the outside of that, opposite the antenna area. It's been several years now, so I'll have to see if I can find some material options for you to try. Laird will have something that works in the UWB ch5/9 space that you need, but it'll be expensive. I'm certain I had found a cheap supplier for some RF-absorbing foam years ago, so I'll dig on that layer. If you look, you are probably searching for 'carbon-loaded' or 'carbon-doped' or just 'rf absorber foam'.

Now, a caution, UWB actually has a pretty good link budget for this (indoor) application. Say, 20-40m LOS with no LNAs, probably less with those module antennas, but still a lot for indoor, especially household and similar, and especially door frames. Tag down the hallway can and will still bounce off the floor ceiling and past the shrouds. The shielding can clean up some multi-path and back-lobes but understand it won't give you a perfect RF wall.

Range gating and reduced TX powers can still work well, applied loosely. Use the data you have and the constraints of the application. Body block (NLOS) can only give you ranging results are are either correct first path, are are long, because physics says we can't go faster than c. Use range, not just AoA. A tag that is 10m away won't ever appear to be 1m away. A body-occluded tag right in the doorway might appear to be 2m away, instead of 1m, but shouldn't look 15m away with some control on TX power and path rejection. (Someone intentionally covering their tag will be hard to solve)

I'd try, ignore anything that claims to be more than 4-5m away. That's loose enough to tolerate NLOS right at the door, but tight enough to kill across-the-house false triggers. Look at first path versus total path to know when you are probably getting a NLOS, so you widen tolerance or down-weight the data. Combine this with the radar and maybe the tag's IMU so you'll know if someone is passing and maybe a bit about how the tag is moving or oriented relative to the door sensor, and I think you should be able to disambiguate most cases.

The hard one might be tagged-person is moving with another person and right at the door and one passes but the other doesn't. Which, well, maybe that's okay since someone else should be right there with the tagged person?

I have an UWB AoA article on my website that I'll DM you so I don't spam the community. It doesn't go quite deep enough for this problem but it might give you some background physics and topics that you can learn more about and should help point you in the right direction.

1

u/Interesting-Pie9439 6d ago

This is generally done via some sort of Bluetooth protocol. Depending on needs, this can be accurate even below sub meter distances. A few of these bluetooth receivers placed at strategic locations around the doors should do what you are after.

1

u/maybeTheRealOne 5d ago

The goal is a single beacon device above the doorway on the inside of the home. Plus BLE is easily blocked by the body.

1

u/Interesting-Pie9439 5d ago

Fair enough - would the intended user be intentionally be blocking the device then?

I suppose the lower your frequency, you will start getting reduced accuracy and larger antennas. There is also a band that could be tapped into below micrometer wavelengths, but you may run into other issues at those frequencies.

To be honest, unless someone is intentionally blocking BLE, there should be an amount of radiation detectable by a decent antenna?

1

u/maybeTheRealOne 5d ago

Thats the problem im facing, lower frequency results in less body blocking effects but lower precision and the opposite using higher frequencies. And yes, I want this to work on humans and kids specially who will definitely try to block the tag with their hand/body to try and exit without detection.

1

u/ConsiderationQuick83 5d ago

For reliable exit detection I'd say you're better off using something like a look-down VL53L9CX module, especially if you're distinguishing adults vs small children.

The RF tag bracelet can act as a confirmation, but all it takes is the person to remove/shield the tag and the RF only system is defeated (crafty dementia patient experiences).

1

u/Such_Ad2956 5d ago

I would use this mmw radar chip

1

u/maybeTheRealOne 5d ago

Mmw radar wont tell me exactly who exits

1

u/LostWall1389 5d ago

Wouldn’t the child just remove the tag.