12/11/2009

Programmable 3D Low Frequency Wakeup Receiver AS3932 APPLICATION NOTE

1 Introduction

The development kit has been thought to speedup the system design phase in finding the best setup of the LF-Wakeup receiver AS3932, without spending time in the hardware design.
The development-kit consists of a AS3932 LF wake-up receiver board, a 3V CR2032 Lithium Battery, a LF transmitter board and a 9V power supply. The power supply cable is not included and has to be chosen according to the specific plug (depending on the country).
The receiver board supports 3-dimensional field detection and can show all functionality and programmability of the AS3932. This kit works on 125 kHz. The receiver board can work completely stand alone; in fact neither power supply nor a PC are needed. It is possible to see all AS3932 functionality and read or write all its registers just operating the switches present on the board. The chip will be programmed using a microcontroller.
The transmitter board generates the field capable to wake the receiver up. Even this board does not need any PC connection but has to be supplied by the included power supply.

2 Overview of the RX board


The receiver board (RX-Board) consist of an AS3932 LF-Wakeup receiver, a microcontroller for programming the device, a set of 3-dimensional coils XYZ, a main switch, 2 pin connectors shorted with a jumper (where to measure the current consumption of the AS3932), a set of 4 pin connectors where to monitor the out coming signals of the AS3932, two banks of 8-dipswitsches for the AS3932 programming, 2 buttons (RST_MCU, SEND), 3 LED arrays (5 LEDs each) showing the RSSI of each channel, 3 LEDs showing the active channels and a holder for a CR2032 Lithium battery.

A top view of the board is shown in the Fig. 1.





 

To power-up the board, the battery has to be set into the battery holder, facing the plus (+) up, the main switches (1+2) have to be switched-on and the microcontroller has to be reset by pushing the button R_MCU (reset microcontroller). The 3-coils make an angle of 90 degrees in order to pick up the field coming from all three directions and each coil is connected to a channel input of the AS3932. Right in the middle there are 4 pin connectors.

A detail is shown in the Figure 2.



The pin connector’s functionality is described below (top to bottom):

1. GND is the ground
2. WAKE is the wakeup signal
3. DAT_CL is the data clock, in case the Manchester decoder is enabled
4. DAT is the data pin (the demodulated data are streamed out).

Just beside these 4 pins there are 2 pins shorted by a jumper. By disconnecting the jumper and connecting in series an amp meter it is possible to measure the current consumption of the AS3932 only.
Once the main switch is switched on it is possible to get the AS3932 working in the default mode (see AS3932 Datasheet). When the chip is set to work in the default mode all registers are set to default value and the main characteristic of the setup are:
 

  • All three channels are working
  • No rotation mode and on/off mode is used
  • No Manchester decoder is active
  • Data correlation is active and based on single pattern detection
  • Real time clock (RTC) based on crystal oscillator
  • No time-off is set
  • Stored pattern is 96 (hex)
  • The bit rate is 2.73 kb/s (NRZ)
  • No artificial wakeup


Under these conditions the LEDs matrix will show a cross till the wakeup pattern is not detected, as shown in the next figure:

 



As soon as the pattern is detected the LEDs matrix will show a rhomb, as shown in the next figure.

 



2.1 How to program the AS3932 on the Development RX Board.

On this board it is possible to explore all features of the AS3932 just using the two banks of dipswitches, shown in the next figure, and the SEND button.



To make things easy the two banks of dipswitches represent the Serial Digital Interface (SDI) command needed to control the AS3932 the structure of the SDI command is shown here:



The switches 1 and 2 of the left bank are the MODE (corresponding to the bits B15 and B14 of the SDI command) and define whether a register has to be written, read or if a direct command has to be sent, as shown in the next table:


table 2.1-1: Mode switches


Where LOW means that the switch is on the off position, while high means on.
WRITE mode means that a whole register of AS3932 will be overwritten, READ mode means that the selected register will be read and its content will be displayed on the LED row shown in the Figure 1 as “Register Content”,
while direct command means that a direct command will be send.
The following switches of the left bank (from SW3 to SW8) define either the address of the register that will be operated in case WRITE or READ mode is chosen or the DIRECT COMMAND that will be sent. The following table shows the correspondence between the switch combination and the address:

