We got another one for y’all, Ultra-Wideband! Chances are, you encounter this technology every day, and it has finally reached the point of being accessible for use in maker projects! This is one of the coolest things I’ve picked up this year and is an incredibly robust way of adding distance measurements to your project. Stay tuned as well, we have a guide on using this to set up 2d and 3d tracking! “Getting Started With Ultra-Wideband & Measuring Distances| Arduino & Pico Guide” Read more
Hi Jaryd
Link ???Does not work.
Cheers Bob
Sorry bout that Bob, accidentally removed the hyperlink. Thanks for the catch!
Cheers Jaryd
Really excited for this, your video sparked a bunch of ideas
I’ve got an arduino mega2560 at home I’ll be using for prototyping but eventually I’d like to get a microcontroller that is just for my project - I’m keen to try out the 3D tracking and broadcasting the data over a network using OSC to Unreal Engine. I was wondering what advice you’d have around selecting a microcontroller? e.g. Would I go for the highest clock speed to make the sampling faster and able to handle the ~5 or more inputs from each AI thinker tracker?
Hi @Jaryd The human readable script is missing some code in the middle of the decode_uwb_distances function.
This got it working for me
distance_raw = struct.unpack('<I', data[byte_offset:byte_offset+4])[0]
if distance_raw != 0 or distance_raw != 0xFFFFFFFF:
distance_meters = distance_raw / 1000.0
distances.append(distance_meters)
Now back to seeing how many walls this signal will penetrate ![]()
@Jaryd The guide says “sending a message (in frequencies somewhere between 6.25 and 8.25 GHz).” But the product page says “Only to be operated on 433Mhz / 915-930Mhz / 2.4Ghz (check the product description for compatible frequency ranges).”
At what frequency did you do the testing.
I have not looked into this product in any detail because I don’t really have any use for it. The above frequency difference is huge, so just wondering.
Cheers
Jim
Hey @James46717 ,
Good spot! That message was intended for a time when we first brought on some high-gain antennas, and now our system picks up anything similar as it comes through (e.g., this). We’ve updated the wording to suit more scenarios, as there are people who can and do operate well beyond LIPD who are licensed to do so. We are doing our best to raise awareness of RF and taking a responsible approach to our projects.
Hey @Chris191673,
What issue were you having before? I just ran the code from the guide without issues on an Uno R4. Are you using a different dev board? Always happy to make the code more robust.
Cheers!
Hi Jaryd,
Perhaps a stupid question - but can these units be also used to send data as if the units were on a LAN? Could you use them to set up a local network that could transmit ROS messages between nodes that are not otherwise connected by wifi, etc?
Hey @Robert52304,
As far as I’m aware, UWB can send data like this, but we unfortunately didn’t see anything about it when developing the guide - these boards may be purpose built for ranging only. To give you a lead, there is a lot of talk and people using these on the AI Thinker forums. It is all in Mandarin though, so you will need some translations. Searching “bu03” on those forums might be your best bet.
Again, unsure if this is possible, and I suspect they are ranging only.
Hey Jaryd,
Is this the datasheet for the BU03?
You have the BU03-Kit.
Would this help work out the capacities of the Kit?
Hey @Robert52304 ,
I am not super familiar with the differences between the BU03 and the BU03-KIT that we are using for this guide.
To make sure you get the most accurate information available, here is a link to the BU03-KIT datasheet, which should have all the correct specs for this particular module.
Hope this helps!
Have a look at the SFM10 of SynchronicIT which has an cortex-m33 inside the radio to make them easier to use.
The programming environment is equal to arduino and instead of an external radio, the radio is inside the same chip. And it comes with tutorials to set up a basic measurement all the way up to a complete RTLS network.
Great Video. Is it possible to use an external antenna for increased range? What about a more powerful transmitter? I can see a use for this technology on a farm but might need a range of 1km
Hey @Miles303151, welcome to the forums!
Unfortunately, that might be a bit too far for UWB. Even the best systems have a range limit of about 100 meters in real-world conditions. Depending on what you want to do with them, GPS modules might be your best bet. If you have a good line of sight to satellites above, you can often get down to give or take a meter or two of accuracy.
Then you could report the locations of these GPS measurements to a central location with something like LoRa - a really solid and low-power radio communication technique. Meshtastic is a fantastic software that uses LoRa hardware to create your own local wireless network of devices, might be worth checking out!
Hope this helps, let us know exactly what your project entails (and if +/- 1 meter is accurate enough!)
Hi Jared,
Quick question.
Is the distance of the tag from the base stations data available from the tag unit?
That would be useful for a mobile project (robot for instance) to know where it is in 2d space.
Cheers
Brett
Hey @Brett282010,
Yes it is! You should be able to plug in the tag exactly as we do with base station 0 and get the exact same data. Super handy for exactly what you are describing.
Cheers!
Jaryd
Hi Jaryd,
I’m trying to use three of these & can do the AT configs & get sensible answers & confirmed configs, etc but no distance data (on other pins), hoping you might have some hints?
I have 3x BU03-Kit units.
Tag = AT+SETCFG=0,0,0,1
1x Base = AT+SETCFG=1,1,0,1
1x Base = AT+SETCFG=2,1,0,1
Each one I did AT+SETCFG=x,x,x,x (got OK msg) ,
then AT+SAVE (got OK msg),
then AT+GETCFG (got OK msg + config is OK
But AT+DISTANCE = 0.000
I used these pins for AT:
6 TX1 UART1_TX
7 RX1 UART1_RX
Then I used pins to look for data:
30 PA2 PA2,USART2_TX/ADC12_IN2/TIM2_CH3
31 PA3 PA3,USART2_RX/ADC12_IN3/TIM2_CH4
If you’ve got any ideas why no distance data that’d be great
I notice they are V1.0.0 (from AT+GETVER )
Can you please advise what is the latest firmware version?
Also any thoughts on comms with them via i2c, spi &/or PiicoDev, etc libraries?
Thanks, Nick
Hey @Nick101707,
When configuring the base station, start with an ID of 0. The Tag must have an ID of 0, and the first base station will have an ID if 0. The reason for this is that data will only be output from the device if the ID is 0. Right now you have a base station with an ID of 1 and 2. Your config data should look something like this:
Tag = AT+SETCFG=0,0,0,1
1x Base = AT+SETCFG=0,1,0,1
1x Base = AT+SETCFG=1,1,0,1
Reconfigure these and let us know how it goes!
That seems to have got it, thanks.
Also do you know if an RPi 3B+ or 4 can get the data from a tag (or base) via the left side USB port with the correct uart config strings /dev/ttyUSB0 (as shown by ls /dev//tty* ) etc?
I can program it & check configs via the USB port(s) Would you also have hints here please?