Mapping WiFi Signals In 3 Dimensions

[Charles] is on a quest to complete ever more jaw-dropping hacks with the popular low-cost ESP8266 WiFi modules. This week’s project is plotting WiFi received signal strength in 3D space. While the ESP8266 is capable of providing a Received Signal Strength Indication (RSSI), [Charles] didn’t directly use it. He wrote a simple C program on his laptop to ping the ESP8266 at around 500Hz. The laptop would then translate the RSSI from the ping replies to a color value, which it would then send to the ESP8266. Since the ESP8266 was running [Charles’] custom firmware (as seen in his WiFi cup project), it could directly display the color on a WS2812 RGB LED.

The colors seemed random at first, but [Charles] noticed that there was a pattern. He just needed a way to visualize the LED over time. A single frame long exposure would work, but so would video. [Charles] went the video route, creating SuperLongExposure, an FFMPEG-based tool which extracts every video frame and composites them into a single frame. What he saw was pretty cool – there were definite stripes of good and bad signal.

wifiPOVThumbArmed with this information, [Charles] went for broke and mounted his ESP8266 on a large gantry style mill. He took several long exposure videos of a 360x360x180mm area. The videos were extracted into layers. The whole data set could then be visualized with Voxeltastic, [Charles’] own HTML5/WEBGL based render engine. The results were nothing short of amazing. The signal strength increases and decreases in nodes and anti-nodes which correspond to the 12.4 cm wavelength of a WiFi signal. The final render looks incredibly organic, which isn’t completely surprising. We’ve seen the same kind of image from commercial antenna simulation characterization systems.

Once again [Charles] has blown us away, we can’t wait to see what he does next!