The next table shows the switches combinations and the corresponding DIRECT COMMANDS


The next table shows the switches combinations and the corresponding DIRECT COMMANDS



Here follows an explanation of all direct commands:
 

  • Clear_wake: clears the wake state of the chip. In case the chip has woken up (WAKE pin is high) the chip is set back to listening mode
  • Reset_RSSI: reset the RSSI measurement.
  • Trim_osc: get started the trimming procedure of the internal RC oscillator.
  • Clear_false: reset the false wakeup register (R13=00)
  • Preset_default: sets all register in the default mode, as shown in the.
  • Center_osc: sets the RC-oscillator to the middle frequency (in case no calibration will be performed).


The bank of switches on the right needs to be set to only in case of WRITE MODE and represent what to write in the chosen register. After setting properly the switches the SEND button needs to be pressed.

2.1.1 Example: how to write a register in the AS3932.

For example assuming that in the register R4 has to be written the following setup: “01011010”. After checking that the battery has been inserted, that the main switch has been turned on and that the RST_MCU has been pushed, the following steps have to be followed:

 

  • The SDI has to be set in WRITE mode: the switches 1 and 2 of the left bank have to be set both to LOW (see tab 2.1-1)
  • The remaining switches on the left bank (from switch 3 to switch 8) have to select the register R4 (see tab 2.1-2); LOW LOW LOW HIGH LOW LOW.
  • The right bank has to contain the wanted sequence, “01011010” that corresponds to: LOW HIGH LOW HIGH HIGH LOW HIGH LOW.
  • The SEND button has to be pressed 

 

Here there is an overview of the complete setup of the two banks of dip switches:

 



 

2.1.2 Example: how to read a register in the AS3932.

As an example it will be shown how to read the register R5. After checking that the battery has been inserted, that the main switch has been turned on and that the RST_MCU has been pushed, the following steps have to be followed:

 

  • The SDI has to be set in READ mode: the switch 1 and 2 of the left bank have to be set to LOW HIGH respectively.
  • The remaining switches on the left bank (from switch 3 to switch 8) have to select the register R5 (see tab 2.1-2); LOW LOW LOW HIGH LOW HIGH.
  • The second bank doesn’t have to be set (the switches can be casually set high or low)
  • The SEND button has to be pressed. The read sequence will be displayed for a few seconds on the LED row set above the banks of switches.

 

Here there is an overview of the left bank of dip switches:

 

 


2.1.3 Example: how to send a DIRECT COMMAND

This paragraph shows, as example, how to send the preset_default DIRECT COMMAND. After checking that the battery has been inserted, that the main switch has been turned on and that the RST_MCU has been pushed, the following steps have to be followed:

 

  • The SDI has to be set in DIRECT COMMAND mode: both switches have to be set to high (see tab2.1-1).
  • The remaining switches on the left bank (from switch 3 to switch 8) have to select the DIRECT COMMAND preset_default (see tab 2.1-2); LOW LOW LOW HIGH LOW LOW.
  • The second bank doesn’t have to be set (the switches can be casually set high or low)
  • The SEND button has to be pressed.

 

Here there is an overview of the left bank of dip switches:

 


2.2 RSSI Measurements.


To perform 3-dimensional RSSI measurements switches 1 and 2 of the left bank have to be switched as following:

 

  • SW1= HIGH
  • SW2= LOW


The remaining switches of the left and right banks can stay high or low (don’t influence the set-up). Once the switches are set as described the “SEND” button needs to be pressed and the RSSI LEDs matrix will show the actual RSSI of the channel which receives the strongest signal.

3 Overview of the TX board

The LF Transmitter Board (TX-board) consist of a 9-12V DC plug, a microcontroller, an antenna, 2 buttons.(SEND and RST_MCU), a small bank of 2 switches, and three banks of 8 switches each. The TX-board needs to be connected to the power supply provided in the kit. The power supply has to be connected to the power line with an appropriated cable (not included).
 


The carrier frequency of the TX-board is 125 kHz.

