Git Product home page Git Product logo

makerfabs-esp32-uwb's Introduction

Makerfabs ESP32 UWB & Display

/*
Version:		V4.3
Author:			Vincent
Create Date:	2021/11/6
Note:
	2021/12/9 	V2.0:Add a Indoor Positioning demo.
	2022/6/29 	V2.1:Add DW3000 library.
	2022/8/1  	V3.0:Provides a library available for high-power versions. Move DW3000 to other 		  					     repositories.
	2022/9/6	V3.1:Added changes to the high-power version.
	2022/10/26 	V4.0:Add new version with SSD1306
	2022/11/15	V4.1:Change library name to mf_DW1000.zip
	2022/12/29	V4.2: Change wiki link
	2023/1/3	V4.3: Change directory name.
*/

[toc]

Makerfabs

Makerfabs home page

Makerfabs Wiki

Makerfabs ESP32 UWB Serials

Intruduce

ESP32 UWB : esp32-uwb-ultra-wideband

ESP32 UWB Pro : esp32-uwb-high-power

ESP32 UWB Pro with Display : ESP32 UWB Pro with Display

Wiki Link : ESP32 UWB Pro with Display

Ultra-wideband (UWB) is a short-range, wireless communication protocol that operates through radio waves, enables secure reliable ranging and precision sensing, creating a new dimension of spatial context for wireless devices.

This new ESP32 UWB pro with display is the updated version of ESP32 UWB Pro, with the following new spec:

  • On-board OLED, 1.3” 128*64, so the distance results can be directly displayed
  • Lipo battery charger& connector, so this module can work separately with batteries
  • Update UWB position, so the module can be directly installed into a case
UWB Basic UWB Pro UWB Pro with Display UWB DW3000
CPU ESP32-WROOM/WROVER ESP32-WROVER ESP32-WROVER ESP32-WROOM/WROVER
Core UWB DW1000 DW1000 DW1000 DW3000
Screen N N Y N
Measuring distance(m) 45 200 200 20
Battery Socket N N Y N
UWB Channel 2/5 2/5 2/5 5/9
Apple Interoperable N N N Y
Suitable for Normal Testing Long distance needed Long distance needed Product development

UWB Basic

front

UWB Pro

front

UWB Pro with Display

front

Example

Compiler Options

If you have any questions,such as how to install the development board, how to download the code, how to install the library. Please refer to :Makerfabs_FAQ

  • Install board : ESP32 .
  • Rename mf_DW1000.zip to DW1000.zip and install it.
  • Install library : Adafruit_SSD1306
  • Upload code, select board "ESP32 DEV"

**This library was modified from the DW1000 library to work with the Makerfabs hardware. **

Please download the latest version from our Github.

Example List

uwb_tag

For ESP32 UWB and ESP32 UWB Pro

Distance to the receiving end of the test. You need an anchor point to receive data.

uwb_tag_display

For ESP32 UWB Pro with display

Distance to the receiving end of the test. You need an anchor point to receive data.

anchor

For ESP32 UWB and ESP32 UWB Pro

Distance test anchor point.

anchor_display

For ESP32 UWB Pro with display

Distance test anchor point.

Indoor positioning

For ESP32 UWB and ESP32 UWB Pro

Three UWB modules were used for indoor plane positioning. Data is transmitted through UDP protocol and graphically displayed in Python.

The law of cosines is used to calculate tag coordinates.

def tag_pos(a, b, c):
    # p = (a + b + c) / 2.0
    # s = cmath.sqrt(p * (p - a) * (p - b) * (p - c))
    # y = 2.0 * s / c
    # x = cmath.sqrt(b * b - y * y)
    cos_a = (b * b + c*c - a * a) / (2 * b * c)
    x = b * cos_a
    y = b * cmath.sqrt(1 - cos_a * cos_a)

    return round(x.real, 1), round(y.real, 1)

Pin Define

ESP32 UWB and ESP32 UWB Pro

#define SPI_SCK 18
#define SPI_MISO 19
#define SPI_MOSI 23

#define DW_CS 4
#define PIN_RST 27
#define PIN_IRQ 34

ESP32 Pro with display

