thotro / arduino-dw1000

A library that offers functionality to use Decawave's DW1000 chips/modules with Arduino.
Apache License 2.0
516 stars 288 forks source link

Device ID: 00 - model: 0, version: 0, revision: 0 #136

Open yigibihe opened 7 years ago

yigibihe commented 7 years ago

Hello,

I have been trying to get ranging example to work for a week. When I run the connectivity test it usually returns this: Device ID: 00 - model: 0, version: 0, revision: 0

But occasionally it returns Device ID: DECA, in which case ranging works fine.

I have connected my module as the example test board, added an 330 ohm resistor for IRQ pulldown. 4 lines of SPI, IRQ and reset are connected. I'm using a 3.3 v arduino mini pro to power and drive the module. I also added 500uF capacitor to the power line of dvm1000 for power level stability. I have few dvm1000's , they seem to be working whenever they want. I change the module without changing the wiring, still the same modules sometimes work and sometimes does not.

Rotzbua commented 7 years ago

I have almost the same config. Sometimes I get no output or corrupted. The ATMEGA32U4 need some startup time. My workaround: Add after Serial.begin(9600); a while (!Serial); or a delay(5000);.

yigibihe commented 7 years ago

Solved: PCB's were bad. New PCB's solved the problem. I also added the while to setup for extra stability. Thank you.

az-z commented 7 years ago

What pcbs did you use?

On Dec 12, 2016 11:31, "yigibihe" notifications@github.com wrote:

Solved: PCB's were bad. New PCB's solved the problem. I also added the while to setup for extra stability. Thank you.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/thotro/arduino-dw1000/issues/136#issuecomment-266478167, or mute the thread https://github.com/notifications/unsubscribe-auth/AExz3W09sBudKE-H_TOcrYhh82c_3zGaks5rHXbqgaJpZM4LFRBP .

yigibihe commented 7 years ago

I got the adaptor pcb in the repo printed. First guy screwed up at printing, second guy did a better job which solved my "00" problem.

az-z commented 7 years ago

And how did you figure out that it is a pcb?

On Dec 12, 2016 11:37 AM, "yigibihe" notifications@github.com wrote:

I got the pcb in the repo printed. First guy screwed up at printing, second guy did a better job.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/thotro/arduino-dw1000/issues/136#issuecomment-266479952, or mute the thread https://github.com/notifications/unsubscribe-auth/AExz3V394gNnNgZbNgzlEdnTr_VV7jCgks5rHXhQgaJpZM4LFRBP .

yigibihe commented 7 years ago

Multimeter buzzer found out the shorts. Still pretty ashamed for not checking them when I first got them.

grex93 commented 7 years ago

hi, i'm using an arduino mini pro, and i attach pin like in the example ( photo) . I have for the basic test this result: 1000 initialized ... Committed configuration ... Device ID: DECA - model: 0, version: 0, revision: 0 Unique ID: 00:00:00:00:00:00:00:00 Network ID & Device Address: PAN: 00, Short Address: 00 Device mode: Data rate: 6800 kb/s, PRF: 16 MHz, Preamble: 128 symbols (code #4), Channel: #5

is it correct? because i have id: DECA but the others info they are all zero...

Rotzbua commented 7 years ago

@grex93 That's wrong. model: 0, version: 0, revision: 0 should be non zero.

grex93 commented 7 years ago

i follow exactly this example: https://github.com/thotro/arduino-dw1000/blob/master/adapterBoard/AdapterBoardTestBed.png but instead of 330ohm i used 470 ohm.. i put ground and vcc from the left side, like in the example...is it correct? ( see the photo)

whatsapp image 2017-01-07 at 20 04 07

hmatulis commented 7 years ago

image Apparently the blue ,yellow and white cables (top right) are connected to DWM1000 ground (pins 24 , 23 and 21) and nothing is connected to MOSI (18) and CS (17) . Double check your wiring. The red wire is connect to pin 5 (VDDAON) only? You also need to connect VCC to pin 6 and/or 7 (VCC3V3).

grex93 commented 7 years ago

i follow exactly this image... image i'm sure about the red one and the blu one ( VDDAON and GND) , but for the others i follow the image .. i can't find any other image of the connection with arduino

az-z commented 7 years ago

I have a really bad experience with soldering; )

On Jan 7, 2017 6:40 PM, "grex93" notifications@github.com wrote:

i follow exactly this image... [image: image] https://cloud.githubusercontent.com/assets/21346328/21746094/94485198-d53a-11e6-9049-eff93d168106.png i'm sure about the red one and the blu one ( VDDAON and GND) , but for the others i follow the image .. i can't find any other image of the connection with arduino

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/thotro/arduino-dw1000/issues/136#issuecomment-271118129, or mute the thread https://github.com/notifications/unsubscribe-auth/AExz3bmNpiO_Y4S5c1ttvnMr53p5-uLlks5rQCJHgaJpZM4LFRBP .

