Go Down

Topic: DWM1000 and DW1000 (Read 19282 times) previous topic - next topic

1mrben1

Hi Guys,

Has anyone had any luck with Arduino and the DecaWave DW1000 chip?

http://www.decawave.com/support

I've got a few DWM1000 chips and plan on putting a few tests together in the next few weeks. The application code they supply is for the £400 test kit based on ARM, of which I have very limited knowledge (none), I'm keen on doing some TDoA tests with Ardunio and the cheaper £20 chips rather than their entire board.

Happy to contribute to building an arduino-based library for this.

Cheers,
Ben

Peter_n

That is not an easy chip.
You can start with a 3.3V Arduino, since the chip is 3.3V.
Try to control a GPIO pin via the registers, after that you can use the examples and flowcharts.

1mrben1

#2
Nov 23, 2014, 02:50 pm Last Edit: Nov 23, 2014, 02:52 pm by 1mrben1
Yeah, agree, it's much more complex than I had initially anticipated! I have quite a few 3.3v Arduino Pro Mini's lying around so will be using them as the starting point. The company supplying the chips has also provided the source code for their ARM based prototype.

I haven't yet wired two up, but it seems fairly simple to interface (the DWM1000 chip has an SPI interface).

My biggest question at the moment is around distributing a clock signal at 38.4MHz to the nodes when they are 100m apart (I.E.
http://www.decawave.com/sites/default/files/resources/aps007_wired_sync_rtls_with_the_dw1000.pdf) Can this be done through a 555 timer, or is another dedicated chip required? - I'm comfortable with coding and Arduino, but this looks a bit more hardcore "electronics" focussed.

Cheers,
Ben

Peter_n

#3
Nov 23, 2014, 04:51 pm Last Edit: Nov 23, 2014, 04:52 pm by Peter_n
You can blink a led with a 555 timer, it is not ment for such high precision timing measurements.

I think you should do it like this:
Buy a clock generator of 38.4 MHz. They are called "oscillator" or "TCXO", and are 1 to 30 dollars. I don't know if they can drive a 100 meter CAT5 cable, you have to check that.

Use CAT5 cables of the same lengths to the nodes and also use the Si5317 as they recommend it.
Instead of CAT5 cable, you can also use coaxial cables. But you need driver and receiver chips at both ends.

The Si5317 is only in QFN package, and is a very versatile freaky little thing. It kind of guesses the input clock and generates the output clock itself. That makes it ideal in this situation, but perhaps a buffer/booster/schmitt-trigger chip can do the same. I'm not familiar with such high frequency specific timings, so I don't know which chip is suitable.

You should not hold back on accuracy or cable quality. So don't buy the cheapest 38.4 MHz clock you can buy. Accuracy is needed very hard in this situation to get good results. You should also not shorten a cable by a few meters, use the same length, even if the node is one meter away.


1mrben1

Thanks Peter, I was already thinking about using equal length cables as that cuts out the need to adjust/delay the time based on the delay in each cable.

Annoyingly enough, it doesn't look like 38.4Mhz is a standard frequency, only found one place that stock the chips, so was hoping I could upscale or downscale a more widely available chip instead.

Peter_n

Google for : oscillator 38.4mhz
Result: mouser, farnell, rs-online, digikey, newark, amazon. Every major electronics component supplier sells it.
You can even buy a temperature compensated oscillator. A good quality oscillator is still a little inaccurate when the temperature changes. Some use a temperature controlled heater to keep the internal crystal at the same temperature, others use a pre-defined compensation according to the temperature. 

1mrben1

Thanks again Peter, I realised after posting that, that i was searching for the wrong thing, all sorted now, will keep you updated, thanks for the help.

Cheers,
Ben

wisraf

Hi Guys,

Does anybody here, he managed to make it work!!
I can read data from the device such as th device ID but I don't know how to configure it to exchange msg between a Tag and an Anchor.

Does anyone can help me? 

eagle1361

Well, I've been working on that problem for the last few week. It's difficult. There are a lot of settings that are required to be initialized. I have been analyzing the eval board from Decawave. By analyzing the SPI link between the processor and the DM1000, i've been able to see how Decawave sets up their chip. If you're good at reading source code, you might contact Decawave and ask if they'll give you a copy of the code. It won't be perfect for just the chip, but be a good starting point.

wisraf

Thanks for your reply it work now, but I have a specific question about timestamp. I can't understand how the timestamp works. I have tried to calculate the distance with only two messages exchange (you can find details in this link) (link) but I get a false results. I don't know how to convert the timestamp to a standard units of measurement such as (ns or us) maybe with those units I'll get a good distance. The other thing, I do not understand their method of calculating distance, they do three messages exchanges to get the distance (link) and the problem that they will find (Trr-Tsp)-(Tsr-Trp) < 0 and  (Trf-Tsr)-(Tsf-Trr) > 0 and I do not how??

subaidah

Hi guys,

I managed to read from registers like DEV_ID and TX_FCTRL. The code below will give me 0xDECA0130

SPI.transfer(0x00);
msg = SPI.transfer(0x00);
msg = (msg << 8) + SPI.transfer(0x00);
msg = (msg << 8) + SPI.transfer(0x00);
msg = (msg << 8) + SPI.transfer(0x00);

But how am I supposed to read/write into registers with sub addresses? For example I want to access GPIO_CTRL (0x26) -> GPIO_MODE, what command should I send?

My attempt:
SPI.transfer(0x66); // 01100110
SPI.transfer(0x00); // 00000000
msg = SPI.transfer(0x00);
msg = (msg << 8) + SPI.transfer(0x00);
msg = (msg << 8) + SPI.transfer(0x00);
msg = (msg << 8) + SPI.transfer(0x00);

The serial monitor in Arduino gives me "222" which is 0xDE, and its not the result I needed. Can anyone please enlighten me?

Please help, thanks!

ikki

I am doing this as well. I connected it to 3.3v Arduino Pro Mini.
It can read and write to register.
But the Anchor can not receive any frames send from Tag.
I get the software code from DecaWave. But the devices still can not work well.
How to connected to Arduino board?

ikki

Finally i make it work.
I check all register setting, and found that some bit does not set.
The reason is that Arduino is 16-bit architecture. When doing bit-shift over 16-bit the data will lost.

1mrben1

Never managed to get this to work, don't think I have the knowledge required in ARM. - Selling a few of the modules that I bought way back though, if anyone's interested? :)

http://www.ebay.co.uk/itm/Decawave-DWM1000-modules-8x-Real-time-location-UWB-RFID-ultra-wideband-RTLS-/151706862553?

gnkth

#14
Jul 17, 2015, 06:30 am Last Edit: Jul 17, 2015, 06:33 am by gnkth
Realise my answer to this is a bit late, but yes, we have successfully managed to use DWM1000 with Arduino. We had to rewrite large sections of the Decawave source code to squeeze it in to an ATmega328P. This is how our Arduino Nano clones turned out:
http://www.loligo.se/navigation/LPS_and_LPS_mini_top.jpg
http://www.loligo.se/navigation/LPS_and_LPS_mini_bottom.jpg
http://www.loligo.se/navigation/LPS_v1.1_150409.pdf
http://www.loligo.se/navigation/LPS_mini_v1.0_150423.pdf
PM me for preliminary source code (Arduino lib and program examples).

Go Up