#define SPI_SCK 18
#define SPI_MISO 19
#define SPI_MOSI 23

#define UWB_SS 21   // spi select pin
#define UWB_RST 27  // reset pin
#define UWB_IRQ 34  // irq pin

#define I2C_SDA 4	//I2C screen ssd1306
#define I2C_SCL 5

makerfabs-esp32-uwb's People

Contributors

195cn avatar makerfabs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

makerfabs-esp32-uwb's Issues

Get relative range between two tags

Hi,

Would it be possible to get the range between multiple tags without anchor ?

For example, let's say I got the following case (no anchor):

ID Type
A Tag
B Tag
C Tag

Can I get the relative range between A and B, A-C, B-C ?
Would the Tag A connect to Tag B and perform a

Thanks for your time :)

Guru Meditation Error: Core 1 panic'ed (Interrupt wdt timeout on CPU1) using ESP32 anchor example code

Hi All,

I'm using a Mac running Monterey and attempting to run the example code on Arduino IDE for the ESP32 UWB, but it runs into this error:

Guru Meditation Error: Core  1 panic'ed (Interrupt wdt timeout on CPU1). 

Core  1 register dump:
PC      : 0x4008ac3a  PS      : 0x00060735  A0      : 0x80089bb2  A1      : 0x3ffbf18c  
A2      : 0x3ffb7d84  A3      : 0x3ffbd330  A4      : 0x00000004  A5      : 0x00060723  
A6      : 0x00060723  A7      : 0x00000001  A8      : 0x3ffbd330  A9      : 0x00000018  
A10     : 0x3ffbd330  A11     : 0x00000018  A12     : 0x3ffc2794  A13     : 0x00060723  
A14     : 0x007bf338  A15     : 0x003fffff  SAR     : 0x0000001e  EXCCAUSE: 0x00000006  
EXCVADDR: 0x00000000  LBEG    : 0x400841e1  LEND    : 0x400841e9  LCOUNT  : 0x00000027  
Core  1 was running in ISR context:
EPC1    : 0x400dfb6b  EPC2    : 0x00000000  EPC3    : 0x00000000  EPC4    : 0x00000000


Backtrace: 0x4008ac37:0x3ffbf18c |<-CORRUPTED


Core  0 register dump:

I did not touch the code. It is straight copied and pasted from the git repository, which led me to believe it would work without a hitch!

It seems to have an issue with this line:
DW1000Ranging.initCommunication(PIN_RST, PIN_SS, PIN_IRQ);
But I can't figure out why or what needs to be changed to get this code to run correctly.

Any help would be greatly appreciated!!!

Best
Lewis

Antenna tuning / calibration accuracy

Hi,

The board design seems good, but I'm getting poor accuracy on the range readings (i.e. the distance between anchor and tag is consistently reading around 50cm higher than the true measured distance). From reading the Decawave documentation, there is an application note regarding antenna calibration, which suggests this could be resolved in either software or hardware design: https://www.decawave.com/wp-content/uploads/2018/10/APS014_Antennna-Delay-Calibration_V1.2.pdf - is that something you've accounted for at all, or can suggest how to incorporate in the library?

Cheers,

Apple devices UWB?

What about iPhone, Apple Watch, AirTag?
It would be nice to use your board as an anchor and my apple devices. Set the radius and run the required routines from the esp32 repositories.

Not possible to connect more than 1 tag to 1 anchor

hello,
i'm struggling with implementation of multiple Tags in DW1000 makerfabs,
1 anchor can't connet with more than 1 tags at the same time.
and me i want to implemente 10 tags + 4 anchor. have you any sollution for this probleme please?
is it a bug in the library?

Watchdog issue on SPI IRC

It seems that this line in the DW1000 library is causing issue :

attachInterrupt(digitalPinToInterrupt(_irq), DW1000Class::handleInterrupt, RISING);

It's causing bootloop and triggers a timout watchdog

Thank you for you help, it would be much much appreciated !

here is the log i have :

