AVAGO ADNS-3530

ADNK-3533-TN24
Optical Mouse Designer’s Kit
Design Guide
Introduction
This design guide describes the design of a low power
consumption optical mouse using the new Avago Technologies ADNB-3532 low power small form factor optical
mouse sensor, Texas Instruments MSP430F1222 microcontroller and Nordic Semiconductor nRF2402 2.4GHz
RF transmitter. The receiver dongle is implemented with
a Nordic Semiconductor nRF2401A 2.4GHz RF transceiver in conjunction with a Cypress CY7C63231A enCoRe™
USB controller. This reference design kit provides a power
efficient and feature-rich solution in one small and slim
package.
The design guide discusses the reference design
hardware and firmware implementation. The document
starts with the basic operations of a computer mouse
peripheral followed by an introduction to the Avago
ADNS-3530 low power optical mouse sensor, the Nordic
Semiconductor nRF2402 transmitter and nRF2401A
transceiver, Texas Instruments MSP430F1222 microcontroller. The software section of this application note
describes the architecture of the firmware required to
implement the mouse and the USB dongle functions.
Included in Appendix A is the schematic for this reference
design mouse and USB dongle.
The ADNK-3533-TN24 low power slim optical mouse
utilizes the ADNB-3532 low power Light Emmiting Diode
(LED) slim mouse sensor bundle. The LED mouse bundle
is a small form factor (SFF) LED illuminated navigation
system. The bundle consists of an integrated chip-onboard (COB) LED mouse sensor ADNS-3530 and a SFF
lens ADNS-3150-001.
The ADNS-3530 is a low- power optical navigation sensor.
It has a new, low-power architecture and automatic
power management modes, making it ideal for batteryand power-sensitive applications such as cordless input
devices.
The ADNS-3530 is capable of high-speed motion
detection – up to 20ips and 8G. In addition, it has an onchip oscillator and integrated LED to minimize external
components.
The ADNS-3530 along with the ADNS-3150-001 lens form
a complete and compact mouse tracking system. There
are no moving parts which means high reliability and
less maintenance for the end user. In addition, precision
optical alignment is not required, facilitating high volume
assembly.
The bundle sensor is programmed via registers through
a four-wire serial port. It is packaged in a 16 I/O surface
mountable package.
Introduction to ADNS-3530 Optical Mouse Sensor
The ADNS-3530 is based on Optical Navigation Technology, which measures changes in position by optically
acquiring sequential surface images (frames) and mathematically determining the direction and magnitude of
movement.
The ADNS-3530 contains an Image Acquisition System
(IAS), a Digital Signal Processor (DSP), and a four wire
serial port.
The IAS acquires microscopic surface images via the lens
and illumination system. These images are processed
by the DSP to determine the direction and distance of
motion. The DSP calculates the Δx and Δy relative displacement values.
An external microcontroller reads the Δx and Δy information from the sensor serial port. The microcontroller then
translates the data into PS2, USB, or RF signals before
sending them to the host PC or game console.
To learn more about sensor’s technical information, please visit the Avago web site at http://www.
avagotech.com/
Texas Instrument MSP430F1222 Microcontroller
Features
The Texas Instruments MSP430 family of ultra-low power
microcontrollers consists of several devices featuring
different sets of peripherals targeted for various applications. The architecture, combined with five low-power
modes, is optimized to achieve extended battery life in
portable measurement applications. The device features
a powerful 16-bit RISC CPU, 16-bit registers, and constant
generators that attribute to maximum code efficiency.
The Digitally Controlled Oscillator (DCO) allows wakeup from low-power modes to active mode in less than 6
µsec.
• Low Supply Voltage Range 1.8 V to 3.6 V
• Ultra Low-Power Consumption:
− Active Mode: 200 µA at 1 MHz, 2.2 V
− Standby Mode: 0.7 µA
− Off Mode (RAM Retention): 0.1 µA
• Five Power Saving Modes
• Wake-Up From Standby Mode in less than 6 µs
• 16-Bit RISC Architecture, 125 ns Instruction Cycle Time
• Basic Clock Module Configurations:
− Various Internal Resistors
− Single External Resistor
− 32-kHz Crystal
− High Frequency Crystal
− Resonator
− External Clock Source
• 16-Bit Timer_A With Three Capture/Compare Registers
• 10-Bit, 200-ksps A/D Converter With Internal
Reference, Sample-and-Hold, Autoscan, and Data
Transfer Controller
• Serial Communication Interface (USART0) With
Software-Selectable
Asynchronous
UART
or
Synchronous SPI
• Serial
Onboard
Programming,
No
External
Programming Voltage Needed Programmable Code
Protection by Security Fuse
• Supply Voltage Brownout Protection
• 4KB + 256B Flash Memory 256B RAM
• Available in 28-Pin Plastic SOWB, 28-Pin Plastic TSSOP,
and 32-Pin QFN Packages
For Complete Module Descriptions, See the TI
MSP430x1xx Family User’s Guide, Literature Number
SLAU049
The specific device used in this reference design is the
MSP430F1222 with 28 pin to accommodate ample
amount of I/O. It is an ultra-low power mixed-signal microcontrollers with a built-in 16-bit timer, 10-bit A/D
converter with integrated reference and Data Transfer
Controller (DTC), and 14 (20 pin package) or 22 (28 pin
package) general purpose I/O pins. The MSP430x12x2
series microcontrollers have built-in communication capability using asynchronous (UART) and synchronous
(SPI) protocols. The architecture, combined with five low
power modes is optimized to achieve extended battery
life on wireless application.
Nordic Semiconductor nRF2402 2.4GHz Transmitter and
nRF2401A 2.4GHz Transceiver
The Nordic nRF2402 and nRF2401A are the low-power,
single-chip radio transmitter and transceiver for the
world wide 2.4 - 2.5 GHz ISM band. The entire transmitter
and transceiver including all inductors and filters are integrated in each single chip respectively which gives the
lowest cost solution to the end user. All configurations
of the nRF2402 transmitter and nRF2401A transceiver
are done via a standard serial interface. The nRF devices
include the ShockBurst engine which allow for high data
rates on air using low data rates between the microcontroller and the nRF device, it will also automatically
validate the packets address and CRC, further reducing
the microcontrollers processing tasks.
Features for nRF2402 2.4GHz Transmitter
•
•
•
•
•
•
•
•
•
•
•
•
•
True single chip GFSK transmitter in a
small 16-pin package (QFN16 4x4)
Adjustable output power up to 0dBm
Data rate 0 to 1Mbps
Low Bill of Material
Multi Channel operation
128 channels
Support frequency hopping
Channel switching time <200ms.
Power supply range: 1.9 to 3.6 V
CRC computation
ShockBurst™ mode for ultra-low power operation
Low supply current, typical 10mA peak @ -5dBm
output power
• 100% RF tested
MISO
Avago Tech
ADNS-3532
Optical
Mouse
Sensor
Z-wheel
buttons
Features for nRF2401A 2.4GHz Transceiver
• True single chip GFSK transceiver in a small 24-pin
package (QFN24 5x5mm)
• Data rate 0 to 1Mbps
• Only 2 external components
• Multi channel operation
• 125 channels
• Channel switching time <200ms.
• Support frequency hopping
• Data slicer / clock recovery of data
• Address and CRC computation
• DuoCeiver™ for simultaneous dual receiver topology
• ShockBurst™ mode for ultra-low power operation and
relaxed MCU performance
• Power supply range: 1.9 to 3.6 V
• Low supply current (TX), typical 10.5mA peak @ -5dBm
output power
• Low supply current (RX), typical 18mA peak in receive
mode
• 100 % RF tested
• No need for external SAW filter
Voltage
regulator
LP2980AIM5
-3.3
MOSI
SCLK
NCS
MOTION
Button signals
Texas Instrument
MSP430F1222
Microcontroller
Left Button
Control and Data
Nordic
nRF2402
Transmitter
Nordic
nRF2401A
Transceiver
Control and Data
Wheel
Button
Right Button
Mouse
Figure 1. ADNK-3533-TN24 Reference Design Mouse Functional Block Diagram
Dongle
Cypress
CY7C63231A
USB
Microcontroller
Mouse Z-wheel and Buttons
Mouse Z-wheel functions are achieved through the use
of buttons. This enables the optical mouse to have small
and slim form, fit and function.
Mouse buttons are connected as standard switches.
These switches are pulled up by the pull up resistors
inside the microcontroller. When the user presses a
button, the switch will be closed and the pin will be
pulled LOW to GND. A LOW state at the pin is interpreted
as the button being pressed. A HIGH state is interpreted
as the button has been released or the button is not
being pressed. Normally the switches are debounced in
firmware for 15-20ms. In this reference design there are
three switches: left, Z-wheel, and right.
ADNS-3530
ADNS-3150-001
Customer
Supplied
Base Plate
Figure 2. Exploded view drawing of optical tracking engine with ADNB-3532 optical mouse sensor.
While reassembling the components, please make sure
that the Z height (Distance from lens reference plane to
surface) is valid. Refer to Figure 3.
Customers PCB
0.97
0.04
Lens
Figure 3. Distance from lens reference plane to surface
Sensor
Navigation surface
Firmware functions
Below is a description of the various firmware subroutines.
WM430_System.c – mouse main program featuring
nRF2402 transmitter (wm430_transmitter.c), ADNS3530 sensor (MSP430_AVAGO_ADNS-3530.c), buttons
(wm430_button.c) and battery indicator (MSP430_
battery_indicator.c) programs.
wm430_transmitter.c – this program features RF protocol
implementation.
MSP430_AVAGO_ADNS-3530.c – this program is for
MSP430 device driver functions to communicate with
Avago ADNS-3530 optical sensor.
wm430_button.c – this program is for button related
functions
MSP430_battery_indicator.c – this program is for battery
indicator functions
wm430_wheel.c – this program features the logic implementation for button (ZA & ZB) scrolling movements.
WM430_sys_intiInternal ( ) – this function is for internal
system initialization. It involves GPIO functions, timer
A operations and DCO calibration initializations. For
hardware SPI pins configuration, MOSI is connected to
P3.1, MISO is connected to P3.2, SCL is connected to
P3.3, NCS is connected to P1.3, MOTION is connect to
P2.2 and SHTDWN is connected to P2.3. Whereas for the
NORDIC nRF2402 transmitter, CONTROL 1 is connected
to CE, CONTROL 2 is connected to PWR_UP, CONTROL 3
is connected to CS, SCL is connected to CLK and MOSI is
connected to DIN.
WM430_BATTERY_init ( ) – this function is for battery
indicator initialization whereby a sample is taken from
P2.0 of MSP430F1222 with reference to 2.5V. The ADC10
internal oscillator times sample selected is 16.
WM430_BUTONS_int ( ) – this function is used to initialize the button module and GPIO functions configurations. The left, right, scroll ZA and scroll ZB buttons are
connected to P1.0, P1.2, P2.5 and P2.1 of MPS430F1222
respectively.
WM430_TX_int ( ) – this function initializes the transmitter software module.
WM430_SYS_initDevices ( ) – it is used to initialize external devices such as ADNS-3530 and NORDIC
nRF2402 transmitter. The product and inverse product IDs
of the optical sensor are checked in this function.
WM430_SYS_generateNewID ( ) – this function is responsible for new ID generation.
_EINT ( ) – it enables global interrupts
WM430_SYS_battery_sequence ( ) – this function
defines the battery indicator sequence. The led will blink
when the battery level is low or medium level and it will
not blink when the battery level is full.
WM430_BUTTONS_processLeft ( ) – it is used to process
left button when it is pressed
WM430_BUTTONS_processRight ( ) – this function is to
process the right button when it is pressed.
WM430_BUTTONS_processZAZBPressed ( ) – it
processes the scrolling button(s) when it is pressed continuously.
WM430_WHEEL_resetActiveTimeout ( ) – this function
is for resetting the time out counter to keep scroll
button detection enabled. It will extend ACTIVE mode to
maximum time if the MCU is already awake.
WM430_BUTTONS_processZA ( ) – it is used to process
scrolling button ZA when it is pressed.
WM430_BUTTONS_processZB ( ) – it processes scrolling
button ZA when it is pressed.
WM430_WHEEL_decodeZState ( ) – this function is
responsible for updating the scrolling button ZA and
button ZB directions.
WM430_TX_sendDataPacket ( ) – this function receives
four parameters namely button, X displacement, Y displacement and Z displacement data. Then they are transmitted to the NORDIC nRF2401AG receiver.
WM430_SYS_clearWatchDog ( ) – this function is used to
reset the watch dog timer to prevent the hardware reset.
WM430_BUTTONS_configureInterrupts ( ) – it determines the state of the buttons and configures each
button interrupt for rising or falling edge detection.
WM430_BUTTONS_checkRelease ( ) – this function
is used to check whether any of the buttons have been
released.
WM430_SYS_enableSensorINT ( ) – this function is used
for enabling the sensor motion interrupt.
WM430_SYS_disableSensorInt ( ) – it is used to disable
the sensor motion interrupt.
MSP430_NORDIC_nRF2402_powerDown ( ) – this
function is called to power down the NORDIC nRF2402
device.
MSP430_NORDIC_nRF2402_powerUp ( ) – it is called to
power up the NORDIC nRF2402 device.
The firmware block diagram is shown in Figure 4.
Start
Initialize the
internal system
Battery indicator
initialization
Initialize buttons
software module
Initialize the transmitter
software module
Initialize external
devices
Generate new ID
Enable global
interrupts
No
Any
message to
send?
Active
mode?
yes
Battery indicator
No
Prepare for deep
sleep mode
Process left, right &
scrolling buttons
Figure 4. Firmware Block Diagram (Part 1)
Enter deep sleep
mode
yes
Continue to
send
messages
Have button
data to
transmit?
yes
no
Transmit buttons
data
Clear watchdog
Reconfigure
button interrupts
Check button
release
Enable sensor
RF transmission
completed?
no
Wait until RF
transmission complete
yes
Enable motion
interrupts
Read motion
burst
Any motion or
button interrupts?
no
Disable motion
interrupt
Transmit motion
& button data
Figure 4. Firmware Block Diagram (Part 2)
yes
Process
interrupts
Base Plate Feature – IGES File
The IGES file on the CD-ROM provides recommended
base plate molding features to ensure optical alignment
Reference Design Documentation – Gerber File
The Gerber File presents detailed schematics used in
ADNK-3533-TN24 in PCB layout form. See Appendix C for
more details.
Overall circuit
A schematic of the overall circuit is shown in Appendix A
of this document. Appendix B lists the bill of materials.