grex93 commented 7 years ago

hmatulis can you help me with the pin connections?

hmatulis commented 7 years ago

Sure grex93, The fritzing image refers to the pcb , not to the DWM1000 itself. I suggest you to download the DWM1000 datasheet from decawave site: http://www.decawave.com/sites/default/files/resources/dwm1000-datasheet-v1.3.pdf In page 9 you can find the DWM1000 pin assigments (the same image I posted) Assuming that you are using an Arduino Pro Mini 3.3 Volts (The DWM1000 works at 3.3V!!!!) // connection pins (arduino code) const uint8_t PIN_RST = 9; // reset pin const uint8_t PIN_IRQ = 2; // irq pin const uint8_t PIN_SS = SS; // spi select pin DW1000.begin(PIN_IRQ, PIN_RST); DW1000.select(PIN_SS);

You should connect: DWM1000 Arduino Pro Mini Pin 24 or Pin 23 or Pin 16 or Pin 8 to Ground Pin 22 IRQ/GPIO8 PIN_IRQ ( pin 2) Pin 20 SPICLK SCK (pin 13) Pin 19 SPIMISO MISO (pin 12) Pin 18 SPIMOSI MOSI (pin 11) Pin 17 SPICSn PIN_SS (pin 13) Pin 6 and/or Pin 7 VDD3V3 Arduino Vcc (3v3)
Pin5 VDDAON Arduino Vcc (3v3)

Please double check with the Decawave document.....

I hope it helps

grex93 commented 7 years ago

ok, so i must connect spiclock to pin 13, but the spicsn i think i must connect it with pin 10 of arduino pro mini . can i connect only one ground ( vss) or i must connect all ground's pin to the ground pin of arduino? the resistor i used for connect the irq, will i need it, is it for another connection, or can i delete it?

thanks a lot!

grex93 commented 7 years ago

Now i have: Device ID: DECA - model: 1, version: 3, revision: 0 Unique ID: FF:FF:FF:FF:00:00:00:00 Network ID & Device Address: PAN: 0A, Short Address: 05 Device mode: Data rate: 6800 kb/s, PRF: 16 MHz, Preamble: 128 symbols (code #4), Channel: #5

i think it's working!!!! thanks a lot...

last question, which I saw in this thread (https://github.com/thotro/arduino-dw1000/issues/58) connecting an Arduino Arduino Nano and 2 (both with 5 volts pin) to the module .. which is the risk? Can I connect the module to a nano / Arduino Uno with some resistance for each pin (i don't know, however, what resistors used)?

hmatulis commented 7 years ago

You also need a pull-up resistor between DWM1000 VSS (Ground) and DWM1000 IRQ (pin 22) - I'm using a 10k resistor

Regarding using 3.3v logic with 5v circuits, it may work , but it will probably fry in the medium/long run. As this is not a cheap module, I'll definitely advise to use some sort of voltage translation. Adafruit has a useful explanation of level shifting - https://learn.sparkfun.com/tutorials/voltage-dividers image using Vin=5 and Vout=3.3
R2 must have twice the resistance of R1

They recommend resistors between 1k and 10k , So R1 = 1k and R2= 2k or R1=3.3k r2=6.6k or R1 = 1.8k R2 = 3.3k Will do the trick

You can also buy or build a level shifter : https://www.sparkfun.com/products/12009

http://www.ebay.ca/itm/8-channel-Bi-Directional-Logic-Level-Shifter-Converter-3-3V-5V-For-Arduino-/391148663709?hash=item5b1246f39d:g:VDoAAOSwBahVWrIB

grex93 commented 7 years ago

thanks a lot! =)

Rotzbua commented 7 years ago

@hmatulis Hi, please can you add your post to the wiki? Thanks! :)

Ruben-26 commented 6 years ago

In my case what fails me is that I do not have the level shifter? dwm1000 problem

Ruben-26 commented 6 years ago

sin titulo

DricSoh commented 6 years ago

Hi, I got similar problems. Device ID: 00 - model: 0, version: 0, revision: 0 Unique ID: 00:00:00:DE:CA:01:30:FF Network ID & Device Address: PAN: CA01, Short Address: 307F Device mode: Data rate: 6800 kb/s, PRF: 16 MHz, Preamble: 128 symbols (code #4), Channel: #5 Please advise me :(

Rotzbua commented 6 years ago

@DricSoh Read the complete thread and some others and write your summary into the wiki. This project is open source and a lot of informaiton is available. Help your self or consult somebody, but then you have to pay...

rvdende commented 5 years ago

Refer to this diagram for pinouts if following the fritzing image: https://github.com/thotro/arduino-dw1000/blob/master/adapterBoard/adapterBoard%20pdf/adapterBoard_etch_copper_top.pdf