--- Terminal on /dev/cu.usbserial-028D4616 | 115200 8-N-1
--- Available filters and text transformations: colorize, debug, default, direct, esp32_exception_decoder, hexlify, log2file, nocontrol, printable, send_on_enter, time
--- More details at https://bit.ly/pio-monitor-filters
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H
3fff0030,len:1184
load:0x40078000,len:13160
load:0x40080400,len:3036
entry 0x400805e4
E (97) psram: PSRAM ID read error: 0xffffffff
Guru Meditation Error: Core  1 panic'ed (Interrupt wdt timeout on CPU1). 

Core  1 register dump:
PC      : 0x4008b9c0  PS      : 0x00060735  A0      : 0x8008ac12  A1      : 0x3ffbed2c  
A2      : 0x3ffb7f54  A3      : 0x3ffb8890  A4      : 0x00000004  A5      : 0x00060723  
A6      : 0x00060723  A7      : 0x00000001  A8      : 0x3ffb8890  A9      : 0x00000018  
A10     : 0x3ffb8890  A11     : 0x00000018  A12     : 0x3ffc1d04  A13     : 0x00060723  
A14     : 0x007beed8  A15     : 0x003fffff  SAR     : 0x0000001e  EXCCAUSE: 0x00000006  
EXCVADDR: 0x00000000  LBEG    : 0x4008537d  LEND    : 0x40085385  LCOUNT  : 0x00000027  
Core  1 was running in ISR context:
EPC1    : 0x400e04b3  EPC2    : 0x00000000  EPC3    : 0x00000000  EPC4    : 0x00000000


Backtrace:0x4008b9bd:0x3ffbed2c |<-CORRUPTED


Core  0 register dump:
PC      : 0x4008bb37  PS      : 0x00060035  A0      : 0x8008a83b  A1      : 0x3ffbe82c  
A2      : 0x3ffbeed8  A3      : 0xb33fffff  A4      : 0x0000abab  A5      : 0x00060023  
A6      : 0x00060021  A7      : 0x0000cdcd  A8      : 0x0000abab  A9      : 0xffffffff  
A10     : 0x3ffc1af0  A11     : 0x00000000  A12     : 0x3ffc1aec  A13     : 0x00000007  
A14     : 0x007beed8  A15     : 0x003fffff  SAR     : 0x0000001a  EXCCAUSE: 0x00000006  
EXCVADDR: 0x00000000  LBEG    : 0x00000000  LEND    : 0x00000000  LCOUNT  : 0x00000000  


Backtrace:0x4008bb34:0x3ffbe82c |<-CORRUPTED




ELF file SHA256: 0000000000000000

I've used platformIO to compile with the following versions :

Processing esp32dev (platform: espressif32; board: esp32dev; framework: arduino)
---------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32dev.html
PLATFORM: Espressif 32 (6.0.0) > Espressif ESP32 Dev Module
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES: 
 - framework-arduinoespressif32 @ 3.20006.221224 (2.0.6) 
 - tool-esptoolpy @ 1.40400.0 (4.4.0) 
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
 

Not possible to connect more than 5 anchors to 1 tag

Whenever I try connecting more than 5 anchors to a tag the whole communication gets completely bugged and the ranging process between TAG and ANCHORS is basically stopped. I tried playing with the parameter MAX_DEVICES and LEN_DATA from DW1000Ranging.h but couldn't get it to work with more than 5 anchors at a time, which is a pitty. I really hope they take a look into this issue.

Where are the LED connected to?

Hi, I've recently bought 4 of these device for an indoor location project and I've seen that the board has a couple LEDs I would like to use to give some indications. Which signals of the ESP32 controls these leds??

Thx in advance for your help
Alejandro

Usb connector part

What is this footprint? I can't find any suitable part for this footprint. The closest avaliable thing was 2013499-1 from TE Connectivity, but its legs are spaced wider than should be here.
изображение
Part name in schematic is just MICRO-USB-5P, it makes no sense.

Is it able to do direction finding?

Hi there,

Thanks for sharing your code.

I am wondering how to do direction finding with your hardware.
E.g. how to tell what angle a tag against an anchor ⚓?

Tag client.connect() issue with Linux

