[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.
Armed 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”
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.
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.
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.
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…
“a large bag of water and minerals ”
Isn’t the proper phrase, “large ugly bag of mostly water” ? ST:TNG
I like Breaking Bad’s breakdown better these days:
50-75% by weight is water, only about 10% of the atoms in the body are Hydrogen, so by volume there can not be that much water, can there ? *ponder*
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.
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’
You could do that with two or three stationary cameras. It would be more reliable than dead reckoning using inertial measurements.
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.
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
So since drones are still a thing, how about putting this on a drone and flying it around for a 3D map of the fields in your neighborhood?
Damit. Gotta remember to read entire thread before posting. XD
Now do an automated one with several receivers and mechanics to move them through your whole apartment :-)
oooh… or with a quadcopter?
it’s gonna need an arduino!
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
Very cool! But how strong are these variations in reality? What is the mapping to the colours?
Blue/Purple = Best signal, signal goes to red, but by the time it gets to red it’s pretty much transparent so you only end up seeing yellow/greens.
Small correction: He didn’t video the scan on the mill, he stored the received data to the computer and then made the graph from that.
This is hacking at its best.
Now THAT looks like cyberspace.
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!
I’m guessing this is why indoor location tracking is really hard.
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.
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++++
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.
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.
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.
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.
Cell phones have basic magnetometers in them, and some apps give you the data rather than just an arrow for North.
I am impressed what you do with your free time.
The captured data does not appear to overwhelmingly describe the observer, so it is still useful data. The micro-drone idea which has been floated for the RTL-SDR and now this could further mitigate this concern.
The captured data DEFINITELY describes the observer.
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.
It resembles the model of the Universe.
Hmm, interesting observation. I wonder what the wavelength would amount to? 4 degrees Kelvin?
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.
Meh, it’s resolution is almost guaranteed LESS then it’s margin of error, so it’s basically a nice pretty random image.
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!
Of course the resolution is not good. Its a 5$ Wifi module which is build for something completely different.
Now I’m wondering about what the heck though. Shadows? Are these maps static?
Makes a good stud finder.
In mother russia, stud find you.
One would think some “Heisenberg Compensators” would be needed
to effect a precise meaurement that would no doubt be influenced by
the very probes employed to capture the data.
I can imagine the progress of this project,
“hey, I get the RX level!”
“what if I record the strength and move it around?”
Parents “why on earth are you crawling on the floor in a dark room with an LED in your hand filming yourself???”
Random guy on this blog (me): This is an awesome project! Love everything about it!
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 ;)
I wonder if the receiving antenna is rotated in respect to the transmitting antenna, if you might get different peaks in certain areas.
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?
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
Already done http://www.extremetech.com/extreme/184347-mit-perfects-cheap-accurate-through-wall-movement-and-heartbeat-detection-with-wifi but just wait until your regular router can do some of this.
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.
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.
Addendum: it seems PS imports a maximum of 500 frames. I guess it becomes a bit much when you need to treat each frame as a PS picture?
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
Please be kind and respectful to help make the comments section excellent. (Comment Policy)