Wireless Sensing Triple Axis Reference design (ZSTAR) Designer Reference Manual ZSTARRM Rev. 0.9 8/2006 freescale.
Warnings Safety of Radio Frequency Energy The manufacturer has evaluated the transmitter for safe operation for uncontrolled use in the general population. The measured power density at 1 cm is under the threshold established by the FCC and is not required to be tested for specific absorption rate. The manufacturer instructs the user that the transmitter should not be handled or placed near the body continuously for more than 30 minutes while operating.
Wireless Sensing Triple Axis Reference design Designer Reference Manual by: Pavel Lajšner and Radomír Kozub Freescale Czech Systems Laboratories Rožnov pod RadhoštČm, Czech Republic To provide the most up-to-date information, the revision of our documents on the World Wide Web will be the most current. Your printed copy may be an earlier revision. To verify you have the latest information available, refer to: http://www.freescale.
Revision History Wireless Sensing Triple Axis Reference design, Rev. 0.
Table of Contents Chapter 1 Introduction 1.1 1.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 MMA7260Q 3-axis Accelerometer Sensor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Chapter 2 Wireless Sensing Triple Axis Reference design introduction 2.1 2.2 2.2.1 2.2.2 2.2.3 2.2.4 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Table of Contents 4.2.3 4.2.4 4.2.5 4.2.6 4.2.7 4.2.8 4.2.9 4.3 MC13191 to MCHC908JW32 microcontroller interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . Oscillator and clocking options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . LED indicators connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Button connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.5.1 5.5.2 5.5.2.1 Bootloading procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 Dualboot guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Dualboot applications switching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 Chapter 6 Application Setup 6.1 6.1.1 6.1.2 ZSTAR Installation Procedure . . . . . . . . . . . . . . .
Table of Contents Wireless Sensing Triple Axis Reference design, Rev. 0.
Chapter 1 Introduction 1.1 Introduction This paper describes the design of a Wireless Sensing Triple Axis Reference design (ZSTAR), a demo for wireless demonstration of the 3-axis accelerometer MMA7260Q sensors from Freescale. The reference design will enable you to see how Freescale's accelerometers can add additional functionality to applications in various industries.
Introduction Wireless Sensing Triple Axis Reference design, Rev. 0.
Chapter 2 Wireless Sensing Triple Axis Reference design introduction 2.1 Introduction The Wireless Sensing Triple Axis Reference design (ZSTAR) has been designed as a wireless complement to the previous STAR (Sensing Triple Axis Reference design) RD3112MMA7260Q demo. A 2.4GHz radio-frequency (RF) link based on the low-cost MC13191 family is used for connection from the sensor to PC, allowing the visualization of key accelerometer applications.
Wireless Sensing Triple Axis Reference design introduction MC 3 9 MC 3 9 S08QG8 HC908JW32 MMA7260Q Figure 2-2ZSTAR Block diagram 2.2 Featured products This demo consist of several Freescale products whose main features are listed below. 2.2.1 Triple Axis Accelerometer MMA7260Q The ZSTAR board is a demonstration tool for the MMA7260Q, a 3-Axis Low-g accelerometer.
Featured products emulation interface. It also features a programmable 16-bit timer/pulse-width modulation (PWM) module (TPM), that is one of the most flexible and cost-effective of its kind. The compact, tightly integrated MC9S08QG8 delivers a versatile combination, from wealth of Freescale peripherals and the advanced features of the HCS08 core, including extended battery life with a maximum performance down to 1.8V, industry-leading Flash and innovative development support.
Wireless Sensing Triple Axis Reference design introduction – – – – – 16-bit, 2-channel timer interface module (TIM) with selectable input capture, output compare, PWM capability on each channel, and external clock input option Timebase module PS/2 clock generator module Serial Peripheral Interface Module (SPI) Universal Serial Bus (USB) 2.
Chapter 3 Sensor Board description 3.1 Board overview The Sensor Board utilizes a small footprint size dual-layer printed circuit board (PCB) containing all the necessary circuitry for MMA7260Q accelerometer sensing and transferring data over a radio frequency (RF).
Sensor Board description SPI receive antenna CR2032 or CR2477 Lithium battery MC9S08QG8 MCU IRQ MC13191 2.4GHz RF transmit antenna XYZ sleep g-select MMA7260Q accelerometer Figure 3-2Sensor board block diagram Figure 3-3 shows in more detail, how different software and hardware modules co-operate with each other.
A/D conversion of XYZ levels MC9S08QG8 software calibration data ZSTAR RF protocol handler Sensor data SMAC Analog-to-Digital converter (ADC) module GPIO IRQ Serial Peripheral Interface (SPI) module sleep MMA7260Q g-select MC 3 9 Figure 3-3ZSTAR Sensor board software overview For the Sensor board operation, several of the MC9S08QG8’s hardware modules are used: Analog to Digital Converter (ADC), Synchronous Peripheral Interface (SPI), External Interrupt Request module (IRQ) and General Purpose Inp
Sensor Board description is measured 128 times. By default, POWSUM is 0, for 1 measurement of each channel. Before result values are provided, the accumulated values are scaled back to the 8-bit range and inverted where necessary (may be required depending on the physical MMA7260Q device orientation relative to the Earth gravity). Raw (i.e. not calibrated) values are actually sent, the calibration and calculation of an exact g value is done internally in the PC software. 3.2.
Power management • 8-bit microcontroller MC9S08QG8 – in Stop mode, 750nA – in Wait mode, 1mA – in Run mode, 3.5mA • low-g triaxial sensor MMA7260Q – in Sleep mode, 3µA – in Normal mode, 500µA It is obvious that in a battery operated application care must be taken to ensure the lowest possible current consumption, especially when the maximum current (provided by the battery) is somehow limited. A CR2032 Lithium battery cannot provide current in the range of 40mA for long periods of time.
Sensor Board description The reception window is larger to fit any incoming receive data and the current consumption is also higher during reception, so this portion of current consumption would be one of the largest if the acknowledgment was received in every loop cycle. The “optional receive” feature allows huge power savings, still keeping the reception of acknowledgment data from the data-receiving side.
ZSTAR Sensor Board hardware overview 3.4 ZSTAR Sensor Board hardware overview This section describes the Sensor board in terms of the hardware design. The MC9S08QG8 microcontroller drives both the MMA7260Q sensor and the MC13191 RF transceiver. 3.4.1 Analog connections The MMA7260Q sensor is connected to AD0, AD1, and AD2 inputs to analog-to-digital converter via RC filters formed by R3, C3, R4, C2, R5, C1.
VDD GND Alps SKRP MMA7260Q g-Sel1 X 15 R3 10k 2 g-Sel2 Y 14 R4 10k Z 13 R5 10k 3 4 C5 10nF GND G_SEL2/TxD G_SEL1/RxD G_SEL1/RxD G_SEL2/TxD SPICLK MOSI 1 U2 PTA0/KBI0/AD0/TPM1CH0/ACMP1+PTA5/RESET/IRQ/TCLK PTA1/KBI1/AD1/ACMP1PTA4/BKGD/MS/ACMP1O PTA2/KBI2/AD2/SDA1 Vdd PTA3/KBI3/AD3/SCL1 Vss PTB0/KBI4/AD4/RxD1 PTB7/SCL1/EXTAL PTB1/KBI5/AD5/TxD1 PTB6/SDA1/XTAL PTB2/KBI6/AD6/SPSCK1 PTB5/TPM1CH1/SS1 PTB3/KBI7/AD7/MOSI1 PTB4/MISO1 1 2 3 4 5 6 7 8 MOSI MOSI LED1 LED2 MC9S08QG8CDTE 1 1
ZSTAR Sensor Board hardware overview 3.4.5 Button connections Two buttons (S1 and S2) are connected directly to pins PTB6 and PTB7. Both have internal pull-up resistors, but are not part of the Keyboard interrupt module, therefore don’t allow a direct microcontroller wake-up from the Stop modes. 3.4.6 MC13191 to MC9S08QG8 microcontroller interface In order to fit all the necessary circuitry onto a 16-pin microcontroller, the full recommended MC13191 interface has had to be reduced.
Sensor Board description Figure 3-7ZSTAR antenna layout The matching is provided by L3 (transmit antenna) and L4 (receive antenna) coils. L1 and L2 coils bias the transmitter output transistors to the VDDA level. The inductors used in this design are from TDK: L3 (5.6nH) MLG1608B5N6DT L4 (4.7nH) MLG1608B4N7ST and L1, L2 (22nH) MLG1608B22NJT. 3.4.
ZSTAR Sensor Board hardware overview 3.4.10 Power supply The Sensor board is powered by a Lithium coin-sized battery. The primary choice was the popular CR2032, with a PCB layout provision made for the CR2477 size. This bigger battery holds roughly 4 times more charge (~1000mAh), but it is not as popular as CR2032 size. A surface mounted SMTU series battery holder from RenataTM is placed on the underside of the PCB.
Sensor Board description 3.5 Bill of Materials Table 3-1. Sensor board bill of materials Item Quantity Reference Part Manufacturer Manufacturer order code 1 1 BATT1 battery holder CR2032 Renata SMTU 2032-1 2 3 C1,C2,C3 100nF TDK C1608JB1H104K 3 1 C4 100pF TDK C1608CH1H101J 4 7 C5,C6,C7,C10, C11,C12,C13 10nF TDK C1608CH1E103J 5 2 C8,C9 6.8pF TDK C1608CH1H070D 6 1 L3 5.6nH TDK MLG1608B5N6DT 7 1 L4 4.
Chapter 4 USB stick board description 4.1 Board overview The USB stick board utilizes the same small footprint as Sensor Board is also a dual-layer printed circuit board (PCB). It contains the minimalistic design of the MC13191 RF transceiver connected through an 8-bit MCHC908JW32 microcontroller to the USB. It’s main task is to receive data from the Sensor Board and transfer it to the PC over the USB link.
USB stick board description +5V USB voltage regulators USB SPI receive antenna MCHC908JW32 MCU IRQ ATTN RST RXTXEN MC13191 2.4GHz RF transmit antenna +5V USB Figure 4-2USB stick board block diagram Figure 4-3 shows, in more detail, how different software and hardware modules co-operate with each other.
Board overview MCHC908JW32 software Sensor & Button data simple STAR protocol handler ZSTAR RF protocol handler “virtual serial port” or mouse USB protocol handler SMAC low-level USB protocol driver Serial Peripheral Interface (SPI) module KBI GPIO USB 2.0 Full Speed module MC 3 9 USB connection to PC Figure 4-3ZSTAR USB stick board software overview For the USB stick board operation, several MCHC908JW32 hardware modules are used: USB 2.
USB stick board description 4.2 ZSTAR USB stick Board hardware overview This section describes the USB stick board in terms of the hardware design. The MCHC908JW32 microcontroller drives the MC13191 RF transceiver and communicates over USB with PC. 4.2.1 USB connections Two USB communication lines are connected directly via R1 to PTE2/D+ and R2 to PTE3/Dmicrocontroller pins. There, the R1 and R2 resistors define the output impedance of both drivers (ZDRV as per chapter 7 of the USB 2.0 specifications).
ZSTAR USB stick Board hardware overview Enable Operation - Enable pin of 3.3V regulator (for MC13191) is connected to PTC3 pin of the microcontroller. This way, the microcontroller may completely turn off the RF part of the application to minimize power consumption in USB suspend modes. Alternatively, power down of the MC13191 RF transceiver may be done by forcing it into Off mode by pulling the RST pin low. 4.2.
USB stick board description 4.2.6 Button connection One button is implemented on the USB stick board. It is connected to the IRQ microcontroller pin that has internal pull-up and allows an easy software interrupt. 4.2.7 MON08 interface For MCHC908JW32 in-circuit programming, a MON08 interface is required. Several pins must be connected to specific voltage levels in order for the MCHC908JW32 to enter the Monitor mode. The details are described in the MCHC908JW32 datasheet, Chapter 7 Monitor ROM (MON).