Go Down

Topic: Using Arduino UNO with DWM1000 (Read 489 times) previous topic - next topic

qassim93

Greetings Guys,

Just a while ago, I've seen a page called "Wayne's Tinkering Page" (Link: https://sites.google.com/site/wayneholder/uwb-ranging-with-the-decawave-dwm1000---part-ii). 

The idea was to use his PCB design that can be ordered via "OSH Park" and use the "arduino-dw1000" library (Link: https://github.com/thotro/arduino-dw1000) to get the "DWM1000" running and do some "Indoor Locating System" with it.

The problem is, after soldering all the components and verifying that everything is fine, I connected the "Arduino UNO" and uploaded the  "Basic Connectivity Test" example without changing any parameter. The figure below shows the output of the serial monitor (or see the attachments):



Note that every 10 seconds the uController tries to re configure the "DWM1000" and outputs the results to the serial monitor.

Could anyone please help me with this? 
Does the output of the serial monitor shows that the module is working properly? :smiley-confuse:



pylon

#1
Dec 06, 2017, 05:54 pm Last Edit: Dec 07, 2017, 06:54 pm by pylon
The linked site uses an Arduino Pro Mini and not an Arduino UNO. Post a wiring diagram of how you connected your UNO to the custom PCB. The output shows that you don't have a working SPI connection to the module so I guess it's a hardware problem.

qassim93

Hi Pylon,

Thank you very much for your response  :) .

I connected the SPI pins on Wayne Holder (10, 11, 12, 13) to the SPI pins in UNO (10, 11, 12, 13). Pin 2 and 9 on Wayne Holder were also connected to pin 2 and 9 in the UNO shield as well. The +5v supply of Wayne holder was also taken from the shield - as shown in the figure below.






As far as I know -please correct me if I'm mistaken-, both Pro Mini and Uno uses the same Atmega325p uController. So, I though I could use the same pin numbers and example code.


Thank you in advance   ;D

pylon

Quote
I connected the SPI pins on Wayne Holder (10, 11, 12, 13) to the SPI pins in UNO (10, 11, 12, 13). Pin 2 and 9 on Wayne Holder were also connected to pin 2 and 9 in the UNO shield as well. The +5v supply of Wayne holder was also taken from the shield - as shown in the figure below.
That seems to be correctly wired. You should check if the level converter on-board the Wayne Holder works correctly. Power the Wayne holder using the USB connector on the board and don't connect the UNO. Then put 5V to pin 10, 11 and 13. Check if the output has 3V3 on the DWM1000, SS (10) goes to pin 1, MOSI (11) to pin 2 and SCKL (13) to pin 4, counted from the USB connector to the antenna and on the side of the R2.

The opposite direction (MISO) isn't that easy to check. You might give 5V to SS and put 3.3V (from the side pins on the Wayne board) to pin 3 of the DWM1000 and check if you get 5V on MISO (12).

qassim93

Thanks again for your response pylon  :smiley-lol:


I believe I checked pin 10, 11 and 13 and the output of the level converter was 3.3v. But unfortunately I didn't check (MISO).

Once I go back to the lab on Sunday I will double check all SPI pins again and (MISO) the way you suggested.


I really appreciate your responses, many thanks :smiley-wink:

qassim93

Greetings Guys,

I measured the voltages at DecaWave board SPI pins (SS, MOSI, CLK) relative to the common ground while supplying the board using the USB and without connecting the UNO board.

What I saw on the oscilloscope screen is a bit strange:

- I always measure 3.3 volts at the Decawave's SPI pins (SS, MOSI, CLK) even when no 5v is connected to the input of the LLC.

- For one of another board, I measure a square wave of 10Hz and 3.3v as well without connecting anything to the input of the LLC.


Does this means that my Decawaves and the boards are burned  :( .

Please advice, Many thanks ....

qassim93

Please help ??!!!

I came across the fact that the main difference between UNO and Pro Mini is the operating clock. Could that be the reason why there is something wrong with the SPI communication ?


pylon

Quote
I came across the fact that the main difference between UNO and Pro Mini is the operating clock.
The 5V Mini runs on 16MHz too. The 3V3 Mini runs on 8MHz. I expected you to have the 5V version.

Quote
I always measure 3.3 volts at the Decawave's SPI pins (SS, MOSI, CLK) even when no 5v is connected to the input of the LLC.
That's correct, connect the input to GND and the output should go to GND too. That's the way the internal level converter works (a simple MOSFET).

Quote
For one of another board, I measure a square wave of 10Hz and 3.3v as well without connecting anything to the input of the LLC.
For what kind of board are you measuring on what pins?

qassim93

Thank you very much for your time pylon, I really appreciate your help.

I tested the (SS, MOSI and CLK) pins the way you told me by connecting the LLC input to GND and measure the voltage at the corresponding pin on the DWM1000 side. And what happens is as you said - the output goes to GND as well.

I tested the MISO pin the same way you suggested, and I also got 5v at the output of the LLC  :) .


About the square wave that I get on the second board I soldered - which is another Wayne board, I get something like a square wave at SS and MOSI pins when the input of the LLC is floating - not connected to anything. But when I connect the LLC input to GND  the output goes to GND as well.


Thank you very much for your help again :smiley-lol:





pylon

Quote
About the square wave that I get on the second board I soldered - which is another Wayne board, I get something like a square wave at SS and MOSI pins when the input of the LLC is floating - not connected to anything. But when I connect the LLC input to GND  the output goes to GND as well.
SS and MOSI are on the inputs of the corresponding LLCs. I don't understand what exactly you measured.

qassim93

Hello Pylon,

Sorry for the late response.

SS and MOSI are on the inputs of the corresponding LLCs. I don't understand what exactly you measured.
I Actually scraped this one because the other PCB I soldered started working properly. I did nothing and it just started working properly after I did the test you told me about. I know its strange but this what happen.

I soldered another two PCBs, exactly the same way I did for the one that is working fine. The problem with these ones is that they sometimes work and sometimes not.

When I connect them and upload the connectivity test example, I get the correct addresses and everything. But after few reads - which happen every 10 seconds - I start getting wrong info - which implies that the SPI communication went wrong.

I tested the outputs of the LLC and everything seems to work fine.

Is there a chance that I damaged the DWM1000 module while soldering it and that's why it behaves funny?





pylon

Quote
Is there a chance that I damaged the DWM1000 module while soldering it and that's why it behaves funny?
It's possbile but I don't believe so. This sounds more like a bad soldering point. Use a magnifying glass to check every soldering point and resolder it if it doesn't shine.

Go Up