58 thoughts on “Mapping WiFi Signals In 3 Dimensions

  1. Neat Project, Now couldn’t you mesh this with a cheap accelerometer/magnetometer to develop some sort of hacked inertial motion unit to map this out in cartesian coordinates. Say, start in a corner of your house and call that 0,0 and move about while sampling to get a 3D field. You could then plot the results on 3d grid. Still a cool project either way.

    1. That’s a really good idea. Consumer grade indoor positioning is difficult and sorely needed for AR/VR apps, but this could just about be what it takes to compensate for accelerometer drift. Meanwhile SLAM could likely be used to greatly diminish the user’s bootstrapping effort.

      1. One problem would be that moving a large bag of water and minerals through any RF field will change it. Like most things technical, if you could remove the users from the system it would be so much easier.

        1. It certainly would be computationally intense to accomplish this. You would have to equate this field change with the desired data so that the system tracks one or more bodies in motion along with their gestures. It’s definitely not a free-time hack…

        2. Seeing people likely want the map for use with a device they are holding it seems to me the large bag is required to get real data.

          The problem though is the orientation of said bag, you need to move in a way that you would most likely move during use and with an optical pickup you might then be forced to obscure the view of a camera in this article’s camera based setup.

          But even so, as is shown, the map represents the peaks caused by the frequency of the device, so the ‘bag’ seems to not affect it too much after all and the results must be similar to a ‘bagless’ measurement.
          Plus you can always attach it to a plastic tube to keep it away from you.

        3. You must keep the user. You need the user. Frickin bot. Oh shit this isn’t 4chan. Yes, so see we need to have the Wifi’s Perceived Transmission Area. have the user have personal/shareable/orientable screens to use in that space. some Pspace -> NP -> NP’

    2. While there’s a lot of very difficult to do accurately solutions for indoor positioning, it’s still a pain. I’ve always wanted to do systems for that, but have always given up due to not having enough return on my effort.

      1. Yah, I completely understand. It’s one of those things that seems easy on paper but the practicality of it is not often in sync with the reward. Plus one thing that my idea neglects is the time element, which I would imagine has a huge impact on reliable data and adds further complexity. Either way, cool project you put together. Cheers

  2. beautifullll!! how interesting those ‘amorphic’ clusters, it makes me think how the signal bounces and how other signals or fisical shapes may be afecting it, wonderfull thankyou

  3. Amazing that it’s so static… or is it? If you do the same area again, same results? It sure doesn’t look like any uniform polar graph that RF people claim.

    And what if you placed objects in that space, could you diffuse it so that we could reduce dead spots? That’s something I’d want in my home so my phone would work in the bathroom too (without having to buy a repeater). Maybe some RF mirrors at the right locations…

    Very cool data, nicely done!

    1. And remember, this is only the graph of a few cubic feet.

      And depending on the channels used (the ESP8266 supports all), it is also the window of frequencies of the following:
      802.11B – 11 Mbps, 22 MHz wide
      802.11G – 54 Mbps, 20 MHz wide
      802.11N – 65-260/150-600 Mbps, 20/40 MHz wide

      Kinda crazy, isn’t it? And this is some of the best work I’ve seen in a loooong time with regards to radio power distribution.

  4. Great Hack!,
    It’s cheap but amazing projects like this that brought me here several years ago and the reason I come back.
    Having played with CB radio and antennas ect as a young fellow and being well aware that were are completely surrounded by radio waves all the time everywhere I always wondered what they would “look” like I’d you could sense them visually. This is small step towards that ability to visualize radio spectrum and I’m unsure if anything similar has been done in the past.
    On a larger scale it would be interesting to have a drone fly around mapping signals in a larger area perhaps, or a similar hand held unit which would allow you to, oh say place your laptop in that perfect spot in your apartment to maximize your reception of the hot spot at the Neibour hood Starbucks.. Anyway Supper Cool.. :-)x++++

  5. While you could use a drone to follow a 3D roomba-like path through the air, the important places to map would be the most likely locations for using a WiFi device. You’d also have to consider origin (router) and destination (tablet, computer, cell phone) locations. Start with analyzing where your router is, and whether the device is in a prime location. If that’s good…no problem to solve. If you can slide the receiver a few inches to optimize, that’s good. Next would be to move the router and try it all again.

    1. I was thinking a roomba with a stick and a bunch of these along the stick. I don’t think great positional data can be taken from a roomba so tracking cameras might be needed, or maybe just return to the whole long exposure idea here (the video might be good for repeated trips over the same area).
      It’s not perfect because of height of the sensor stick. But maybe this can be combined with the physicist who tried the wifi modeling of his apartment.

  6. In the video there’s a comment about diversity “messing up” the results. Given that these dead spots are *exactly* what diversity is supposed to solve, I would want to see a side-by-side of with and without. Assuming the diversity setup is properly based on the half-wavelength, the peak-to-peak variation should go way down. Even more interesting would be to do a third scan with just the *other* antenna, and create a voxel view that’s colored both by signal strength and which antenna is active (by matching between the two separate and combined scans). I’m also curious what the peak-to-peak scale really is, and whether the radio is switching to a lower-bandwidth encoding in the worst spots: run a quick bandwidth test in addition to signal strength.

    1. Oh man that is a great test idea! Sadly, to plug in or unplug the antenna in my laptop, I would have to move it around… And mill time is hard to come by. BUT! If I find more time, this and using a magnetometer to map out a magnet are at the top of my list.

      1. The captured data DEFINITELY describes the observer.

        http://cdn.arstechnica.net/wp-content/uploads/2014/08/routerkitchenhelmholtz.png
        http://arstechnica.com/gadgets/2014/08/mapping-wi-fi-dead-zones-with-physics-and-gifs/

        It’s not going to be possible to avoid interference from your arm holding the device, or from an aluminum-frame mill moving it around. The microdrone would probably be a substantial improvement. A 3D string plotter (not using wire, of course) might be another good option.

    1. true.
      The question now is how big the impact is in this particular case. If the impact is know it can either be compensated or avoided… thats a tricky one if you wan’t to keep going with the ESP8266.

      The questions is if you really want to be that accurate.

    1. The inter-reading, and cross-layer coherence is incredible, with the extra readings, these structures are very clear in the source data. So clear when I was taking the data, I thought something was wrong while it was reading it… It wasn’t until I just let it run and composited it that it came out this clear!

  7. I can imagine the progress of this project,

    from
    “hey, I get the RX level!”

    to
    “what if I record the strength and move it around?”

    over
    Parents “why on earth are you crawling on the floor in a dark room with an LED in your hand filming yourself???”

    to:
    Random guy on this blog (me): This is an awesome project! Love everything about it!

    1. ADD:
      I would love to see a measurement around a house, may be measured by a small robot (with low influence on the signal). This would take ages (again, influence from weather etc) but I would be very curious how the result would look like in a 3-dimensional space. Since the device is that cheap…

      maybe get 100 of them (or a bit less :p), stack them on a stick and move around with this stick !! Sounds like a plan ;)

  8. Constructive and destructive interference due to the signal bouncing of walls and other objects (especially metal). This is why lower frequencies work better for RSSI-based localization.

    Anyway, what was the actual dynamic range of the signal strengths you received? How many dBm?

  9. excellent job dude. for your next challenge:
    fix the position of the sensor on other side of room.
    record the intensity while a person (or much simpler object like a sphere) moves through the room.
    Plot the result – Radar.
    Improve it by using two receivers at diff positions in room. Go crazy and do it with three.
    Use polar math to resolve collisions between rays(over time) or use a piece of tomography reconstruction s/w like http://niftyrec.scienceontheweb.net/wordpress/ or PyTom etc

    radar by Wifi signal

  10. I think this project should be included asap to anybody studying telecom in the university, after the theoretical part, of course. You can study so much with it and it is a lot less boring than using any of the smartphone apps for this.

  11. Many astronomy stacking software software packages also allow you to input video for long exposure, albeit often only plain uncompressed avi,, which limitation makes sense since you can’t have compression on astro data obviously.

    Additionally photoshop these days does stacking, and inputs video too.

    Just thought I’d mention it in case someone wants to try that route.

  12. There are innumerable products available in the marketplaces that are vended as cheap cellphone signal boosters. Most are tiny devices that can be immediately attached behind the battery or externally for boosting the signal captured and created by the mobile phone handset. signalbooster.com

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.