Difference between revisions of "dw1000 ranging demo"

From InCircuit
Jump to: navigation, search
(Download)
 
(7 intermediate revisions by one user not shown)
Line 1: Line 1:
 +
[[File:EoL.png|center|200px]]
 +
 +
<center>'''A newer, more accurate DW1000 demo is available: [[dw1000 advanced demo]]'''</center>
 +
 
==Overview==
 
==Overview==
The dw1000 ranging demo is a measurement example for the DW1000 at the radino32 DW1000. The dw1000 ranging demo on radino32 DW1000 modules is optimized for radino spiders with ultra-wideband antenna. The demo is based on the DW1000 library by Thomas Trojer.
+
The dw1000 ranging demo is a measurement example for the DW1000 at the [[radino32 DW1000]]. The dw1000 ranging demo on [[radino32 DW1000]] modules is optimized for radino spiders with ultra-wideband antenna. The demo is based on the DW1000 library by Thomas Trojer. The demo is also tested on [[radinoL4 DW1000]].
 +
 
 +
For communication are one Anchor and at least one Tag required.
  
 
==Configuration==
 
==Configuration==
Line 42: Line 48:
 
  #define MODULE_NEAR_OFF() do{}while(0)
 
  #define MODULE_NEAR_OFF() do{}while(0)
 
  #endif
 
  #endif
 +
 +
 +
==DW1000 USB-Stick Demo==
 +
 +
The [[DW1000 USB-Stick]] use a modified version of the dw1000 ranging demo. At the third mode (WE_ARE_ANCHOR == 2), the [[DW1000 USB-Stick]] always starts as TAG, but the mode can be changed to ANCHOR by serial communication.
 +
 +
Please press enter and follow the instructions of the serial output.
 +
Set mode:
 +
  'a' for ANCHOR
 +
  't' for TAG
  
 
==Download==
 
==Download==
The dw1000 ranging demo can be found at our [http://wiki.in-circuit.de/index.php5?title=radino_Library#Downloads radino library].
+
The dw1000 ranging demo can be found at our [[radino_Library#Downloads|radino library]].
 +
 
 +
 
 +
Demo for DW1000 USB-Stick: [http://library.radino.cc/Library/Demo_DW1000_USB-Stick.zip Demo_DW1000_USB-Stick.zip]<br/>
 +
*Unzip and copy to your Arduino Sketchbook folder.<br/><br/>

Latest revision as of 13:11, 16 October 2017

EoL.png
A newer, more accurate DW1000 demo is available: dw1000 advanced demo

Contents

[edit] Overview

The dw1000 ranging demo is a measurement example for the DW1000 at the radino32 DW1000. The dw1000 ranging demo on radino32 DW1000 modules is optimized for radino spiders with ultra-wideband antenna. The demo is based on the DW1000 library by Thomas Trojer. The demo is also tested on radinoL4 DW1000.

For communication are one Anchor and at least one Tag required.

[edit] Configuration

At the first part of the sketch the hardware has to be configured.

Defines for ANCHOR (WE_ARE_ANCHOR == 1) or TAG (WE_ARE_ANCHOR == 0) mode on DW1000. At the third mode (WE_ARE_ANCHOR == 2), the read input from pin (PIN_READMODE) will set the TAG (internal pull-up) or the ANCHOR (connect to ground) mode. One ANCHOR can handle up to six TAGs.

#define WE_ARE_ANCHOR      0
#define PIN_READMODE      A1

Set an individual short address for every device (for ANCHOR and for TAG)

#define MY_SHORT_ADDRESS   0x1234

Set the TX power in dBm from 0 to 33.5 in steps of 0.5. If the value is too high, the signals may overdrive and the results distort. Activate only, if you known your local wireless regulations.

//#define DW_TX_POWER      33.5

If set to 1, the Anchor regularly prints out a table of known devices. Else it prints every ranging event separately.

#define PRINT_DEVICE_TABLE  1

LED toggles on successful measurement. Set to 0xFF to deactivate functionality. Default on pin 13 for led L on radino spider.

#define PIN_LED 13

Set where to printout information. Serial for serial communication by USB and Serial1 for communication by the UART port.

#define SerialOut if(Serial)Serial
#define SerialOutBegin() Serial.begin()

Here you can set actions to execute when a TAG gets near an ANCHOR. MODULE_NEAR_VALUE in meters and MODULE_NEAR_TIMEOUT in milliseconds.

#define MODULE_NEAR_VALUE    1.0
#define MODULE_NEAR_TIMEOUT  300

Activate (#if 1) or deactivate (#if 0) output signal for a near TAG at ANCHOR

  • MODULE_NEAR_INIT : Executed during setup()
  • MODULE_NEAR_ON : Executed when any tag is nearer than MODULE_NEAR_VALUE for at least MODULE_NEAR_TIMEOUT
  • MODULE_NEAR_OFF : Executed when no tag is nearer than MODULE_NEAR_VALUE
#if 0
#define MODULE_NEAR_INIT() do{ pinMode(22,OUTPUT); }while(0)
#define MODULE_NEAR_ON() do{ digitalWrite(22,HIGH); }while(0)
#define MODULE_NEAR_OFF() do{ digitalWrite(22,LOW); }while(0)
#else
#define MODULE_NEAR_INIT() do{}while(0)
#define MODULE_NEAR_ON() do{}while(0)
#define MODULE_NEAR_OFF() do{}while(0)
#endif


[edit] DW1000 USB-Stick Demo

The DW1000 USB-Stick use a modified version of the dw1000 ranging demo. At the third mode (WE_ARE_ANCHOR == 2), the DW1000 USB-Stick always starts as TAG, but the mode can be changed to ANCHOR by serial communication.

Please press enter and follow the instructions of the serial output.

Set mode:
  'a' for ANCHOR
  't' for TAG

[edit] Download

The dw1000 ranging demo can be found at our radino library.


Demo for DW1000 USB-Stick: Demo_DW1000_USB-Stick.zip

  • Unzip and copy to your Arduino Sketchbook folder.

Personal tools