Home

AN11552 - NXP Semiconductors

image

Contents

1. c ccccccesseeeeeseeeeeeaeeeeeeaees 5 Power tranSfer cccceccccsececceeeeceeeeseeeesseeeeeaes 5 Manchester line code ssessssss 6 Quick Jack hardware description 8 Hardware block diagram 8 Quick Jack schematic description 8 Power supply esseseeenennnn 9 Audio jack MIC GND auto connect circuit 10 Audio communication circuit 11 LPC812 microcontroller 13 I O devices LEDs joystick and temperature BS SO 14 Connectors jack plug SWD expansion header eee 15 Quick Jack software description 17 LPC800 firmware flowchart 17 Smartphone app flowchart 18 Measurements and waveforms 19 Quick Jack power transfer 19 Data communication Phone Quick Jack 2165219 NEP RS 19 Data communication Quick Jack board gt phone ud EIN PM 20 NXP Quick Jack Quick Start Guide 22 Hardware requirements s 22 Software requirements sssssss 22 Getting up and running esessssssse 22 Jumper settings eseeeeseesseeeeseeeeeese 26 Bu
2. Fig 28 Jumper JP2 and JP3 and their default position AN11552 All information provided in this document is subject to legal disclaimers NXP B V 2014 All rights reserved Application Note Rev 1 1 3 June 2014 27 of 34 NXP Semiconductors AN1 1 552 NXP Smartphone Quick Jack Solution 7 Building and flashing the LPC812 firmware AN11552 7 1 This chapter provides details on how to compile the LPC812 source code and how to flash the resulting binary into the LPC812 Note The Quick Jack board comes pre programmed Building and flashing the firmware is only necessary when you plan on changing the firmware Building the firmware The LPC812 Quick Jack firmware based on the LPC800 LPCOpen can be downloaded from http www lpcware com quick jack The source code and projects for LPCXpresso Keil uVision and IAR EWARM are included in the download Refer to http www lpcware com Ipcopen for details on how to build the software 7 2 Flashing the firmware After building the firmware the resulting binary can be flashed by connecting a SWD probe e g LPC Link2 ULINK J Link to the SWD connector J4 Fig 16 All information provided in this document is subject to legal disclaimers NXP B V 2014 All rights reserved Application Note Rev 1 1 3 June 2014 28 of 34 NXP Semiconductors AN1 1 552 NXP Smartphone Quick Jack Solution 8 Quick Jack smartphone compatibility AN1155
3. S EE S BET M 200ms 1 10 NEZ NN LAJJELL 00 M M i Se EE EE o OO 9DD usu iia eS LLL I S 1 L1 M O O M Jj S 0 M M M M jj 2 00 5 PAi FEES A 5M HE 0 0 y J B E BK 143H 201 O4 16 58 bri E Fig 21 Data byte send from the Quick Jack board to the smartphone AN11552 All information provided in this document is subject to legal disclaimers NXP B V 2014 All rights reserved Application Note Rev 1 1 3 June 2014 21 of 34 NXP Semiconductors AN1 1 552 NXP Smartphone Quick Jack Solution 6 NXP Quick Jack Quick Start Guide 6 1 Using the NXP Smartphone Quick Jack Solution is easy and straightforward This chapter explains how to get up and running with the Smartphone Quick Jack Solution Hardware requirements The Smartphone Quick Jack Solution requires the NXP Quick Jack board OM13069 and a compatible smartphone The Quick Jack board can be ordered through a variety of distributors using order number OM13069 Quick Jack has been tested and verified to work on the following smartphones e iOS iPhone 4 iPhone 4S iPhone 5 iPhone 5S iOS 6 1 6 and iOS 7 0 4 e Android Samsung Galaxy S3 Read more about Quick Jack smartphone compatibility in chapter 8 Quick Jack smartphone compatibility 6 2 Software requirements The Quick Jack board ships pre programmed The latest version of the firmware including the source code
4. NXP Semiconductors accepts no liability for inclusion and or use of NXP Semiconductors products in such equipment or applications and therefore such inclusion and or use is at the customer s own risk Applications Applications that are described herein for any of these products are for illustrative purposes only NXP Semiconductors makes no representation or warranty that such applications will be suitable for the specified use without further testing or modification Customers are responsible for the design and operation of their applications and products using NXP Semiconductors products and NXP AN11552 All information provided in this document is subject to legal disclaimers NXP Smartphone Quick Jack Solution Semiconductors accepts no liability for any assistance with applications or customer product design It is customer s sole responsibility to determine whether the NXP Semiconductors product is suitable and fit for the customer s applications and products planned as well as for the planned application and use of customer s third party customer s Customers should provide appropriate design and operating safeguards to minimize the risks associated with their applications and products NXP Semiconductors does not accept any liability related to any default damage costs or problem which is based on any weakness or default in the customer s applications or products or the application or use by customer s third party customer
5. 2 Quick Jack schematic description AN11552 The Quick Jack hardware schematic can roughly be divided down into the following sections e Power supply e Audio jack MIC GND auto connect circuit e Audio communication circuit e PC812 microcontroller e O devices LEDs joystick and temperature sensor e Connectors jack plug SWD expansion header Each of these sections will be briefly discussed in the following paragraphs All information provided in this document is subject to legal disclaimers NXP B V 2014 All rights reserved Application Note Rev 1 1 3 June 2014 8 of 34 NXP Semiconductors AN1 1 552 NXP Smartphone Quick Jack Solution 3 2 1 Power supply The Quick Jack board can be powered by two sources e By the audio jack s right channel i e powered by the smartphone e By the on board battery Two jumpers allow connecting and disconnecting the two power sources By default both power sources are enabled The four main components of the power supply are e he diode voltage multiplier Fig 6 This circuit boosts the voltage from the audio jack right channel typically about 650 mVpp at Vypp about six times This is the primary power source The battery Fig 7 The battery is the secondary power source and may be needed when Quick Jack requires more current e g to supply power to sensors requiring more power than the audio jack can provide Also in some rare cases the smartphone is not
6. AN11552 NXP Smartphone Quick Jack Solution For iOS devices this resistor needs to be fairly small 72 KQ for the phone to recognize Quick Jack s emulated MIC as valid MIC Unfortunately this is known to cause problems on some Android phones which may require a higher impedance e g gt 10 kQ A possible fix for this issue is to either choose to only support one phone low impedance or the other high impedance or choose to be able to automatically change the impedance by e g automatically connecting or disconnecting an impedance from the MIC signal to GND 8 2 2 Temporarily short circuit on MIC signal As explained in chapter 2 1 Physical interface the pinout of the headset may differ depending on the type of phone Quick Jack has an on board circuit which detects which type of headset is connected Fig 10 which then configures an analog switch to connect the signals accordingly Fig 11 The detection circuit Fig 10 uses a comparator to identify the GND and MIC pins by connecting these pins of the audio jack to the IN and IN pins of the comparator At normal conditions the sensing circuit is non invasive i e it only measures and does not influence impedance voltage current on the MIC GND jack pins significantly However when the comparator is not powered the IN IN pins of the comparator behave as if they are internally connected to diodes to the comparator s GND and VDD pins Since Quick Jack is powered by phone Quick
7. Record Thread MIC Record Function Start Lett Audio Channel Output Thread send 0x99 to Hi jack Board Reset Hi jack Board ae 7 xe nl T Pd Check Function Mode inc in Tab LEDs and Sensor v d LED amp Joystick Temperature Senso Function Function Click bs PCS ble Keys Begin ail al P Valid NN M l LC iem lick LEDn M i E de Bar 7 lt Ena rd en Data Vaild Erom Hi jack Board a Send Data to Display Joystick Display Temperature Hi jack board Press Key aw Temperature Curve Fig 18 Quick Jack smartphone app flowchart AN11552 All information provided in this document is subject to legal disclaimers NXP B V 2014 All rights reserved Application Note Rev 1 1 3 June 2014 18 of 34 NXP Semiconductors AN1 1 552 NXP Smartphone Quick Jack Solution 5 Measurements and waveforms To get a better understanding on how Quick Jack works this chapter shows a number of waveforms measured on the Quick Jack board during operation Following waveforms will be shown and explained e Quick Jack power transfer e Data communication Phone Quick Jack board e Data communication Quick Jack board phone 5 1 Quick Jack power transfer As mentioned in chapter 2 2 Power transfer the Quick Jack board is powered by the smartphone The phone s right audio channel is used to transfer the actual power A plain 21 kHz sine wave is used as carrier The ene
8. block diagram 8 Diode voltage multiplier primary power source 9 Battery secondary power source 10 Jumpers for selecting the enabled power cedet c c 10 LDO and LDO enable circuit 10 A comparator is used to identify the type of headset port Quick Jack is connected to 11 Analog switches connect the audio jack pins to the correct signals on the circuit board 11 Circuit diagram for phone to board communication eese 12 Circuit diagram for board to phone communication cece eeceeeeeeeeeeeeeeaeeeseeeseees 13 LPC812 low power ARM Cortex MO microcontroller re 14 Quick Jack on board I O devices LEDs joystick and the SE98 temperature sensor 15 The jack plug SWD connector and the 20 pin expansion connector seeeeeeeeese 16 All information provided in this document is subject to legal disclaimers Fig 17 Fig 18 Fig 19 Fig 20 Fig 21 Fig 22 Fig 23 Fig 24 Fig 25 Fig 26 Fig 27 Fig 28 NXP Smartphone Quick Jack Solution Quick Jack LPC800 firmware flowchart 17 Quick Jack smartphone app flowchart 18 Power transfer to Quick Jack board using the right audio channel of the smartphone 19 Data byte send from the smartphone to the Quick Jack board eseeeeeesss 20 Data byte send from t
9. can be found on http www lpcware com quick jack Refer to chapter 7 Building and flashing the LPC812 firmware for details on how to build and flash firmware The smartphone example app can be downloaded from the App Store iOS The Android App APK and source code can be downloaded from http www lpcware com quick jack 6 3 Getting up and running AN11552 To get up and running with Quick Jack follow these steps 1 Download and install the app The app can be downloaded from the App Store iOS The app can be found in the app store by searching for NXP Quick Jack 2 Make sure the coin cell battery size CR1220 is inserted and that the jumpers on the Quick Jack board are set to default Fig 22 All information provided in this document is subject to legal disclaimers NXP B V 2014 All rights reserved Application Note Rev 1 1 3 June 2014 22 of 34 AN11552 NXP Semiconductors NXP Smartphone Quick Jack Solution NXP LPC800 HiJack Demo Board v3 0 c M m nn B tntniln ta K I lob fal pez is sass u ie WWW NXP COM WWW LPCWARE COM i 26 D L MN size qe 6 haud 37 J l mopa e kikk ENS en t T LI r gt L4 gt gt A Fig 22 Coin cell battery inserted jumpers set to default configuration JP2 on both positions JP3 placed on the right position 3 Insert the Quick Jack board in the phone s audio jack Then con
10. s Customer is responsible for doing all necessary testing for the customer s applications and products using NXP Semiconductors products in order to avoid a default of the applications and the products or of the application or use by customer s third party customer s NXP does not accept any liability in this respect Export control This document as well as the item s described herein may be subject to export control regulations Export might require a prior authorization from competent authorities Evaluation products This product is provided on an as is and with all faults basis for evaluation purposes only NXP Semiconductors its affiliates and their suppliers expressly disclaim all warranties whether express implied or statutory including but not limited to the implied warranties of non infringement merchantability and fitness for a particular purpose The entire risk as to the quality or arising out of the use or performance of this product remains with customer In no event shall NXP Semiconductors its affiliates or their suppliers be liable to customer for any special indirect consequential punitive or incidental damages including without limitation damages for loss of business business interruption loss of use loss of data or information and the like arising out the use of or inability to use the product whether or not based on tort including negligence strict liability breach of contract breach o
11. start of a period are overhead and don t signify data Fig 4 shows a graphical representation of the Manchester line coding AN11552 All information provided in this document is subject to legal disclaimers NXP B V 2014 All rights reserved Application Note Rev 1 1 3 June 2014 6 of 34 NXP Semiconductors AN11552 AN11552 NXP Smartphone Quick Jack Solution Clock Data Manchester as per G E Thomas Manchester as per IEEE 802 3 TUL To LOIL 0 11 100 1 1 O 1 0 Fig 4 Manchester coding All information provided in this document is subject to legal disclaimers NXP B V 2014 All rights reserved Application Note Rev 1 1 3 June 2014 7 of 34 NXP Semiconductors AN1 1 552 NXP Smartphone Quick Jack Solution 3 Quick Jack hardware description 3 1 This chapter describes the hardware used in the Smartphone Quick Jack Solution in more detail In particular the following items will be discussed e Hardware block diagram e Quick Jack schematic description Hardware block diagram Fig 5 shows the hardware block diagram of the NXP Smartphone Quick Jack Solution Joystick LEDs Temperature sensor OUT R Energy LDO 3V3 Harvester OUT L Signal Conditioning MIC GND MIC Signal MIC GND Conditioning Auto Detect GND MIC External Interface GPIO SPI 12C amp Auto Switch Fig 5 Quick Jack hardware block diagram 3
12. these smartphones as easy as plugging a headset jack into the audio port This allows for quick development of low cost electronics which can read sensor data and use the phone s mobile connectivity to transfer this data to the cloud The NXP LPC800 series microcontroller is an excellent fit for this application due to its low power consumption Quick Jack can be ordered from many of the NXP distributors The Quick Jack schematic LPC800 firmware and Android app source code are available free of cost on http www lpcware com quick jack AN11552 All information provided in this document is subject to legal disclaimers NXP B V 2014 All rights reserved Application Note Rev 1 1 3 June 2014 31 of 34 NXP Semiconductors AN11552 10 Legal information 10 1 Definitions Draft The document is a draft version only The content is still under internal review and subject to formal approval which may result in modifications or additions NXP Semiconductors does not give any representations or warranties as to the accuracy or completeness of information included herein and shall have no liability for the consequences of use of such information 10 2 Disclaimers Limited warranty and liability Information in this document is believed to be accurate and reliable However NXP Semiconductors does not give any representations or warranties expressed or implied as to the accuracy or completeness of such information and s
13. to ensure compatibility with all available Android phones This is especially true for apps using low level I O and re purposing the phone s hardware like the Quick Jack application does The Smartphone Quick Jack Solution is a proof of concept It is not intended as final product but instead intended to demonstrate the low power capabilities of the LPC800 series and to showcase a possible application which benefits from this feature Therefore the Quick Jack Android compatibility is limited to the Samsung Galaxy S3 Other Android phones may work but certain properties of the current hardware software are known to limit the number of supported Android phones The Quick Jack hardware software may be enhanced to support more or other type of phones A number of limitations were identified which limits the number of Android phones Quick Jack is compatible with These limitations all apply to board to phone communication phone to board communication is expected to work on a much large number of Android devices MIC signal impedance As shown in the schematic Fig 13 the MIC signal is emulated by one of the LPC800 GPIO pins combined with a simple circuit The circuit has a pull down resistor connected to the jack plug s MIC signal All information provided in this document is subject to legal disclaimers NXP B V 2014 All rights reserved Application Note Rev 1 1 3 June 2014 29 of 34 NXP Semiconductors AN1 1 552
14. 2 8 1 8 2 8 2 1 Quick Jack has been developed for both the iOS and the Android mobile operating systems Quick Jack has been tested and verified to work on the following devices e iOS iPhone 4 iPhone 4S iPhone 5 and iPhone 5S iOS 6 1 6 and iOS 7 0 4 e Android Samsung Galaxy S3 Compatibility with other iOS Android devices is not guaranteed This chapter gives a short overview why there may be compatibility issues and gives hints how these may be resolved iOS The NXP Smartphone Quick Jack Solution has been tested on several generations of iPhone devices with no issues found Since hardware among Devices and software among iOS versions are typically compatible it is expected that Quick Jack works on the majority of Devices Android Many mobile phone manufacturers use Android as a mobile operating system The large number of manufacturers causes a huge spread among the hardware platforms running on Android often even at a single manufacturer different hardware platforms are used for different Android phones Since the hardware platforms differ from phone to phone many different software drivers exist to support all these hardware platforms Besides software differences related to hardware several different Android versions now exist and manufacturers usually modify the base android platform to their needs Due to these significant variations founds among Android phones it is difficult for Android app developers
15. AN11552 NXP Smartphone Quick Jack Solution Rev 1 1 3 June 2014 Application note Document information Info Content Keywords LPC8xx LPC800 LPC812 Smartphone Quick Jack Solution HiJack MCU Mobile phone Headset Audio smartphone Abstract This application note describes the LPC800 based NXP Smartphone Quick Jack Solution The NXP Smartphone Quick Jack Solution repurposes the standard 3 5 mm stereo audio jack found on most smartphones into a self powered data channel that makes communication with these devices as easy as plugging a headset jack into the audio port NXP Semiconductors AN1 1 552 NXP Smartphone Quick Jack Solution Revision history Rev Date Description 1 1 20140603 Added remark that Quick Jack has been tested with iOS 6 1 6 and iOS 7 0 4 1 20140519 First release Contact information For more information please visit http www nxp com For sales office addresses please send an email to salesaddresses nxp com AN11552 All information provided in this document is subject to legal disclaimers NXP B V 2014 All rights reserved Application Note Rev 1 1 3 June 2014 2 of 34 NXP Semiconductors AN1 1 552 1 Introduction NXP Smartphone Quick Jack Solution This application note describes the LPC800 based NXP Smartphone Quick Jack Solution After this brief introduction the following topics will be discussed in more detail Quick Jack fundamentals Quick Jack hardwa
16. Jack will always be inserted into the headset while it is not powered This causes Quick Jack to influence the electrical properties of the jackplug s MIC signal until the energy harvester has harvested enough energy to enable the LDO Fig 9 Some phones e g Samsung Galaxy S4 detect this upon inserting Quick Jack and instead of configuring the jack s MIC as default MIC they switch back to the phone s internal MIC instead This results in the Quick Jack app not receiving the data from the Quick Jack board but the environment sound of the phone instead This leads to failure of board to phone communication There are several ways to fix the issue on hardware level Two proposed methods e Disconnect the comparator s IN and IN pins from the jackplug and choose another way to perform the MIC GND detection or even choose to not auto detect the type of headset and only support one of the standards e Use a series resistor 10 kO to 100 kO to connect the jackplug s MIC GND pins to the comparator s IN IN pins All information provided in this document is subject to legal disclaimers NXP B V 2014 All rights reserved Application Note Rev 1 1 3 June 2014 30 of 34 NXP Semiconductors AN1 1 552 NXP Smartphone Quick Jack Solution 9 Conclusion The NXP Smartphone Quick Jack Solution repurposes the standard 3 5 mm stereo audio jack found on most smartphones into a self powered data channel that makes communication with
17. board is the byte 0x72 T Dmg UJ ESTHER MWB 161s 5 00M eK 3 5M pa REB UE EEE 04 09 34 Fig 20 Data byte send from the smartphone to the Quick Jack board 5 3 Data communication Quick Jack board gt phone Data communication from the Quick Jack board to the phone is very similar to the other way around as described above First the Quick Jack board encapsulated the data payload and converts it to a Manchester encoded bitstream This bitstream is shifted out on one of the LPC800 s GPIO pins A simple RC filter removes any DC offset The smartphone s MIC signal is connected to the output of this filter The app running on the phone performs edge detection then decodes the Manchester encoded bitstream and continues processing the data payload Fig 21 shows the waveform of the LPC800 s GPIO pin shifting out the bitstream oscilloscope Ch2 in blue and how that signal looks like after the RC filter oscilloscope Ch1 in yellow The waveform includes three idle bits 1 one start bit 0 eight data bits one parity bit one stop bit 1 and three idle bits 1 The data payload sent to the phone is the byte 0x18 AN11552 All information provided in this document is subject to legal disclaimers NXP B V 2014 All rights reserved Application Note Rev 1 1 3 June 2014 20 of 34 NXP Semiconductors AN11552 NXP Smartphone Quick Jack Solution
18. capable of providing enough power to the Quick Jack board in that case it is also advised to connect the battery as power supply The power source selection Fig 8 Two jumpers allow connecting or disconnecting the primary and secondary power sources Refer to chapter 6 4 Jumper settings for the location of these jumpers on the Quick Jack board The LDO Fig 9 The LDO regulates the incoming voltage either from the diode voltage multiplier or from the battery to a stable 3 3 V The LDO is only enabled when a high level is present on the EN pin The circuit is designed to only enable the LDO when a phone is connected to the audio jack thereby reducing battery drain when Quick Jack is not in use PNE E J Cag Qu Fig 6 Diode voltage multiplier primary power source AN11552 All information provided in this document is subject to legal disclaimers NXP B V 2014 All rights reserved Application Note Rev 1 1 3 June 2014 9 of 34 NXP Semiconductors AN1 1 552 NXP Smartphone Quick Jack Solution K VB IN DO PMEGIO20EA R23 VB GND poi R24 Fig 7 Battery secondary power source Fig 8 Jumpers for selecting the enabled power source s LD6806TD 33P Fig 9 LDO and LDO enable circuit 3 2 2 Audio jack MIC GND auto connect circuit As mentioned in chapter 2 1 Physical interface there are two major headset standards used in smartphones The main d
19. cation between a smartphone and the LPC800 microcontroller using the smartphone s standard 3 5 mm stereo audio jack This chapter explains the physical interface and the line code used by Quick Jack Physical interface There are two major headset standards used in smartphones OMTP and CTIA The main difference between these two standards is which pin carries the MIC and GND signals as shown in Fig 2 The NXP Smartphone Quick Jack Solution is compatible with both standards The hardware identifies the type of headset automatically and configures the hardware accordingly Standard 3 5mm VS OMTP 22 aU ale 1 L audlo 2 R audio 3 GND 4 MIC 1 L audio 2 R audio 3 Mic 4 GND Standard 3 5mm plug OMTP 3 5rim plug configuration configuration Fig 2 Two major headset standards Power transfer The Quick Jack board must be able to operate solely from the power supplied by the smartphone To facilitate this feature one of the two audio channels is dedicated to power transfer a constant stream of audio feeds an energy harvester circuit on the Quick Jack board This energy harvester circuit boosts the low voltage AC signal from the audio jack to a DC voltage suitable for digital circuitry All information provided in this document is subject to legal disclaimers NXP B V 2014 All rights reserved Application Note Rev 1 1 3 June 2014 5 of 34 NXP Semiconductors AN1 1 552 NXP Smartphon
20. ct signals on the circuit board 3 2 3 Audio communication circuit Quick Jack uses the phone s left audio channel as data output and the MIC as data input A simple circuit is required to be able to adapt the analog audio signals to the microcontroller s digital signals The circuit diagram implemented to allow communication from the phone to Quick Jack is shown in Fig 12 All information provided in this document is subject to legal disclaimers NXP B V 2014 All rights reserved Application Note Rev 1 1 3 June 2014 11 of 34 NXP Semiconductors AN1 1 552 AN11552 NXP Smartphone Quick Jack Solution NCX2220DP 1 Note that the LPC800 has an on chip analog comparator and the comparator in this circuit can be eliminated when using the on chip comparator 2 Also note that the IC used for this comparator contains two comparators This second comparator is used for jack plug MIC GND signal identification as explained in chapter 3 2 2 Audio jack MIC GND auto connect circuit Fig 12 Circuit diagram for phone to board communication The purpose of this schematic is to show the logic that filters and digitizes the analog signal The inverting input of comparator is connected to 72Vcc and the non inverting input is connected to the filtered input signal This causes the comparator s output to reflect a digital representation of the analog input signal Pin PO O is of the LPC800 takes care of readin
21. cument is subject to legal disclaimers NXP B V 2014 All rights reserved Application Note Rev 1 1 3 June 2014 3 of 34 NXP Semiconductors AN1 1 552 NXP Smartphone Quick Jack Solution NXP Quick Jack Demo Board T ns A PM n 3 wo o JV T FF 3 oe n ria d n p i i T MESI 3 rd ws papa ey A 1 NXP Quick Jack App Enable KEYs Fig 1 NXP Smartphone Quick Jack Solution 1 2 LPC800 The LPC800 series of microcontrollers are an ARM Cortex MO based low cost 32 bit MCU operating at CPU frequencies of up to 30 MHz The LPC800 supports up to 16 kB of flash memory and 4 kB of SRAM The peripheral complement of the LPC800 includes a CRC engine one I C bus interface up to three USARTs up to two SPI interfaces one multi rate timer self wake up timer and state configurable timer one comparator function configurable I O ports through a switch matrix an input pattern match engine and up to 18 general purpose I O pins Due to the low power consumption of the LPC800 the LPC800 is an ideal candidate for the Smartphone Quick Jack Solution AN11552 All information provided in this document is subject to legal disclaimers NXP B V 2014 All rights reserved Application Note Rev 1 1 3 June 2014 4 of 34 NXP Semiconductors AN1 1 552 NXP Smartphone Quick Jack Solution 2 Quick Jack fundamentals 2 1 2 2 AN11552 The Smartphone Quick Jack Solution allows communi
22. der Three connectors can be found on the Quick Jack board Fig 16 e Jack plug for connecting Quick Jack to the smartphone To protect Quick Jack from ESD all of the jack plug pins have ESD protection diodes e SWD for programming the LPC812 e 20 pin expansion connector The 20 pin expansion connector allows connecting external devices e g sensor I O boards to the LPC812 and interfacing with the smartphone All information provided in this document is subject to legal disclaimers NXP B V 2014 All rights reserved Application Note Rev 1 1 3 June 2014 15 of 34 NXP Semiconductors AN1 1 552 NXP Smartphone Quick Jack Solution D7 PESDSVIS2UT F 1 aim DE PESDIVISIUT Fig 16 The jack plug SWD connector and the 20 pin expansion connector AN11552 All information provided in this document is subject to legal disclaimers NXP B V 2014 All rights reserved Application Note Rev 1 1 3 June 2014 16 of 34 NXP Semiconductors AN1 1 552 NXP Smartphone Quick Jack Solution 4 Quick Jack software description The Smartphone Quick Jack Solution requires two software programs 4 1 AN11552 e he app running on the smartphone e he embedded firmware running on the LPC800 microcontroller The source code for LPC800 and Android is freely available for download on http www lpcware com quick jack A high level description of the software will be given in this chapte
23. e Quick Jack Solution 23V Harvester pn Low voltage Energy harvester Boosted DC audio signal from circuit on Quick voltage smartphone Jack board Fig 3 Power transfer from phone to Quick Jack board 2 3 Manchester line code The NXP Smartphone Quick Jack Solution uses Manchester coding as line code to achieve the communication between the smartphone and the LPC800 microcontroller Manchester code always has a transition at the middle of each bit period and may depending on the information to be transmitted have a transition at the start of the period also The direction of the mid bit transition indicates the data Transitions at the period boundaries do not carry information They exist only to place the signal in the correct state to allow the mid bit transition The existence of guaranteed transitions allows the signal to be self clocking and also allows the receiver to align correctly the receiver can identify if it is misaligned by half a bit period as there will no longer always be a transition during each bit period Manchester coding main features e Each bit is transmitted in a fixed time the period e A0 is expressed by a low to high transition a 1 by high to low transition according to G E Thomas convention in the IEEE 802 3 convention the reverse is true NXP Quick Jack uses the IEE 802 3 convention e he transitions which signify O or 1 occur at the midpoint of a period e Transitions at the
24. e of the on board LEDs LD1 2 3 The blinking speed of LD4 can be controlled using the yellow slider e he state of the on board joystick is reflected on the circle in the app Fig 26 NXP Quick Jack NXP Quick Jack NXP Quick Jack LED1 LED2 LED3 Enable KEYs LED1 LED2 LEDS LED1 LED2 LEDS Enable KEYs Enable KEYs MUTE ReGPIO MUTE ReGPIO MUTE ReGPIO Fig 26 State of the on board joystick is reflected in the app e Clicking on the sensor tab top right in the app shows the temperature sensor interface After clicking the Begin button the current temperature as measured by the on board SE98 sensor will be displayed and a temperature vs time graph will be plotted Fig 27 Note that when the sensor tab is opened LD4 stops blinking when returning to the LEDs tab LD4 resumes blinking All information provided in this document is subject to legal disclaimers NXP B V 2014 All rights reserved Application Note Rev 1 1 3 June 2014 25 of 34 NXP Semiconductors AN1 1 552 NXP Smartphone Quick Jack Solution NXP Quick Jack Fig 27 Environment temperature measured by the SE98 temperature sensor e Press the phone s Return button Android or the phone s Home button iOS to exit the app 6 4 Jumper settings Two jumper headers are available on the Quick Jack board jumpers JP2 and JP3 Fig 28 e JP2 Power Power supply select Four pin header JP2 allows placing two jumpers The lef
25. f warranty or any other theory even if advised of the possibility of such damages Notwithstanding any damages that customer might incur for any reason whatsoever including without limitation all damages referenced above and all direct or general damages the entire liability of NXP Semiconductors its affiliates and their suppliers and customer s exclusive remedy for all of the foregoing shall be limited to actual damages incurred by customer based on reasonable reliance up to the greater of the amount actually paid by customer for the product or five dollars US 5 00 The foregoing limitations exclusions and disclaimers shall apply to the maximum extent permitted by applicable law even if any remedy fails of its essential purpose 10 3 Trademarks Notice All referenced brands product names service names and trademarks are property of their respective owners NXP B V 2014 All rights reserved User Manual Rev 1 1 3 June 2014 32 of 34 NXP Semiconductors AN11552 11 List of figures Fig 1 Fig 2 Fig 3 Fig 4 Fig 5 Fig 6 Fig 7 Fig 8 Fig 9 Fig 10 Fig 11 Fig 12 Fig 13 Fig 14 Fig 15 Fig 16 AN11552 NXP Smartphone Quick Jack Solution 4 Two major headset standards 5 Power transfer from phone to Quick Jack board 6 Manchester COCING cccseeeeseeeeseeeeeeeeeaeees T Quick Jack hardware
26. figure the media volume headset volume on the phone to maximum volume Fig 23 Volume Music video games and other media 2 DJ Ringtone S Notifications en System La Fig 23 Phone s media volume headset volume set to maximum 4 Start the app As soon as the app is running LED LDO should be lit and LED LD4 should be blinking Fig 24 AN11552 All information provided in this document is subject to legal disclaimers NXP B V 2014 All rights reserved Application Note Rev 1 1 3 June 2014 23 of 34 NXP Semiconductors AN1 1 552 NXP Smartphone Quick Jack Solution Li C 2 e 2i Messages Mail Safari FO Fig 24 After starting the Quick Jack app LDO will be lit and LD4 will be blinking After establishing initial connection LD4 blinking the Quick Jack board can be controlled from the app e By adjusting the slider the blink rate of LD4 can be changed faster slower e By clicking the LED1 LED2 LED3 buttons on board LEDs LD1 to LD3 can be toggled on and off Fig 25 AN11552 All information provided in this document is subject to legal disclaimers NXP B V 2014 All rights reserved Application Note Rev 1 1 3 June 2014 24 of 34 NXP Semiconductors AN1 1 552 AN11552 NXP Smartphone Quick Jack Solution NXP Quick Jack LED1 LED2 LED3 Disable KEYs MUTE ReGPIO Fig 25 Buttons LED1 2 3 control the stat
27. g the audio input Jumper J3 allows PO O to be connected to either the comparator s output signal label L N or the filtered analog signal label N It is connected to the comparator s output by default Since the LPC800 has an on chip analog comparator the external comparator U3 can be eliminated from the hardware The Quick Jack hardware supports bypassing of the external comparator U3 using jumper J3 However this mode is currently not supported in the LPC800 firmware Refer to chapter 6 4 Jumper settings for the location of jumper J3 on the Quick Jack board The circuit diagram implemented to allow communication from Quick Jack to the phone is shown in Fig 13 All information provided in this document is subject to legal disclaimers NXP B V 2014 All rights reserved Application Note Rev 1 1 3 June 2014 12 of 34 NXP Semiconductors AN1 1 552 NXP Smartphone Quick Jack Solution Fig 13 Circuit diagram for board to phone communication The circuit simply filters the digital signal using RO and CO and removes any DC offset using C1 and R1 3 2 4 LPC812 microcontroller The low power ARM Cortex M0 LPC812 microcontroller handles all the hardware interfacing and software protocol handling thereby enabling Quick Jack to communicate with the smartphone Fig 14 The LPC812 Quick Jack firmware is configured to use the 12 MHz Internal RC IRC oscillator as clock source though the footprints for the req
28. hall have no liability for the consequences of use of such information In no event shall NXP Semiconductors be liable for any indirect incidental punitive special or consequential damages including without limitation lost profits lost savings business interruption costs related to the removal or replacement of any products or rework charges whether or not such damages are based on tort including negligence warranty breach of contract or any other legal theory Notwithstanding any damages that customer might incur for any reason whatsoever NXP Semiconductors aggregate and cumulative liability towards customer for the products described herein shall be limited in accordance with the Terms and conditions of commercial sale of NXP Semiconductors Right to make changes NXP Semiconductors reserves the right to make changes to information published in this document including without limitation specifications and product descriptions at any time and without notice This document supersedes and replaces all information supplied prior to the publication hereof Suitability for use NXP Semiconductors products are not designed authorized or warranted to be suitable for use in life support life critical or safety critical systems or equipment nor in applications where failure or malfunction of an NXP Semiconductors product can reasonably be expected to result in personal injury death or severe property or environmental damage
29. he Quick Jack board to the smartphone eeeeseeeeeeese 21 Coin cell battery inserted jumpers set to default configuration JP2 on both positions JP3 placed on the right position seesssssessss 23 Phone s media volume headset volume set to maximutm sseesseseeeeeenen nennen 23 After starting the Quick Jack app LDO will be lit and LD4 will be blinking 24 Buttons LED 1 2 3 control the state of the on board LEDs LD1 2 3 The blinking speed of LD4 can be controlled using the yellow slider 25 State of the on board joystick is reflected in the 2 0 6 NEC eee 25 Environment temperature measured by the SE98 temperature sensor 26 Jumper JP2 and JP3 and their default position i 27 NXP B V 2014 All rights reserved Application Note Rev 1 1 3 June 2014 33 of 34 NXP Semiconductors AN11552 12 Contents 1 1 1 2 2 1 2 3 3 1 3 2 1 3 2 2 3 2 3 3 2 4 3 2 5 3 2 6 4 1 4 2 5 1 9 2 5 3 6 1 6 2 6 4 7 1 7 2 8 1 8 2 8 2 1 8 2 2 10 10 1 10 2 IATFOGUGCIIO NR posts 3 NXP Smartphone Quick Jack Solution 3 LPC800 essseessssesssssseeneneenn nennen nans 4 Quick Jack fundamentals 5 Physical interface
30. ifference between these two standards is the location of the MIC and GND signals on the jack plug To be able to support both standards automatically a two stage circuit is used e First a comparator circuit detects the type of headset port Quick Jack has been inserted into The implemented circuit is shown Fig 10 e The result is interpreted by the LPC800 which then configures an analog switch accordingly The analog switch connects the right pin of the jack plug to the right signal on the circuit board GND MIC The implemented circuit is shown in Fig 11 AN11552 All information provided in this document is subject to legal disclaimers NXP B V 2014 All rights reserved Application Note Rev 1 1 3 June 2014 10 of 34 NXP Semiconductors AN1 1 552 AN11552 NXP Smartphone Quick Jack Solution NCX2220DP 1 Note that the IC used for this comparator contains two comparators This second comparator is used for signal conditioning of the data input left channel of audio jack as described in chapter 3 2 3 Audio communication circuit Fig 10 A comparator is used to identify the type of headset port Quick Jack is connected to U4 LPC POF eee ee en L GND MIC from jack plug B mic MIC GND from jack plug L I i MIC GND from jack plug GND MIC from jack plug NX3L4053PW a Schematic diagram b Circuit implementation Fig 11 Analog switches connect the audio jack pins to the corre
31. ilding and flashing the LPC812 firmware 28 Building the firmware seeeesssseese 28 Flashing the firmware esessssssse 28 Quick Jack smartphone compatibility 29 j5 E 29 Android enn 29 MIC signal impedance ssssssssse 29 Temporarily short circuit on MIC signal 30 CONCIUS e 31 Legal information 32 BI pali EE 32 Disclaimers eeseeeseeeeeeeeeeennennn 32 NXP Smartphone Quick Jack Solution 10 3 Trademarks ccccececececccecececcaecececeueavaceceneneas 32 11 List OF HOUTE S e E S 33 12 COnltenis ioa Ot aaa dE ewe cune sva evo Ce mE UNS SUIS 34 Please be aware that important notices concerning this document and the product s described herein have been included in the section Legal information O NXP B V 2014 All rights reserved For more information visit http www nxp com For sales office addresses please send an email to salesaddresses nxp com Date of release 3 June 2014 Document identifier AN11552
32. r For more details please refer to the actual source code LPC800 firmware flowchart The high level flowchart of the LPC800 firmware is shown in Fig 17 di Startup App s M MCUPOR Software Reset System Initialize T p P M E i Pd Check Function Mode MIC and GND Initialize 0x61 0x62 0x99 Implement MIC and GND 7 Receive Data From Mobile Phone_ identified and switched s T Communication IO Initialize Initiate Tx and Rx pin LED Temperature Joystick sensor Communication Clock Initialize 2 ZU ri Dai joystick Input e id a Valid Sens al s unus Data gt Manchester Decode Encode Initialize Toggle LEDs LD1 LD2 LD3 Adjust LD4 Blinky Send Input Data Send Input Data to Mobile Phone to Mobile Phone Set Default Function Mode Return Fig 17 Quick Jack LPC800 firmware flowchart All information provided in this document is subject to legal disclaimers NXP B V 2014 All rights reserved Application Note Rev 1 1 3 June 2014 17 of 34 NXP Semiconductors AN11552 NXP Smartphone Quick Jack Solution 4 2 Smartphone app flowchart The high level flowchart of the smartphone app is shown in Fig 18 Pu C Startup App Pd Ul Initialize Set default Function Display LED amp Joystick Function Set Media Volume to Maximum Start Right Audio Channel Output Thread Phone Power Supply Function Start Audio
33. re description Quick Jack software description Measurements and waveforms NXP Quick Jack Quick Start Guide Building and flashing the LPC812 firmware Quick Jack smartphone compatibility 1 1 NXP Smartphone Quick Jack Solution Inspired by the University of Michigan s Project HiJack the NXP Smartphone Quick Jack Solution repurposes the standard 3 5 mm stereo audio jack found on most smartphones into a self powered data channel that makes communication with these smartphones as easy as plugging a headset jack into the audio port The Quick Jack demo board integrates a joystick temperature sensor LEDs and an expansion header The app running on the smartphone is able to interface with these on board peripherals via the Quick Jack interface Quick Jack s main features Demo board uses the low power LPC812 microcontroller in TSSOP20 package Board is powered by either the smartphone or a small button battery SE98 I C temperature sensor integrated on the demo board Control the four on board LEDs from the smartphone Read input from on board joystick Quick Jack app available for iOS and Android smartphones Expansion header featuring most of the LPC800 GPIO pins Board features standard ARM SWD debug interface 10 pins 1 27 mm The NXP Smartphone Quick Jack Solution has been tested and verified to work with the iPhone 4 iPhone 4S iPhone 5 iPhone 5S and the Samsung Galaxy S3 smartphones AN11552 All information provided in this do
34. rgy harvester circuit boosts the amplitude of the sine wave and rectifies it to a DC voltage Fig 20 shows the waveform of the right audio channel oscilloscope Ch1 in yellow and the boosted DC voltage oscilloscope Ch2 in blue AARRE IX A fZ 100ps 5 OOM R E JL 5M oa 0 0 0 V PE Be EXE mMEZ CEE 04 07 21 Fig 19 Power transfer to Quick Jack board using the right audio channel of the smartphone 5 2 Data communication Phone gt Quick Jack board The left audio channel is used to transfer data from the phone to the Quick Jack board The data payload is encapsulated to form a small packet and Manchester line coding is used to encode the bits AN11552 All information provided in this document is subject to legal disclaimers NXP B V 2014 All rights reserved Application Note Rev 1 1 3 June 2014 19 of 34 NXP Semiconductors AN1 1 552 NXP Smartphone Quick Jack Solution On the Quick Jack board a comparator is used to convert the analog data into digital data The LPC800 then decodes the Manchester encoded bitstream and continues processing the data payload Fig 20 shows the waveform of the left audio channel oscilloscope Ch1 in yellow and how that signal looks like after the comparator oscilloscope Ch2 in blue The waveform includes 3 idle bits 1 1 start bit 0 8 data bits 1 Parity bit 1 stop bit 1 and 3 idle bits 1 The data payload send to the Quick Jack
35. t outer jumper connects the energy harvester to the input of the LDO the right inner jumper connects the coin cell battery to the input of the LDO Diodes prevent current flowing from one source into the other allowing Quick Jack to be powered by both the battery and the energy harvester at the same time This operation is advised when using Quick Jack and is the default setting e JP3 Communication Left channel audio signal path select This jumper can be positioned in either the left or right position When placed on the right two pins the phone s left channel audio signal the signal with the Manchester encoded data is routed through the on board comparator default mode e When placed on the left two pins the on board comparator is bypassed and the analog signal is fed straight into the LPC812 In this case the LPC812 s internal comparator must be enabled and configured in order to convert the phone s analog data to digital data Note that this mode is not supported in the default firmware AN11552 All information provided in this document is subject to legal disclaimers NXP B V 2014 All rights reserved Application Note Rev 1 1 3 June 2014 26 of 34 NXP Semiconductors AN11552 NXP Smartphone Quick Jack Solution RA RARE RI i jpze f R26 es ibd d ln 7334717310 31 333 225 98 ey TIC ud t i OR m EJ RIS R14Ri3L01 LOZ LOSLO4 RI eS S natr cjg got fee jes calme B Lite
36. uired components to use an external crystal are available on the PCB AN11552 All information provided in this document is subject to legal disclaimers NXP B V 2014 All rights reserved Application Note Rev 1 1 3 June 2014 13 of 34 NXP Semiconductors AN1 1 552 NXP Smartphone Quick Jack Solution Ul 10nF Pi P14 POO GND VCC PO I POS Pll P09 P10 i P01 P16 P15 U6 MAXS809ZD 2 32 CATE09Z Fig 14 LPC812 low power ARM Cortex M0 microcontroller 3 2 5 O devices LEDs joystick and temperature sensor The Quick Jack board comes with a few on board devices Fig 15 which can be controlled from or read out with the smartphone app e Five LEDs as output devices LDO indicates power after the LDO is present LD 1 4 can be controlled from the smartphone e As first input device Quick Jack features a joystick The state of the on board joystick is reflected in the app running on the smartphone e As second input device Quick Jack features the SE98 I C temperature sensor AN11552 All information provided in this document is subject to legal disclaimers NXP B V 2014 All rights reserved Application Note Rev 1 1 3 June 2014 14 of 34 NXP Semiconductors AN1 1 552 AN11552 NXP Smartphone Quick Jack Solution Fig 15 Quick Jack on board I O devices LEDs joystick and the SE98 temperature sensor 3 2 6 Connectors jack plug SWD expansion hea

Download Pdf Manuals

image

Related Search

Related Contents

  Bedienungsanleitung    品番 WV-CS5S/WV-CS5C - psn  Manual de instruções - VEGA Americas, Inc.  Carnets de voyage, mode d`emploi Fiche technique Exposition    Monico CDL Specifications  GT310-K1 - Pichard Racing  Cahier des charges  

Copyright © All rights reserved.
Failed to retrieve file