Figure A1. Circuit-level for MSP430F.











































































 




Appendix A: Schematic Diagram of the Overall Circuit








 



























       
 
 
















































































Figure A2. Circuit-level for ADNS-3530.
 
 
  

10




















11
Figure A3. Circuit-level for voltage regulator and battery management.

































































 













12
Figure A4. Circuit-level for transmitter nRF2402.










































































13
Figure A5. Circuit diagram of CY7C63231A enCoRe USB microcontroller and nRF2401A transceiver Dongle
Appendix B: Bill of Materials for Components Shown on schematic
No
Comment
Quantity
Designators
1
Female mini USB connector
1
CN1
2
Slide switch,2.54mm pitch
1
SW6
3
Pads for battery
11
J5
4
Red smd LED,0805
1
D2
5
Pad
3
J1,J2,J3
6
Smd Socket,10- way
1
J4
7
Smd button
4
SW2,SW3,SW4,SW5
8
Cap 1.5pF/50V,0603
1
C15
9
Res 100k,1%,0603
5
R1,R2,R3,R4,R5
10
Cap 100nF/16V,0603
3
C21,C23,C3
11
Cap 10nF/25,0603
5
C1,C24,C5,C6,C9
12
Tantalum cap 10uF/10V, case A
1
C12
13
Smd crystal 16MHz
1
X1
14
Res 1k,5%,0603
1
R9
15
Res 1M,1%,0603
2
R8,R17
16
Cap 1nF/50V,0603
2
C13,C25
17
Cap 1pF/50V,0603
2
C14,C16
18
Res 1R(optional),1%,0603
3
R12,R13,R15
19
Cap 1uF/16V,0805
6
C19,C2,C20,C4,C7,C8
20
Cap 2.2nF,0603
1
C17
21
Res 220R,5%,0603
1
R10
22
Res 22k,5%,0603
1
R18
23
Inductor 22nH,0603
1
L2
24
Cap 22pF/50V,0603
2
C10,C11
25
Inductor 3.6nH,0603
1
L1
26
Crystal 32.768KHz
1
X2
27
Cap 4.7pF/50V,0603
2
C18,C22
28
Res 5.6R,5%,0603
3
R11,R14,R7
29
Res 51k,1%,0603
2
R19,R20
30
Res 5R,5%,0603
1
R16
31
ADNS-3530
1
U2
32
BAT54C,SOT23
1
D3
33
BQ24202DGN,MSOP-8
1
U3
34
Green smd LED,0805
1
D1
35
LP2980AIM5-3.3,TO-92B
1
U4
36
MSP430F1222IPW
1
U1
37
nRF2402
1
U201
14
Appendix C: PCB Layout
Figure C1. PCB Schematic (Bottom Overlay)
Figure C2. PCB Schematic (Top Overlay)
15
Appendix D: Base Plate Feature
Figure D1. Overall view of base plate
16
Appendix F: Kit Components
The designer’s kit contains components as follows:
Part Number
Description
Name
Quantity
ADNK-3533-TN24 Mouse
Reference Design Mouse
Reference Design Unit
1
ADNS-3530
Solid-State Optical Mouse Sensor
Sensor
5
ADNS-3150-001
Lens Plate
Lens
5
ADNK-3533-TN24
CD
Includes Documentation and Support Files for ADNK-3533-TN24
Documentation
a.
ADNB-3532 Data Sheet
Hardware Support Files
a.
b.
c.
d.
ADNK-3533-TN24 BOM List
ADNK-3533-TN24 Schematic
IGES Base Plate Feature File
Gerber File
Software Support Files
a.
Microcontroller Firmware
Ordering Information
For ordering information, please contact your local Avago Technologies sales representative.
At Avago Technologies call (800)235-0312, visit the website at http://www.avagotech.com/
At Sunplus call +886-3-5786005 ext. 3288 or visit the web site at www.sunplus.com
For product information and a complete list of distributors, please go to our web site:
www.avagotech.com
Avago, Avago Technologies, and the A logo are trademarks of Avago Technologies, Limited in the United States and other countries.
Data subject to change. Copyright © 2007 Avago Technologies Limited. All rights reserved.
AV02-0334EN - June 13, 2007
1