This project aims to create a cost-effective solution to mapping interior spaces of unknown configuration using n amount of nodes that can be laid out to cover as much of interior space as needed. The mapping is for a top-down 2D representation of a room and can be used in various applications like real estate and industrial applications.
The original aim was to have modularity of sensors on board that could map various environment variables like temperature as the mapping was being done.
The project is made up of the following general components:
- Node(s)
- Server
- SLAM
Figure 1 Nodes completed for the project.
These are individually programmable devices that can operate alone or in conjuction with other nodes. The packaging holds the battery and hardware along with the distance measuring sensors.
This can be anything that can run python and connect to Wi-Fi. While developing this project, a laptop was used to connect and manage deployed nodes and process incoming data using SLAM. In terms of using Wi-Fi, either a local network or a hotspot from the laptop should suffice as the only requirement is having the nodes and server be on the same network. The server can also utilize the frontend environment built with Flask to avoid using the terminal.
The bulk of the software in this repository aside from ESP code is the SLAM processing code. This takes takes the distance measurement data from the nodes and builds and outputs a 2D layout of the mapped space.
Figure 2 Sample map output from SLAM using data collected by three nodes.
Component | Purpose |
---|---|
ESP32-WROOM-32 | Microcontroller - Connection to server |
DWM1000 | Distance measurements between nodes |
DRV8834 | Stepper motor driver |
MPM3601 | 3V buck converter |
UBEC 5V (Adafruit) | 5V buck converter |
TFMini | Distance measurements to obstacles |
Figure 3 A revision 2 board. Note: revision 3 has same layout, but different GPIO pins are used.
The packaging for the nodes was designed by Tanner Andrulis and was printed using PLA.
Programming requires the use of a USB-Serial cable and can be found on Adafruit as an example.
- Setup ESP-IDF on your machine. Instructions can be found here.
- Plug in the cable into your machine and wire the
orange
,yellow
, andblack
pins to the board in that order to the programming header. - Power on the node and put it in flash mode by holding
BOOT
and pressingRST
. Let go of both. - Run
idf.py flash
(optionally add-p PORT
to specify which port you're using). - Wait until completion and press
RST
.
The frontend is setup with Flask working as the lightweight server. Because it's written in Python, we could easily reference our existing scripts that communicated with the nodes and integrate them with Flask and by extension, the user interface.
scipy, numpy, pygame