I am trying to run IPS example both in linux and Window environment. Everything is fine with Window PC, but I have a connection opening issue from Tag to Linux PC. My linux PC is refusing to open connection. (when calling client.connect()) I turned off firewall in Linux PC and even tried direct IPAddress class variable instead of char variable type to enter host PC IP address in tag source code, but still it fails. Is there something that I need to do differently to make it work for Linux PC?

problem with ESP connection

i try to upload and compiling data and get this error

`Arduino: 1.8.19 (Windows Store 1.8.57.0) (Windows 10), Board: "ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, Core 1, Core 1, None"

Sketch uses 240933 bytes (18%) of program storage space. Maximum is 1310720 bytes.
Global variables use 16376 bytes (4%) of dynamic memory, leaving 311304 bytes for local variables. Maximum is 327680 bytes.
esptool.py v3.3
Serial port COM3
Connecting.....................................An error occurred while uploading the sketch
.

A fatal error occurred: Failed to connect to ESP32: Wrong boot mode detected (0x13)! The chip needs to be in download mode.
For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html`

It try to reset with the sreset button and doesn' work shat should i do ? thx

Issues with integrating other SPI devices (?)

Hi,
I'm trying to combine the UWB ranging with the Waveshare 2.9" e-paper display, which also uses SPI. Right now I'm not really sure whats causing the issues. (Maybe conflicting pins? Blocking code somewhere between libraries?).
The Library used for e-paper display is "GxEPD".
The SPI definition was unchanged in my testings:

GxIO_Class io(SPI, /*CS=5*/ SS, /*DC=*/ 17, /*RST=*/ 16); // arbitrary selection of 17, 16
GxEPD_Class display(io, /*RST=*/ 16, /*BUSY=*/ 4); // arbitrary selection of (16), 4

As long as I dont run (from GxEPD Lib):
display.init(115200);
Ranging works fine, but as soon as I try to combine them I get this multiple times, instead of ranging:

Guru Meditation Error: Core  1 panic'ed (Interrupt wdt timeout on CPU1). 

Core  1 register dump:
PC      : 0x4008a716  PS      : 0x00060d35  A0      : 0x8008996e  A1      : 0x3ffbedbc  
A2      : 0x3ffb7f54  A3      : 0x3ffb8890  A4      : 0x00000004  A5      : 0x00060d23  
A6      : 0x00060d23  A7      : 0x00000001  A8      : 0x3ffb8890  A9      : 0x00000018  
A10     : 0x3ffb8890  A11     : 0x00000018  A12     : 0x3ffc3414  A13     : 0x00060d23  
A14     : 0x007bef68  A15     : 0x003fffff  SAR     : 0x0000001e  EXCCAUSE: 0x00000006  
EXCVADDR: 0x00000000  LBEG    : 0x40085e74  LEND    : 0x40085e79  LCOUNT  : 0x00000000  
Core  1 was running in ISR context:
EPC1    : 0x400e16d3  EPC2    : 0x00000000  EPC3    : 0x00000000  EPC4    : 0x00000000

Backtrace:0x4008a713:0x3ffbedbc |<-CORRUPTED

Core  0 register dump:
PC      : 0x4008a893  PS      : 0x00060035  A0      : 0x80089597  A1      : 0x3ffbe8bc  
A2      : 0x3ffbef68  A3      : 0xb33fffff  A4      : 0x0000abab  A5      : 0x00060023  
A6      : 0x00060021  A7      : 0x0000cdcd  A8      : 0x0000abab  A9      : 0xffffffff  
A10     : 0x3ffc3230  A11     : 0x00000000  A12     : 0x3ffc322c  A13     : 0x00000007  
A14     : 0x007bef68  A15     : 0x003fffff  SAR     : 0x0000001a  EXCCAUSE: 0x00000006  
EXCVADDR: 0x00000000  LBEG    : 0x00000000  LEND    : 0x00000000  LCOUNT  : 0x00000000  

Backtrace:0x4008a890:0x3ffbe8bc |<-CORRUPTED

ELF file SHA256: 0000000000000000

Rebooting...

I don't quite know where the issue is. I'm using this for an university project and am also planning on building another version with the new Apple compatible revision. Therefore I have to get this working somehow. I hope someone can help me out.
It's not necessarily an issue with this library, I just cant tell at the moment.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.