RF Basics Introduction In this module, we’ll take a look at some basic RF issues that you’ll need to deal with when designing a wireless project. We’ll also take a look at the differences between the CC24xx and CC25xx series radios. Finally we’ll run a quick lab using SmartRF Studio. Learning Objectives • Radio types • RF Environment • Antennas • SmartRF Studio Low Power RF Solutions - RF Basics 4-1 Module Topics *** oh yeah, 2.4GHz, baby! *** 4-2 Low Power RF Solutions - RF Basics Module Topics Module Topics RF Basics.................................................................................................................................................... 4-1 Module Topics......................................................................................................................................... 4-3 Radio Types and 802.15.4....................................................................................................................... 4-5 DSSS and RF Environment ..................................................................................................................... 4-6 EM Spectrum and ISM/SRD.................................................................................................................... 4-7 Output Power.......................................................................................................................................... 4-8 Antennas.................................................................................................................................................. 4-9 Interference and Fading.........................................................................................................................4-11 SmartRF Studio......................................................................................................................................4-12 Lab4 – SmartRF Studio..........................................................................................................................4-13 Description: .......................................................................................................................................4-13 Hardware list: ....................................................................................................................................4-14 Software list:......................................................................................................................................4-14 Procedure...........................................................................................................................................4-15 Low Power RF Solutions - RF Basics 4-3 Module Topics *** I hear it’s nice in Nice, this time of year *** 4-4 Low Power RF Solutions - RF Basics Radio Types and 802.15.4 Radio Types and 802.15.4 2.4GHz Radio Types CC2420 CC2520 CC243x CC2480 Transceiver DSSS (Direct Sequence Spread Spectrum) 802.15.4 compliant TI-MAC, ZigBee, Z-Accel AES-128 security CC2400 CC2500 SoC CC251x Non-802.15.4 applications SimpliciTI and other proprietary protocols CC24xx – First generation CC25xx – Second generation (Improved link budget) 802.15.4 … 2 IEEE 802.15.4-2003 Worldwide 2.4GHz Channels 250 kbps 2.0 Mchip/s 2480 MHz - 2410 MHz - 2405 MHz - 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 O-QPSK Half-sine pulse shaping -85 dBm DSSS … 3 Low Power RF Solutions - RF Basics 4-5 DSSS and RF Environment DSSS and RF Environment Spread Spectrum Implementation DSSS (Direct Sequence Spread Spectrum) Implemented in hardware 4 bits are coded into 32 chips Correct chip sequence for nib b le = 5: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1 0 0 1 0 1 0 1 1 1 1 0 1 0 1 0 0 1 1 0 1 0 0 0 1 1 1 0 1 0 0 0 1 0 0 1 1 0 1 1 0 1 1 0 0 1 0 0 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 1 0 1 0 1 0 1 1 0 1 0 1 0 1 1 1 0 1 0 0 0 1 1 1 0 1 0 0 0 0 0 0 1 1 0 1 1 1 1 1 0 0 1 0 0 Correlation value 18 16 14 12 14 24 16 14 14 16 14 20 14 12 20 18 Environment … 4 Typical Office Radio Environment EM Spectrum … 5 4-6 Low Power RF Solutions - RF Basics EM Spectrum and ISM/SRD EM Spectrum and ISM/SRD Electromagnetic Spectrum SOUND RADIO VHF = VERY HIGH FREQUENCY UHF = ULTRA HIGH FREQUENCY SHF = SUPER HIGH FREQUENCY EHF = EXTREMELY HIGH FREQUENCY LIGHT HARMFUL RADIATION 2.4 GHz ISM band ISM bands 315-915 MHz 4G CELLULAR 56-100 GHz UWB 3.1-10.6 GHz ISM = Industrial, Scientific and Medical UWB = Ultra Wide Band Source: JSC.MIL ISM/SRD … 6 Unlicensed ISM/SRD Bands USA/Canada: 260 – 470 MHz 902 – 928 MHz 2400 – 2483.5 MHz (FCC Part 15.231; 15.205) (FCC Part 15.247; 15.249) (FCC Part 15.247; 15.249) Europe: 433.050 – 434.790 MHz 863.0 – 870.0 MHz 2400 – 2483.5 MHz (ETSI EN 300 220) (ETSI EN 300 220) (ETSI EN 300 440 or ETSI EN 300 328) Japan: 315 MHz 426-430, 449, 469 MHz 2400 – 2483.5 MHz 2471 – 2497 MHz (Ultra low power applications) (ARIB STD-T67) (ARIB STD-T66) (ARIB RCR STD-33) ISM = Industrial, Scientific and Medical SRD = Short Range Device Output Power … 7 Low Power RF Solutions - RF Basics 4-7 Output Power Output Power 2.4 GHz Output Power EU USA 10mW nominal 100mW for some applications 1mW nominal 1W for some applications Additional regional restrictions must be met Antennas … 8 4-8 Low Power RF Solutions - RF Basics Output Power Antennas Commonly Used Antennas PCB antennas No extra cost Large in size at low frequencies Good performance possible Complicated to make good designs Whip antennas Expensive Good performance Hard to fit in many applications Chip antennas Expensive OK performance PCB Antennas … 9 PCB Antennas Antenna design is NOT easy At 2.4 GHz: We have many reference designs 3rd party design houses can provide additional support Folded Dipole Compressed Inverted-F Chip antenna Inverted-F Pinyon Antennas … 10 Low Power RF Solutions - RF Basics 4-9 Output Power Pinyon Antennas Resonant slot technology 2x previous range at same power Will be available on several TI reference designs Gain Patterns Azimuth Elevation 3.8 x 1.5 x 0.062 inches 2.26× 1.0 5 × 0.062 inches 9 6 × 37.5 × 1.6 mm 5 7.4 × 26.7 × 1.6 mm Pa rt No - AWP1SS24NBDHF V4A Part No -AWP1SS24EHF V5 Full Size Single Slot Antenna Half Size Single Slot Antenna Interference and Fading … 11 4 - 10 Low Power RF Solutions - RF Basics Interference and Fading Interference and Fading Interference and Fading Interference 2.4 GHz WLAN, Bluetooth, analog video, microwave ovens, other ISM systems etc Fading: Reflections from walls etc. signals can add in opposite phase (destructively) and cancel out at a point in space Solution: Spread Spectrum Solutions … 12 Solutions DSSS Coding gain from Forward Error Detection and Correction (FEDAC) Increased sensitivity/resistance to narrow-band interference Wider bandwidth required Frequency hopping Synchronization required Could fit well with TI-MAC Beaconed network Sleeping devices problematic Frequency agility Automatic or manual channel migration Sleeping devices problematic Antenna Diversity An RF switch connected to two antennas spaced ½ wavelength apart SmartRF Studio … 13 Low Power RF Solutions - RF Basics 4 - 11 SmartRF Studio SmartRF Studio SmartRF® Studio Converts physical units, e.g. RF frequency, to associated chip register values. Allows remote control/configuration of the SmartRF® chip when connected to a DK. Supports quick and simple performance testing Offers export/import of formatted register files, C-code snippet (chip register structure/table) 14 SmartRF® Studio Filemenu – register/code export/import. Normal View – register calculator. Status View – register monitor. Normal View – physical units. Normal View – predefined testing. Lab Time ... 15 4 - 12 Low Power RF Solutions - RF Basics Lab4 – SmartRF Studio Lab4 – SmartRF Studio Description: Are you ready for some RF work? Let’s take SmartRF Studio for a spin and see what it can do. Lab 4 – SmartRF Studio Set your channel Perform SmartRF Studio TX/RX tests Your instructor will assign a channel to each group. Write yours down. Workgroup 1 2 3 4 5 6 7 Channel 12 (0x0C) 13 (0x0D) 14 (0x0E) 15 (0x0F) 16 (0x10) 17 (0x11) 18 (0x12) Freq(MHz) 2410 2415 2420 2425 2430 2435 2440 16 Low Power RF Solutions - RF Basics 4 - 13 Lab4 – SmartRF Studio Hardware list: 2 SmartRF05EB boards 2 CCMSP-EM430F2618 boards 2 CC2520EM boards 2 Antennas 3 USB A/B cables Metalized anti-static bag 4 AA Batteries MSP-FET430UIF and ribbon cable Software list: SmartRF Studio version 6.10.2 (You will find a shortcut for the above application on the desktop) 4 - 14 Low Power RF Solutions - RF Basics Lab4 – SmartRF Studio Procedure Hardware 1. Disconnect the previous hardware If you haven’t dome so already, carefully disconnect the eZ430-RF2500 boards and USB extender cable and move them aside for safe-keeping. We’ll use them later. 2. Find the SmartRF04/CC2520EM boards Identify 2 SmartRF05EB boards. They look like this: Identify 2 CC2520EM boards. They look like this: Low Power RF Solutions - RF Basics 4 - 15 Lab4 – SmartRF Studio 3. Connect the Boards Carefully connect an EM board to each SmartRF05 board as shown below: Then carefully connect the antennas. Do not over-tighten as it is possible to torque the connector right off the board! 4. Switch Positions Check the positions of the Power switch and Power Source jumper on the board. The switch is located below the bottom left of the LCD display. The switch should be in the OFF position (left) and the Power Source jumper should be on the rightmost two pins: Just to the right of the Power Source jumpers is the EB Mode Selection switch. Make sure that it is in the JOYSTICK position (right), like the photo below: 5. Connect the USB Cables Using the two USB A/B cables, connect both boards to open ports on your PC. 4 - 16 Low Power RF Solutions - RF Basics Lab4 – SmartRF Studio 6. Power up the Boards and Load Drivers Switch the Power switch on one of the boards to ON (right). The SmartRF05EB LCD should display “Texas Instruments SmartRF05 EB CC2520” and you should hear the Windows (ba-bump!) sound indicating that the board has been recognized. The Found New Hardware Wizard window should open on your desktop (unless your instructor arrived very early yesterday and did all this for you, which isn’t very likely). Select No, not this time and click Next. When the next window appears, select Install from a list or specific location and click Next. When the next window appears, check Search for the best driver in these locations, uncheck Search removable media …, check Include this location… and browse to C:\Program Files\Texas Instruments\Extras\Drivers. Then click Next. Finally, click Finish. Repeat this procedure for the other board. 7. Start SmartRF Studio Double-click on the desktop shortcut to start SmartRF Studio. A window should open on your desktop much like the screenshot below: Note that both boards have been recognized by SmartRF Studio. The USB device ID (USB DID) is the same as the serial number printed on the bottom of the SmartRF05EB. Using the Post-it™ notes, label each board on top with the last three digits of its serial number. Also label one TX and the other RX. Low Power RF Solutions - RF Basics 4 - 17 Lab4 – SmartRF Studio 8. Start with the RX board In SmartRF Studio, select the board that you labeled RX and click Start. Select your workgroups’ channel number from the pull-down menu: Then click on the Packet RX tab near the middle of the window: Also, make sure the High Gain Mode checkbox (for the CC2591) is unchecked: 9. Now the TX board Resize the SmartRF Studio window so that you can see the window shown back in step 7. Select the TX board from the list, and click Start. Again, select your workgroups’ channel number from the pull-down menu, and then click on the Packet TX tab. Resize both TX and RX windows so that you can see them at the same time, like below, with the TX and the left and RX on the right: 4 - 18 Low Power RF Solutions - RF Basics Lab4 – SmartRF Studio 10. Start the Test In the right (RX) window, click the Start packet RX button, then in the left (TX) window, click the Start packet TX button. I got the following results with my boards about 1 meter apart: 11. Lower the TX Output Power In the left (TX) window, change the RF output power to -18dBm. That’s as low as we can go: and re-run the test as shown in the previous step. Here’s what I got: At -54dBm, the PER was 7%. If all of your packets didn’t get through, click the Stop RX button. Low Power RF Solutions - RF Basics 4 - 19 Lab4 – SmartRF Studio 12. Bag it Let’s decrease the signal even more. Place a metalized anti-static bag over the TX antenna. Don’t worry about shorting anything out with the bag; the resistance of the bag is very, very high. Repeat the test. Here’s what I got: At -65dBm, my PER was 11%. Of course, this number depends greatly on the RF environment in which you are operating. 4 - 20 Low Power RF Solutions - RF Basics Lab4 – SmartRF Studio 13. TX Test modes If you’re an RF geek, (of course, what would you be doing in THIS class? ☺), note the TX Test modes tab. With these test modes, you can observe the Unmodulated carrier and the Modulated spectrum on an attached spectrum analyzer. To do this test correctly, you’ll need to attach a very expensive analyzer to the BNC output of the CC2520EM board with a cable. I don’t have such an analyzer (or a cable, for that matter), so I used my Wi-Spy v1 2.4GHz Spectrum Analyzer (US$199) from metageek.net. My RF environment was pretty noisy at 2410MHz (which is probably why my packet error rates seemed high), so I moved the frequency up to a cleaner area at IEEE 802.15.4 channel 22 (0x16). Anyone care to guess at what frequency my Wi-Fi is set? RF Environment (no signal) Unmodulated Carrier at 802.15.4 channel 22 (0x16) Modulated Spectrum at 802.15.4 channel 22 (0x16) Low Power RF Solutions - RF Basics 4 - 21 Lab4 – SmartRF Studio 14. Let’s Go Mobile The MSP430F2618 on the CCMSP-EM430F2618 is pre-programmed with the Packet Error Rate (PER) test. Let’s run that now. Disconnect the SmartRF05EB boards from the USB cables and carefully remove the CC2520EM boards from them (Don’t put any pressure on the antennas). Insert the CCMSP- EM430F2618 boards into the connectors on both SmartRF05EB boards, then connect the CC2520EM boards to the top of the CCMSP boards. Your two stacks should look like this: Pre-programmed PER Test Did I say pre-programmed? The PER test is pre-programmed when you pull the board out of its’ anti-static bag for the first time. But there’s no telling what state the last person to use these boards left them in. We’ll have to re-load the PER test. 15. Connect the MSP-FET430UIF Emulator and Load Drivers Using a USB A/B cable, plug the emulator into an open USB port. When the Found New Hardware wizard window appears, select No, not this time and click Next. When the next window appears, select Install the software automatically and click Next. If you are notified that the software has not passed logo testing, click Continue anyway. Then, click Finish. The Found New Hardware wizard window will appear again. Follow the same procedure. 4 - 22 Low Power RF Solutions - RF Basics Lab4 – SmartRF Studio 16. Connect the Emulator and SmartRF05EB Connect the ribbon cable from the MSP-FET430UIF to the emulator port of one of the CCMSP boards as shown below. Connect the SmartRF05EB to a USB port and make sure the power switch is on. 17. IAR Embedded Workbench Start IAR Embedded Workbench and click Open existing workspace. Navigate to: C:\Texas Instruments\SimpliciTI-1.0.6\Projects\Examples\Peer applications\ eZ430RF\Lab4 , select PER_test.eww and then click Open. Click the Debug button. The program will be quickly downloaded to the board. I set this project up as an Externally Built project so that you wouldn’t have to fool with settings, options, paths, etc in order to reprogram the board. Basically, the project contains only the executable output of the PER project that I built earlier. Click the Stop Debugging Low Power RF Solutions - RF Basics button. 4 - 23 Lab4 – SmartRF Studio 18. Second Board Move the USB cable and Emulator over to the second board. Make sure the power switch on the SmartRF05EB board is on and click the Debug button in IAR Embedded Workbench. When the download is complete, click the Stop Debugging button. Remove the USB cable and Emulator from the SmartRF05EB board. Close IAR Embedded Workbench. 19. Battery Power On both boards, make sure that your power switchs are OFF, and move the Power jumper to the leftmost two pins, unlike what’s shown below: Insert two AA batteries into the holder on the bottom of the SmartRF05 board. Be sure to observe proper polarity. We could have powered the boards via the USB port, but we want to be mobile. 4 - 24 Low Power RF Solutions - RF Basics Lab4 – SmartRF Studio 20. Switch on Power on both boards and the PER test should start. The LCD will display the screen shown below. Press Button 1 (bottom right of the SmartRF05 board) to enter the menu on both boards. 21. Set your Channel Select your workgroups’ channel on both boards by moving the joystick left or right. Confirm your selection by pressing Button 1. If you make a mistake at any point, you can start over by pressing the EM RESET button. 22. Select Transmitter/Receiver Select one board to be the Receiver and the other to be the Transmitter with the joystick. Confirm your selection with Button 1. The Receiver is now ready to receive packets. 23. Select Output Power On the Transmitter, select 0dBm as your output power and confirm with Button 1. 24. Burst Size Set the burst size (the # of packets to transmit) to 1000 and confirm with Button 1. Your choices are 1000, 10,000, 100,000 and 1,000,000. Low Power RF Solutions - RF Basics 4 - 25 Lab4 – SmartRF Studio 25. PER Test The transmitter is now configured for the PER test. Start the test by moving the joystick up. You can stop it by moving the joystick down. The test will display the total PER and the moving average RSSI on the display. It will also display the number of packets received during the PER test. With the boards sitting on the same table, you should get 0 for the PER, an RSSI somewhere in the 20’s and 1000 packets received. If your results are wildly different, start over and re-check your channel settings. If you still get odd results; notify your instructor. 26. Mobile Follow the earlier procedure to set up the PER test, but this time pick 1,000,000 for the burst size, That will give you enough time to wander around with the receiver and determine the limits of this RF setup. Do that now. When the RSSI gets down to -80dBM or so, you should start picking up a lot more errors. Remember that the PER is x/1000, not x/1,000,000 , and is a percentage, not the actual number of errors (unless the burst size is 1000) 27. Shut Down The PER test and other software examples are documented in the CC2520 Software Examples Users Guide document. This document also describes how to download the application to the MSP430 microcontroller on the CCMSP-EM430F2618. Shut down all the SmartRF Studio windows on your desktop, power off the SmartRF05EB boards, remove the batteries, disconnect the USB cables and put everything aside for safe-keeping. We’ll use this hardware again later. You’re done 4 - 26 Low Power RF Solutions - RF Basics