With this board the used has the possibility to define what the transmitter has to send. In general there are a
few options available, like:

 

  • Transmission of only preamble: the transmitter will send only an OOK modulated carrier with 50% duty cycle (no pattern)
  • Transmission of preamble followed by pattern on demand: every time that the SEND button is pressed the transmitter sends a few bits preamble (OOK modulated carrier with 50% duty cycle) and a pattern. Under this condition it is even possible to repeat the pattern 2 times.
  • Continuous transmission of preamble followed by pattern: the transmission of preamble followed ba
  • the pattern happens automatically every second, circa.


Next to the SEND button there are 2 switches; with these switches it is possible to define the length of the preamble that the transmitter has to send before the pattern, as shown in the next table:
 



 

From the Figure 1 it is possible to indentify that there are 3 big dip switches (8 switches each) on the right side. As shown in the figure 1, two of them define the Manchester encoded pattern that the transmitter has to send. The transmitter will send first the sequence set in the PATT 1 BYTE and than the one in PATT. 2BYTE without any breaks in between. The switch number 8 of the bank PATT 1 BYTE represent the first bit of the whole sequence, as well as the switch number 1 of the bank PATT 2 BYTE represent the last bit that the transmitter sends. Once the sequence is defined, the transmitter will perform AM modulation of the 125 kHz carrier with a modulation index
of 100% (OOK modulation). Here there is the needed setup if, for example, the chosen pattern is 96 (HEX):

 

The third bank (upper one) is split in 2 sections:

  • BIT RATE: switches from 8 to 4
  • MODE: switches from 3 to 1


With the bit rate section it is possible to define different data rate, as shown in the next table:
 


The MODE switches define the transmission mode as following Table



On the board 2 buttons are present:

  • RST_MCU: this button resets the system and sets the board in a standby mode.
  • SEND: pressing this button the chosen setup will be active.


3.1.1 Example: Wakeup based on pattern detection (Manchester decoder off)

Assuming that the transmitter is supposed to send a signal with the following characteristics:

  • The carrier burst has to be followed by 8 bits preamble
  • The chosen pattern is 96 (HEX) –Manchester-
  • The transmission has to happen automatically (every second) without any button pressing.
  • Single pattern will be sent
  • The Bit rate is 2.730 kbit/s (NRZ)

 

What described above is represented in the next picture.

 


Preamble switches (bank of 2):

  • SW1 to HIGH
  • SW2 to LOW

Pattern switches (PATT 1 BYTE and PATT 2 BYTE)

 

Bit rate switches (switches from 8 to 4)

 

  • SW1 to LOW
  • SW2 to HIGH
  • SW3 to LOW
  • SW4 to HIGH
  • SW5 to HIGH


Mode switches:

 

  • SW6 to HIGH
  • SW7 to LOW
  • SW8 to HIGH


After switching on the receiver board the RST button has to be pressed. For this kind of measurement it is more comfortable to set up the automatic timeout; in this way the wake state does not have to be cleared manually every time. To set, for example, a time out of 350ms the following bits have to be set as following: R7<7:5>=111 (bin). Below it is shown how to execute this operation.



 

3.1.2 Example: Manchester decoder

The transmitter is supposed to send the standard single pattern followed by an infinite sequence of 0 and 1 Manchester encoded. The data-rate is the default one (1365 baud/s Manchester). A number of 8 bits preamble will be sent. The sequence is shown in the next figure.

 

Preamble switches (bank of 2):

 

  • SW1 to HIGH
  • SW2 to LOW


Pattern switches (PATT 1 BYTE and PATT 2 BYTE)



Bit rate switches (switches from 8 to 4)

 

  • SW1 to LOW
  • SW2 to HIGH
  • SW3 to LOW
  • SW4 to HIGH
  • SW5 to HIGH


Mode switches:

 

  • SW6 to LOW
  • SW7 to LOW
  • SW8 to LOW


After switching on the receiver board the RST button has to be pressed. For this kind of measurement it is more comfortable to set up the automatic timeout; in this way the wake state does not have to be cleared manually every time. To set, for example, a time out of 350ms the following bits have to be set as following: R7<7:5>=111 (see appendix A). Below it is shown the dip switches setup.


To execute the operation the button SEND has to be shortly pressed.
In addition the Manchester decoder has to be activated. To accomplish that the bit R1<3> has to be set to 1 (see appendix A). the dip switches programming is shown below.



To execute the operation the button SEND has to be shortly pressed.