Download as pdf or txt
Download as pdf or txt
You are on page 1of 80

Keysight U3810A Advanced IoT

Teaching Solution
U3813A/14A IoT System Design and
Validation Fundamentals
Lab 6: IoT Sensor Node Power

Answer Sheet
Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

Notices U.S. Government Rights Warranty


The Software is “commercial computer THE MATERIAL CONTAINED IN THIS
software,” as defined by Federal Acquisition DOCUMENT IS PROVIDED “AS IS,” AND
Copyright Notice Regulation (“FAR”) 2.101. Pursuant to FAR IS SUBJECT TO BEING CHANGED,
© Keysight Technologies 2020 12.212 and 27.405-3 and Department of WITHOUT NOTICE, IN FUTURE EDI-
Defense FAR Supplement (“DFARS”) TIONS. FURTHER, TO THE MAXIMUM
No part of this manual may be reproduced 227.7202, the U.S. government acquires EXTENT PERMITTED BY APPLICABLE
in any form or by any means (including elec- commercial computer software under the LAW, KEYSIGHT DISCLAIMS ALL WAR-
tronic storage and retrieval or translation in- same terms by which the software is cus- RANTIES, EITHER EXPRESS OR IM-
to a foreign language) without prior agree- tomarily provided to the public. Accordingly, PLIED, WITH REGARD TO THIS MANUAL
ment and written consent from Keysight Keysight provides the Software to U.S. gov- AND ANY INFORMATION CONTAINED
Technologies as governed by United States ernment customers under its standard HEREIN, INCLUD ING BUT NOT LIMITED
and international copyright laws. commercial license, which is embodied in TO THE IMPLIED WARRANTIES OF
its End User License Agreement (EULA), a MERCHANTABILITY AND FITNESS FOR
Edition copy of which can be found at A PARTICULAR PURPOSE. KEYSIGHT
http://www.keysight.com/ find/sweula. The SHALL NOT BE LIABLE FOR ERRORS
Edition 1, May 2020 license set forth in the EULA represents the OR FOR INCIDENTAL OR
exclusive authority by which the U.S. gov- CONSEQUENTIAL DAMAGES IN CON-
ernment may use, modify, distribute, or dis- NECTION WITH THE FURNISHING, USE,
Printed in: close the Software. The EULA and the li- OR PERFORMANCE OF THIS DOCU-
cense set forth therein, does not require or MENT OR OF ANY INFORMATION CON-
Printed in Malaysia permit, among other things, that Keysight: TAINED HEREIN. SHOULD KEYSIGHT
AND THE USER HAVE A SEPARATE
Published by: (1) Furnish technical information related to
commercial computer software or com-
WRITTEN AGREEMENT WITH WAR-
RANTY TERMS COVERING THE MATE-
Keysight Technologies mercial computer software documentation RIAL IN THIS DOCUMENT THAT CON-
that is not customarily provided to the FLICT WITH THESE TERMS, THE WAR-
Bayan Lepas Free Industrial Zone, 11900 public; or (2) Relinquish to, or otherwise RANTY TERMS IN THE SEPARATE
Penang, Malaysia provide, the government rights in excess of AGREEMENT SHALL CONTROL.
these rights customarily provided to the
public to use, modify, reproduce, release,
Technology Licenses perform, display, or disclose commercial
computer software or commercial computer
Safety Information
The hardware and/or software described in software documentation. No additional
this document are furnished under a license government requirements beyond those set CAUTION
and may be used or copied only in accord- forth in the EULA shall apply, except to the
extent that those terms, rights, or licenses A CAUTION notice denotes a hazard. It
ance with the terms of such license. calls attention to an operating procedure,
are explicitly required from all providers of
commercial computer software pursuant to practice, or the like that, if not correctly
performed or adhered to, could result in
Declaration of Conformity the FAR and the DFARS and are set forth
specifically in writing else- where in the damage to the product or loss of important
Declarations of Conformity for this product EULA. Keysight shall be under no obligation data. Do not proceed beyond a CAUTION
and for other Keysight products may be to update, revise or otherwise modify the notice until the indicated conditions are fully
downloaded from the Web. Go to Software. With respect to any technical understood and met.
http://www.keysight.com/ go/conformity. data as defined by FAR 2.101, pursuant to
You can then search by product number to FAR 12.211 and 27.404.2 and DFARS
find the latest Declaration of Conformity. 227.7102, the U.S. government acquires no WARNING
greater than Limited Rights as defined in
FAR 27.401 or DFAR 227.7103-5 (c), as A WARNING notice denotes a hazard. It
applicable in any technical data. calls attention to an operating procedure,
practice, or the like that, if not correctly per-
formed or adhered to, could result in per-
sonal injury or death. Do not proceed be-
yond a WARNING notice until the indicated
conditions are fully understood and met.

Keysight U3810A Advanced IoT Teaching Solution 2


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

Table of Contents
Notices ......................................................................................................................................................................... 2
Copyright Notice .................................................................................................................................................... 2
Edition .................................................................................................................................................................... 2
Printed in: ............................................................................................................................................................... 2
Published by: ......................................................................................................................................................... 2
Technology Licenses ............................................................................................................................................. 2
Declaration of Conformity ...................................................................................................................................... 2
U.S. Government Rights ........................................................................................................................................ 2
Warranty ................................................................................................................................................................ 2
Safety Information .................................................................................................................................................. 2
Objective ....................................................................................................................................................................... 5
Pre-Lab Setup Instructions ........................................................................................................................................ 5
Equipment Required .................................................................................................................................................. 5
Accessories Required ............................................................................................................................................... 5
Software Required ..................................................................................................................................................... 5
Task 1 – Connect Sensor Node Zigbee with Gateway Zigbee ..................................................................................... 6
Task 1a – Set Up the Gateway ................................................................................................................................. 8
Task 1b – Connect the DIGITAL TEMP SENSOR to the BeagleBone ................................................................... 11
Task 1c – Set Up the Sensor Node ......................................................................................................................... 14
Task 1d – Verify Gateway-Sensor Node Zigbee Network Setup ............................................................................ 17
Task 2 – Characterize Static Power of the Sensor Node ........................................................................................... 23
Task 2a – Measure the Total Current Consumption of Sensor Node (U3810A) .................................................... 24
Exercises ............................................................................................................................................................. 27
Task 2b – Measure the Current Consumption of the Zigbee Module ..................................................................... 30
Exercise ............................................................................................................................................................... 33
Instructor Answer ................................................................................................................................................. 33
Task 2c – Measure the current consumption for the DIGITAL TEMP SENSOR .................................................... 34
Task 2d – Calculate the current consumption for the BeagleBone module ............................................................ 37
Exercise ............................................................................................................................................................... 37
Task 3 – Characterize Dynamic Power Consumption ................................................................................................ 38
Task 3a – Measure the Dynamic Current Consumption for the Zigbee module ..................................................... 42
Task 3b – Measure the Dynamic Current Consumption for the U3810A ................................................................ 45
Task 4 – Measure Dynamic Power Consumption from Sleep to Wake in One Sweep .............................................. 48
Exercise ................................................................................................................................................................... 52
Instructor Answer .................................................................................................................................................... 52

Keysight U3810A Advanced IoT Teaching Solution 3


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

Task 5 – Resetting the Lab Codes in BeagleBone ..................................................................................................... 53


Appendix A – Compile C Code Using BeagleBone .................................................................................................... 54
Appendix B – Save Screenshots with Keysight BenchVue ........................................................................................ 59
Appendix C – Keysight U3810A Technical Documents .............................................................................................. 61
Board Diagram (Searchable PDF) .......................................................................................................................... 61
Schematic (Searchable PDF) .................................................................................................................................. 61
Appendix D – Establish Serial Communications between BeagleBone and PC ........................................................ 62
Appendix E – Establish Secure Shell (SSH) Communication between BeagleBone and PC .................................... 64
Install RNDIS drivers ............................................................................................................................................... 65
Configure RNDIS adapter ....................................................................................................................................... 67
Set Up SSH connection ........................................................................................................................................... 69
Appendix F – Cloud 9 IDE Usage ............................................................................................................................... 71
Appendix G – Copy and Edit Files with WinSCP ........................................................................................................ 75
Set Up WinSCP ....................................................................................................................................................... 75
Copying Files with WinSCP ..................................................................................................................................... 76
Editing Files with WinSCP ....................................................................................................................................... 78
Start PuTTY SSH connection from WinSCP ........................................................................................................... 79

Keysight U3810A Advanced IoT Teaching Solution 4


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

Objective
In this lab, static and dynamic power consumption for sensor nodes will be introduced. The measurement will cover
the sub-circuits available in sensor nodes.

IMPORTANT
You must complete Lab 1 before you start this lab. There are basic operations that are covered in Lab 1 will not
be covered in this lab. The instructions to install and set up the necessary USB drivers for serial and SSH
connections with BeagleBone are also included in Lab 1.

Pre-Lab Setup Instructions


1. Prepare the required items as listed in the “Equipment and Accessories Required” list below.
2. Download the required software installers listed in the “Software Required” list and install them on your PC.

Equipment Required
1. Keysight U3810A IoT development kit with new BeagleBone Wireless CPU
2. Keysight 34465A Digital Multimeter (DMM) with DIG & MEM option.
3. Laptop or desktop PC running on Windows with internet access (Linux and MacOS may work but are not
presently on Keysight’s list of supported platforms). The laptop or PC must have at least three USB ports
available or you will require a USB hub.

Accessories Required
1. 3x Micro-USB cables
2. 1x XB XCVR (On-board XBee3 module)
3. 1x XB1 or XB2 XCVR (On-board Xbee3 module accessory)
4. 1x Digital temp sensor (On-board digital temperature sensor accessory)
5. 4x Banana jack (4 mm) to J-hook (2 red, 2 black)
6. 2x SMA (f) to SMA(f) RF Coaxial Cable
7. USB hub (Optional to support the use of more than three USB ports)

Software Required
1. Digi XCTU (https://www.digi.com/products/xbee-rf-solutions/xctu-software/xctu)
2. WinSCP (https://winscp.net/eng/download.php)
3. PuTTY (http://www.putty.org/)

Keysight U3810A Advanced IoT Teaching Solution 5


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

Task 1 – Connect Sensor Node Zigbee with Gateway Zigbee


In this lab, you will use the Zigbee module to establish a wired (or wireless) communication between the sensor
node and the gateway. For the wired RF connection, the splitter provides 30 dB of attenuation so that the
transmitter does not overpower the receiver.
The Keysight U3810A is mounted with one Zigbee module that acts as a sensor node. A second Zigbee module is
mounted on the Keysight U3810A XB1 Transceiver Module. This module is connected directly to the PC and acts
as a gateway. Compared to the previous labs, this lab uses the reverse configuration that incorporates a sensor
that draws more energy, making it more powerful.

Before you continue, you will need to connect the two Zigbee modules with RF coaxial cables as shown below.

Sensor Node (Router) Gateway


BeagleBone + XB XCVR (Coordinator)
XB1 XCVR

Keysight U3810A Advanced IoT Teaching Solution 6


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

NOTE
Before you begin the experiment, configure the Keysight U3810A IoT Development Kit as a “cape” on top of the
BeagleBone CPU, and with the jumper configuration shown below.

Jumper JP1 JP15 JP55 JP101 JP201 JP2101 JP2201 JP2301

Input Sensor +5VSYS LoRa1


Name Current Current +5VRAW
XB Current LoRa Current XB1 Current XB2 Current
Current

Position In place In place Removed In place In place In place In place In place

DC/DC Converter / Charger

The diagram above might appear dark in print outs. Refer to Appendix C – Keysight U3810A Technical
Documents for the searchable PDF to help you locate the locations of the jumpers, connectors and components.

Do not connect voltages greater than 3.3 V to GPIO pins as this may damage the
WARNING
BeagleBone CPU. These over-voltage sources include the VIN pin on the Arduino
Shield and DC Power connectors, +5VRAW, and +5VSYS on interface connectors such
as J10, JP55, and TP51.

Keysight U3810A Advanced IoT Teaching Solution 7


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

Task 1a – Set Up the Gateway


You will begin by setting up a Zigbee Coordinator (which you will refer as the gateway). This is to establish the
network Extended PAN ID where you can later use it to configure other Zigbee devices such as routers and end
devices in order for it to “associate” with the network.
1. Ensure that there is a Zigbee module (act as the Gateway) mounted to the XB1 XCVR Board, then connect
it directly to the PC with a micro-USB cable.
2. Pay attention to the orientation of the Zigbee module. This is a cabled USB connection from the XB1 XCVR
accessory to the PC.

Micro-USB

3. Launch the Digi XCTU program (version 6.3.10 or above). You will use the XCTU software on your
computer to communicate with the Zigbee module that is mounted on the Keysight U3810A.
4. Click this icon to add a new device.

NOTE
When the Zigbee module is not detected using Add a radio module (+ icon), use the Discover radio
modules connected to your machine (search icon).

Keysight U3810A Advanced IoT Teaching Solution 8


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

5. Add a new device and select the COM port other than the Keysight U3810A. The XCTU software will
automatically detect the Zigbee device connected through USB. When you click Finish, watch the TX and
RX LEDs flash to confirm the correct XB1 device is added.
Note down this COM port number (this is how you recognize your gateway in XCTU) and do not change
any default settings for UART connection (9600 bps, 8-bit Data, No Parity, 1 Stop bit, and No Flow
Control). This will be your Zigbee gateway.

NOTE
If you are shown this prompt (below), press the RESET button B2101 near the Zigbee module on the
XB1 XCVR board to proceed. This is because the Zigbee module might still be sleeping.

6. Click the gateway Zigbee module (ZigBee + XB1 XCVR board).

7. Click Default followed by Write to reset the Zigbee module configuration.

2 1

NOTE
When you are prompted with the “Some settings have an empty value and will not be written.”
message, you can ignore it and click OK to continue.

Keysight U3810A Advanced IoT Teaching Solution 9


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

8. Click Read button to read back the settings from the Zigbee module.
9. Configure the following gateway settings below.

Parameter Value Description

CE Device Role Form Network [1] Sets the device as coordinator.

ZS ZigBee Stack 1 Set or read the Zigbee stack profile value. This must be
Profile the same on all devices that will join the same network.

NI Node Identifier Gateway Defines the node identifier, a human-friendly name for
the module.
The default NI value is a blank space. Make sure to
delete the space when you change the value.

DL Destination FFFF Set or read the lower 32 bits of the 64 bit destination
Address Low extended address.

NOTE
It is recommended to use the vertical scroll bar (at the right) to scroll about the XCTU configuration page.
Avoid using the mouse wheel as you will likely change some settings by accident.
Another option is to type “CE” in the Parameter Window to locate the entry cell quickly.

10. Click Write button to apply the settings to the gateway Zigbee module.
11. Click Read button to make sure that the settings are correctly written into the Zigbee module. You may
want to click Write and Read button again to make the changes effective.
Take note that the Operating PAN ID (OP) and Operating Channel (CH) are now updated. Record the
Operating PAN ID (OP) and Scan Channels (SC) values. You will need these values to configure the
Sensor Node Zigbee module settings.

NOTE
A successful startup will indicate that MY=0 which is the 16-bit address of the coordinator and AI=0.
The Zigbee coordinator now allows other devices to join this new PAN based on its Node Join Time
(NJ) value. The default NJ=FF indicates the coordinator will always allow joining.

Keysight U3810A Advanced IoT Teaching Solution 10


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

Task 1b – Connect the DIGITAL TEMP SENSOR to the BeagleBone


The LM75 is a digital temperature sensor that converts temperature measurements to digital form using a high-
resolution, sigma-delta, analogue-to-digital converter (ADC). Therefore, you do not require an ADC to obtain the
temperature reading compared to the LM35 (analogue temperature sensor).
1. Connect the DIGITAL TEMP SENSOR module to J11 on the Keysight U3810A according to the pin names.

From To

J11 (VSENSOR) DIGITAL TEMP SENSOR J1201 (VCC)

J11 (SCL) DIGITAL TEMP SENSOR J1201 (SCL)

J11 (SDA) DIGITAL TEMP SENSOR J1201 (SDA)

J11 (GND) DIGITAL TEMP SENSOR J1201 (GND)

Keysight U3810A Advanced IoT Teaching Solution 11


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

The LM75 operates on a 2.8 to 5 V power supply. Pull-up resistors are needed for proper I2C communication;
however, the sensor modules already contain pull-up resistors, so you don’t need to connect them manually.
In this task, you will set the hardware address (A0 – A2) to 000 by connecting these three pins to ground. There is
only one I2C device involved in this task.

DIGITAL BeagleBone ZigBee in ZigBee in XB1 USB to


TEMP CPU XB XCVR XCVR Board Computer
SENSOR Socket Socket

U3810A
LCD

Keysight U3810A Advanced IoT Teaching Solution 12


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

In order to verify the connections to this point, you will need to power up the U3810 and the BeagleBone to run a
test program.
2. Connect a micro-USB cable from your PC to the J15 USB port.

J15

3. Open Device Manager on your computer and identify the USB serial port of the Keysight U3810A.

NOTE
There are many ways to open Device Manager and the procedures may vary. One way that works on all
versions of Windows OS is to press the Windows Key + R, type devmgmt.msc in the resulting pop-up
window, and press Enter.

4. Login to the BeagleBone using PuTTY software via serial connection with the following credentials.

Username debian

Password temppwd

NOTE
Refer to Lab 1 for more information on the procedures on how to establish a serial communication
between BeagleBone and PC.

5. For the lab codes might have been modified in previous lab session, you will need to reset the codes. Run
the following commands to reset the lab codes.
cd ~
sh LabCodeReset.sh
6. Run the following command to change your current working directory.
cd LabCode/M1-L6
7. Compile and run M1_L6_T1_connectZB. You should see the LM75 temperature on the LCD.
gcc M1_L6_T1_connectZB.c -lmraa -o M1_L6_T1_connectZB
./M1_L6_T1_connectZB
8. Place your finger on the LM75 sensor to warm it. When the display shows an increase in temperature, this
shows that your connections are set up correctly. When the value shown remains unchanged, review your
connections and correct your mistakes before running M1_L6_T1_connectZB again.
9. Press Ctrl + C to end the program.

Keysight U3810A Advanced IoT Teaching Solution 13


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

Task 1c – Set Up the Sensor Node


In this task, you will configure the sensor node Zigbee for transmission. You will need to make three USB
connections to the U3810A board as shown as below.

NOTE
− J103 USB (upper left) allows your computer to directly communicate with the Zigbee module marked XB
XCVR.
− J15 USB (left side) powers the BeagleBone and allows your computer to directly communicate with it.
− J2103 USB (lower right) allows your computer to directly communicate with the Zigbee module marked
XB1 XCVR.

J103

J15

J2103

1. Connect a micro-USB cable from your PC to J103 USB port on the U3810A.
2. Launch the Digi XCTU program (version 6.3.10 or above). You are now using the XCTU software on your
computer to communicate with the Zigbee module that is mounted on the Keysight U3810A.
3. Click this icon to add a new device.

NOTE
When the Zigbee module is not detected using Add a radio module specifying the port settings (+ icon),
use Discover radio modules connected to your machine (search icon).

Keysight U3810A Advanced IoT Teaching Solution 14


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

4. Select the USB serial COM port that corresponds to the Keysight U3810A. The XCTU software will detect
the Zigbee module once it is connected through USB-Serial converter. When you click Finish, watch the
TX and RX LEDs flash to confirm the correct XB device is added.
Note down this COM port number (this is how you recognize your sensor node in XCTU). Do not change
any default settings for UART connection (9600 bps, 8-bit Data, No Parity, 1 Stop bit, and No Flow
Control). This will be your Sensor Node (and Router) Zigbee.

NOTE
If you are shown this prompt (below), press the B101 button next to the Zigbee module on the XB1
XCVR board to proceed. This is because the Zigbee module might still be sleeping.

5. Select the sensor node Zigbee module (Keysight U3810A) in the XCTU software.
6. Click the Default button followed by Write button to reset the Zigbee module configuration. Click Read
button to read back the settings from the Zigbee module.
7. Configure the Sensor Node settings below.

Parameter Value Description


Set or read the Zigbee stack profile value. This
ZS ZigBee Stack Profile 1 must be the same on all devices that will join the
same network.
Defines the node identifier, a human-friendly
name for the module.
NI Node Identifier SENSOR
The default NI value is a blank space. Make sure
to delete the space when you change the value.
<Gateway’s Operating The preconfigured Extended PAN ID used when
ID Extended PAN ID
PAN ID (OP)> forming or joining a network.
<Gateway’s Scan Defines the list of channels used during an Active
SC Scan Channels
Channels (SC)> Scan or Energy Detect as a bitfield.

Keysight U3810A Advanced IoT Teaching Solution 15


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

8. Click the Write button to apply the settings to the gateway Zigbee module and click the Read button to
ensure that the settings are correctly written into the Zigbee module. You may want to click Write and
Read button again to make the changes effective.

NOTE
The OP and CH are now updated (same as the OP and CH of the coordinator, respectively). A
successful join will update the MY value with the 16-bit address of the sensor node and AI=0.
Each Zigbee module should have a steady green and a flashing red LED on the U3810A. Otherwise,
disconnect all USB connections. Reconnect the PC to the BeagleBone USB port, the Sensor Zigbee
USB port and to the Gateway Zigbee USB port respectively.

Keysight U3810A Advanced IoT Teaching Solution 16


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

Task 1d – Verify Gateway-Sensor Node Zigbee Network Setup


1. Click the Discover radio nodes in the same network button below to verify that both Zigbee modules
(sensor node and gateway) are communicating with each other using the same wireless network.

2. You should see a ‘Discovering remote devices’ pop-up window that lists down the Zigbee modules
discovered in the same network. Ensure that the other Zigbee module is listed.

3. On the sensor node Zigbee module, verify that:


a. The MAC Address of the gateway Zigbee module found matches your gateway Zigbee module
MAC address.
b. The gateway Zigbee module has the coordinator icon to indicate that it is a coordinator.

4. Click Cancel button after verification.

Keysight U3810A Advanced IoT Teaching Solution 17


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

5. On the gateway Zigbee module, verify that:


a. The MAC address of the sensor node Zigbee module found matches the MAC address of your
sensor node Zigbee module.
b. The sensor node Zigbee module has the router icon to indicate that it is a router.

6. Click Cancel button after verification. Click the sensor node Zigbee.
7. Change to the Consoles working mode (at the top-right corner).

8. Click Open to establish communication with the sensor node Zigbee.

9. Click the gateway Zigbee which should be in Console Mode and click Open to establish communication.
Both Zigbee modules can now communicate directly.
10. Type something in the Console log of either the gateway or sensor node Zigbee and do it again with the
other module. You should see the same message appear in the other Zigbee module, as shown in the
example below. This verifies that both Zigbee modules are communicating with each other.
Sensor node Zigbee console:

Gateway Zigbee console:

Keysight U3810A Advanced IoT Teaching Solution 18


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

NOTE
In the case when both Zigbee modules are not able to communicate to each other, verify:
a. All the settings are set correctly as per the instructions.
b. The value for Zigbee Stack Profile (ZS) is the same for both Zigbee modules.
c. Assure that the PAN ID (ID) and Scan Channel (SC) of the sensor node ZigBee is set to the OP
and SC of the gateway Zigbee.
d. In this lab, both gateway and sensor node Zigbee modules are connected to the same PC. To
demonstrate that both Zigbee modules can communicate wirelessly, connect each Zigbee
module to a different PC and try sending message between them.

11. If you have not already done so in a previous task, switch to “Configuration working mode” and click the
Profile icon to save both of your Xbee configurations for use in subsequent labs.

NOTE
If you have not already saved these Zigbee configurations as profiles, you may save time and assure
accurate configurations by copying and extracting the files from the lab code directory in the BeagleBone
to your computer. You may then use the M1_L6_T1_GATEWAY.xpro and M1_L6_T1_SENSOR.xpro
profiles for this Task.
Go to Profile > Create configuration profile and select the profile. For the Router (Sensor node
Zigbee), change the PAN ID (ID) and Scan Channel (SC) to match the OP and SC of the Coordinator
(Gateway Zigbee). Save the profile Router profile you have customized to your network.
The xpro file saved by XCTU is a zip format file. You can use zip software to unzip the file to examine the
contents. Do not use XCTU version older than 6.3.10, the format saved is an xml format.
For more details, read the XCTU change log (XCTU > Help > Change Log).

Keysight U3810A Advanced IoT Teaching Solution 19


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

Now, you will connect the BeagleBone to the XB in the Sensor Node (the Keysight U3810A)
12. Remove the USB connection J103 from the XB XCVR circuit. The absence of voltage on the USB
connection J103 (in red) automatically configures the Zigbee module in the XB circuit to communicate with
the BeagleBone CPU through UART1 with the signal flow (in green) below.

13. Click the network icon on the Gateway Zigbee on XCTU to confirm that the Zigbee radios are still
connected. Press Cancel on the gateway network dialog to continue.
14. If you have not already done so, run the following command to change your working directory to
/home/debian/LabCode/M1-L6/.
cd /home/debian/LabCode/M1-L6
15. Run the following command to verify that M1_L6_T1_static.c and mraa_beaglebone_pinmap.h are
present.
ls

NOTE:
Before you compile and execute the code, inspect it to understand how it works.

16. Run the following command to compile the M1_L6_T1_static.c file.


gcc M1_L6_T1_static.c -lmraa -o M1_L6_T1_static
17. Run the following commands to execute the compiled program in the background.

nohup ./M1_L6_T1_static &


18. Exit the PuTTY software to close the serial communication.

Keysight U3810A Advanced IoT Teaching Solution 20


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

NOTE
The nohup and & in conjunction with exit is used to assure that the program continues running after the
USB cables are unplugged by ignoring terminal warnings (for example, HangUP) and redirecting the
program’s output from serial stdout to a file named nohup.out. The ability to run the U3810A without the
USB is useful when operating from an alternative power source such as a battery.
It is normal to expect the nohup command to return the following message as it indicates that it is being
pushed to the background and all the outputs from the command are logged in the nohup.out file:
nohup: ignoring input and appending output to 'nohup.out'

When you complete this lab or wish to change what the CPU is doing, you may end the program running in
the background. Execute ps -ef in Command Prompt to list the active processes. Here is a condensed
version of the processes displayed.

./M1_L6_T1

In the example above, find the ./M1_L6_T1_static program in the CMD column. You can also use the
command below.
ps -ef | grep M1_L6_T1_static or ps -a | grep M1_L6_T1_static.
In the example above, the process ID for that task is 1271. Execute kill 1271 in the Command Prompt.

./M1_L6_T1

Then, execute ps -ef again and observe that process 1271 has terminated. The M1_L6_T1_static program
is no longer running when it is not listed in the CMD column.

Keysight U3810A Advanced IoT Teaching Solution 21


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

19. Observe the LCD as it should display temperature readings from the digital temperature sensor (LM75).
a. The program reads the temperature data from LM75 every 100 ms, and then display and transmit
the data to the LCD every second.
b. Observe the console for the gateway Zigbee where the temperature data will be transmitted from
the sensor node Zigbee (Keysight U3810A) to the gateway Zigbee (connected to the PC)
every 100 ms.

NOTE
The M1_L6_T1_static program is running in the background. Exiting this session will not end or kill the
program.

With the M1_L6_T1_static program is running in the background, continue to the next task. You will need to restart
the program in the background if you are running the next task on another day.

Keysight U3810A Advanced IoT Teaching Solution 22


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

Task 2 – Characterize Static Power of the Sensor Node


In this task, you will measure static power of Keysight U3810A (as a sensor node) under different operation modes.
The Zigbee module will be used to establish a wired (or wireless) communication between the sensor node and the
gateway. For the wired RF connection, the splitter provides 30 dB of attenuation so that the transmitter does not
overpower the receiver. The sensor node is responsible to obtain data from the DIGITAL TEMP SENSOR and to
report the data to the gateway at fixed intervals.
If you are continuing this lab from previous lab session:
a. Ensure that your U3810A jumper settings are set up according to Task 1 Connecting Sensor Node ZigBee
with Gateway ZigBee.
b. Ensure that the two ZigBee modules (gateway and sensor node) are connected using SMA RF coaxial
cables. Refer to Task 1 Connecting Sensor Node ZigBee with Gateway ZigBee to see the connection.
c. Ensure that J15 and J2103 are connected to your PC with micro-USB cables. Refer to Task 1 Connecting
Sensor Node ZigBee with Gateway ZigBee for more information.
d. Log in to the BeagleBone through USB Serial Port with PuTTY software. Refer to Lab 1 for instructions on
how to establish serial communications between BeagleBone and PC.

NOTE
This is a continuation from the previous task where the M1_L6_T1_static program is running in the background.
At the Command Prompt, you can type ps -ef and verify M1-T6-L2static is in the process list.
If it is not, type nohup ./M1_L6_T1_static & command to to run the program before you continue on this lab.
With the program running in the background, maintain the USB connection at J15 to the U3810A as it will supply
sensor node power.

For those who are using LiPo battery, verify the polarity visually and with the DMM before
WARNING
connecting it. Below are the images that show correct polarity.

+
-
+
-

Keysight U3810A Advanced IoT Teaching Solution 23


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

Task 2a – Measure the Total Current Consumption of Sensor Node (U3810A)


The schematic below shows the current flow from the USB connector J15, through the Ideal Diode IC and through
the current-sensing resistor R1. The BeagleBone CPU and Keysight U3810A is now completely powered from
USB. The Keysight U3810A (the entire board) should consume around 150 mA. The high range of current
consumption can be due to running background processes or radio connections (WLAN and Bluetooth®).

Keysight U3810A Advanced IoT Teaching Solution 24


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

1. Turn on the Keysight 34465A DMM and use the test probes supplied to perform a DC voltage
measurement across the 0.1 Ω current-sensing resistor R1 at TP1 and TP2 test points. This voltage divided
by the resistance I = V/R will be a calculation of the current. Be sure to consult the Exercises on how to
maximize the accuracy of this measurement.

Jumper in place

The dark curved lines indicate the path of


the current flow in the measurement
circuit.

2. Press “Shift” > “Math” > Statistics > Show to turn on the statistic mode.
3. Stop the data acquisition when the sample values reach 100.
4. Record the average DC voltage and calculate the current I in the table below.

Current sensing resistor R1 value (Ω) 0.1 Ω

Average measured DC voltage across R1 (V) 0.0148 V

Calculated current I (A) 0.148 A

Keysight U3810A Advanced IoT Teaching Solution 25


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

5. With the JP1 Jumper still in place, reconnect the test probes to the 10 A current terminals of the DMM and
to the U3810 as shown below. The 10 A terminals assure minimum resistance (50 mΩ) through the DMM.

NOTE
Burden voltage is the V = I x R “droop” created by the current-sensing resistance or the resistance of the
DMM measurement circuit. No DMM can provide instantaneous auto-ranging capability to cover the
wide current range of an IoT device – the momentary high-resistance before up-ranging would appear in
the circuit and create an instantaneous voltage droop that could cause the CPU to reset.
For example, the sleep mode current measurement can be measured by the DMM using a small range
(10 mA), which improves resolution and accuracy at the expense of a higher burden voltage (0.027 V /
10 mA = 2.7 Ω). Active current (300 mA + peaks) is measured on a high range, either 1 A (0.27 V
burden voltage / 1 A = 0.27 Ω) or 10 A (0.05 V burden voltage at 1 A = 0.05 Ω). Hence, you must
manually set the DMM to the 1 or 10 A range to measure the current consumption for the entire sleep to
active process.

6. Press Terminals to toggle to 10 A.

Keysight U3810A Advanced IoT Teaching Solution 26


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

7. Remove JP1 Jumper and press Shift > DCI to perform a DC current measurement. When power is
accidentally disconnected, you may need to wait and restart the program after the CPU restarts.

NOTE
By default, the NPLC setting (Shift > DCI > Aperture) is set to 10 each time you power the DMM. The
NPLC and Aperture set the DMM’s integration time where the longer the integration, the more the DMM
can reject power line and other noise. However, a shorter integration will allow the DMM to capture short
spikes better when precise amplitude of the spike is to be measured.

8. Restart the measurement in statistic mode: press “Shift” > “Math” > Statistics > Clear Readings.
9. Press the STOP button on DMM when sample values reach 100.
10. Record the average current (I) in the table below.

Average current (I) 0.138 A

11. Press “Shift” > “Utility” > Manage Files > Save Screen to save a screenshot of the measurement result.
You may also change the filename and the save location (either a USB flash drive or to internal memory).
Here’s an example of a screenshot of the measurement result.

You may also use Keysight BenchVue to capture the screen directly on your computer (Refer to Appendix
B – Saving Screenshots with Keysight BenchVue).
12. After completing the measurement, place back jumper JP1 and carefully remove the two test probes.

Exercises
Exercise 1 – Current measurement accuracy
Which measurement is more accurate? Explain why.
Instructor Answer
The error in first method, measuring the voltage across the 0.1 Ω resistor, results from the resistor accuracy, the
resistance of the copper traces added to the resistor value and the measuring instrument accuracy. The error in
the second method, measuring by inserting the current meeter into the circuit, results only from the accuracy of the
measuring instrument. However the burden voltage due to the resistance of the instrument plus that of the wire
length must be considered. For this 148 mA measurement, the first method is likely more accurate.

Keysight U3810A Advanced IoT Teaching Solution 27


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

Exercise 2 – Improving the current measurement accuracy


Measure the resistance of the sense resistor plus the trace using the DMM’s 4-wire ohms function as shown below.
First, press the PWR BTN button to power down the U3810A board and disconnect J15.
Then, perform the measurement as stated below.
a. Verify the accuracry of 0 Ω: b. Then try on the two test points: c. Now measure as shown below:

Keysight U3810A Advanced IoT Teaching Solution 28


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

Can you use this measurement to improve your curerent measurement accuracy? Explain how. Can you compare
the accuracy of this measurement versus the measurement using the DCI function on the DMM?
Instructor Answer
For cases a., b. and c. above, red resistor symbols have been added to show trace resistance locations. The PCB
is designed to have negiligable resistance at pin 1 of JP1.
In a. you should obtain a measurement of < 1 mΩ since no trace resistances are found in the 4-wire measurement.
If you temporarily change the DMM function to 2-wire ohms, you will obtain a measurement of >> 0 Ω due to the
resistance of the two measurement leads to the DMM.
In b. you should obtain a measurement of somewhat higher than 100 mΩ since all four trace resistances are now
included in the measurement. The two upper (vertical) resistances are errors since the device current you are
intending to measure does not flow through them. The two lower (horizontal) resistances are in the current path so
your measurement of those two plus the 0.1 Ω resistor is appropriate and will improve your measurement accurracy
if you use this new measured value as your R in your improved I = V/R calculation.
Case c. improves upon the previous measurement by eliminating the error of the upper right side (vertical)
resistance, assuming the pin 1 trace resistance is small. You may use this new measured value as your R in your
improved I = V/R calculation for best results.

You can see that the 0.1 Ω resistor’s 1 % tolerance represents a small error when compared with trace resistances.
This is why the DMM’s DCI function may be more accurate than a voltage measurement across the 0.1 Ω sense
resistor. However if the DMM’s burden resistance is higher, then you must take into account its burden voltage.

With the M1_L6_T1_static program is running in the background, continue to the next task.

Keysight U3810A Advanced IoT Teaching Solution 29


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

Task 2b – Measure the Current Consumption of the Zigbee Module


NOTE
Ensure that the U3810A is still being powered from the USB at J15 as this is a continuation from the previous
task where the M1_L6_T1_static program is still running.

For the configuration of this task, the current to the XB circuit is derived from +5VSYS. The overall sensor current
flows from the USB connector J15 through the Ideal diode U2 to +5VRAW on the U3810A and on to the
BeagleBone CPU. The CPU generates +5VSYS and +3.3 V, and sends it back to the U3810A board. The current
consumption of the CPU may be determined by subtracting of the XB module and the sensor from the the total
current consumption. You will do this at the end of the lab.
First, you will measure the actual resistance of the current-sensing resistor in the power circuit of the Zigbee
module. The current to the XB circuit flows from the DCPA to the BeagleBone and then through the +5VRAW
output of the BeagleBone is as shown below.

Keysight U3810A Advanced IoT Teaching Solution 30


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

1. Turn on the Keysight 34465A DMM and use the test probes supplied to perform a 4 wire ohms
measurement across the 0.1 Ω current-sensing resistor R101 at TP101 and pin1 of JP101 test points as
shown below.

2. Press “Shift” > “Math” > Statistics > Show to turn on the statistic mode. Stop the data acquisition when
the sample values reach 100.
3. Record the average measured resistance R101 in the table below.

Average measured current sensing resistor’s


0.122 Ohm
resistance R101 (Ohm)

4. Now, measure the current consumption of the Zigbee Module. Use the test probes supplied to perform a
DC voltage measurement across the 0.1 Ω current-sensing resistor R101 at TP101 and TP102 test points.
Using the value of R obtained from the 4-wire measurement above, this voltage divided by the resistance
I = V/R will be a calculation of the current:

The dark curved lines indicate the path of the


current flow in the measurement circuit.

Keysight U3810A Advanced IoT Teaching Solution 31


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

5. Press “Shift” > “Math” > Statistics > Clear Readings to restart the measurement in statistic mode. Stop
the data acquisition when the sample values reach 100.
6. Record the DC voltage and calculate the current in the table below.

Average measured DC voltage across R101 0.001537 V

Calculated current (I) 0.012598 A

With the JP101 jumper in place, reconnect the test probes to the 3 A current terminals of the DMM and to TP101
and TP103 (3.3VCC) the U3810 as shown below. Choose the 1 A range. Due to the higher resistance through the
DMM (0.27 Ω), lower measured current and burden voltage, you will achieve better resolution and accuracy.

Keysight U3810A Advanced IoT Teaching Solution 32


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

7. Remove jumper JP101 and press Shift > DCI to perform a DC current measurement. As current now flows
through the Keysight 34465A DMM, the DC current value measured should be around 15 mA. When power
is accidentally disconnected, the Zigbee module should not need to be reprogrammed when power is
reconnected.

NOTE
By default, the NPLC setting (Shift > DCI > Aperture) is set to 10 each time you power the DMM. The
NPLC and Aperture set the DMM’s integration time where the longer the integration, the more the DMM
can reject power line and other noise. However, a shorter integration will allow the DMM to capture short
spikes better when precise amplitude of the spike is to be measured.

8. Press Terminals to toggle to 3A.


9. Press “Shift” > “Math” > Statistics > Clear Readings to restart the measurement in statistic mode. Stop
the data acquisition when the sample values reach 100.
10. Record the average measured current (I) in the table below.

Average measured current (I) 0.0149 A

Exercise
Which measurement is more accurate? Why?

Instructor Answer
The error in first method, measuring the voltage across the 0.1 ohm resistor, results from the resistor accuracy, the
resistance of the copper traces added to the resistor value and the measuring instrument accuracy. The error in the
second method, measuring by inserting the current meeter into the circuit, results only from the accuracy of the
measuring instrument. However the burden voltage due to the resistance of the instrument plus that of the wire
length must be considered. For this lower current, 30 mA measurement, the second method may be better.
11. After completing the measurement, place back jumper JP1 and carefully remove the two test probes. Here
is an example of a screenshot of the measurement result.

With the M1_L6_T1_static program is running in the background, continue to the next task.

Keysight U3810A Advanced IoT Teaching Solution 33


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

Task 2c – Measure the current consumption for the DIGITAL TEMP SENSOR
NOTE
This is a continuation from previous task where the M1_L6_T1_static program is still running. While it’s running
in the background, continue this lab with the procedures below.

As the current to the DIGITAL TEMP SENSOR is expected to be quite low, burden voltage will not be a problem.
Hence, you will use the DCI function of the DMM for this measurement.
1. Remove jumper JP15 and connect the test probes (using J-Hooks connected to jumpers) from the Keysight
34465A DMM to JP15 pins 1 and 2:
a. Connect JP15 pin 1 to the I terminal on the Keysight 34465A DMM (to measure current)
b. Connect JP15 pin 2 to the LO terminal on the Keysight 34465A DMM.

Keysight U3810A Advanced IoT Teaching Solution 34


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

Keysight U3810A Advanced IoT Teaching Solution 35


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

The DIGITAL TEMP SENSOR current should now flow through the Keysight 34465A DMM.

2. Press Terminals to toggle to 3 A.


3. Change the Range to 1 A. The DC current value measured should be around 250 to 275 µA.
4. Press “Shift” > “Math” > Statistics > Clear Readings to restart the measurement in statistic mode.
5. Stop the data acquisition when the sample values reach 100. Record the average measured current in the
table below and save a screenshot of the measurement result.

Average measured current consumption of 0.000273 A


DIGITAL TEMP SENSOR

6. After completing the measurement, place the jumper back to JP15 and carefully remove the two test
probes.
7. Use the kill command to stop the M1_L6_T1_static program running in the background. Use command
ps -ef to find the process ID (PID) for M1_L6_T1_static. Type kill followed by the PID to end the
M1_L6_T1_static background process.

For example, type kill -9 1282 to end that process with a PID of 1282.

Keysight U3810A Advanced IoT Teaching Solution 36


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

Task 2d – Calculate the current consumption for the BeagleBone module


Based on the configuration from Task 2a, +5VRAW power flows U1 on the Keysight U3810A board to the CPU.
The CPU generates +5VSYS and +3.3V and sends it back to the U3810A board. The current consumption of the
CPU may be determined by subtracting of the XB Module and the Sensor from the the total current consumption.

Exercise
Based on the experiments in Task 2, complete the calculations below.

Static current consumption of sensor node (U3810A) 0.138 A

Static current consumption of Zigbee module 0.0149 A

Static current consumption of sensor (DIGITAL TEMP SENSOR) 0.000273 A

Static current consumption of BeagleBone and other circuits 0.122827 A

Keysight U3810A Advanced IoT Teaching Solution 37


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

Task 3 – Characterize Dynamic Power Consumption


You will need to utilize the digitizing capability from the Keysight 33465A to measure the dynamic power
consumption as it requires a higher sampling rate compared with typical DMM operation.
The Nyquist or Sampling Theorem states that if a continuous, bandwidth-limited signal contains no frequency
components higher than F, then the original signal can be recovered without distortion (aliasing) if it is sampled at a
rate that is greater than 2F samples per second.
In practice, the multimeter’s sampling rate must be greater than twice the highest frequency component of the
signal being measured. From the front panel, you can select a sample rate in samples per second using the
Sample Rate softkey. The figure below shows a continuous sine wave sampled at a rate slightly less than 2F. As
shown by the dashed line, the result is an alias frequency which is not an accurate representation of the signal
being measured:

At least some signal was capture in the continuous case, but what if the signal being measured contained a single
impulse? In this case, the digitizer might miss it entirely as show below:

However, you can “digitize” the signal more accurately when you increase the sample rate of the DMM or change to
the Keysight DCPA

Keysight U3810A Advanced IoT Teaching Solution 38


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

NOTE
This is a continuation from previous task where the M1_L6_T1_static program is still running. Use command
ps -ef to find the process ID (PID) for M1_L6_T1_static. Type kill followed by the PID to end the
M1_L6_T1_static background process. For example, type kill -9 1282 to end that process with a PID of 1282.
With the M1_L6_T1_static program is running in the background, continue to the next task.

1. If you are continuing this lab from previous lab session:


a. Ensure that your U3810A jumper settings are set up according to Task 1 Connecting Sensor Node
ZigBee with Gateway ZigBee.
b. Ensure that the two ZigBee modules (Gateway and Sensor Node) are connected using SMA RF
coaxial cables. Refer to Task 1 Connecting Sensor Node ZigBee with Gateway ZigBee to see the
connection.
c. Ensure that J15 and J2103 are connected to your PC with micro-USB cables. Refer to Task 1
Connecting Sensor Node ZigBee with Gateway ZigBee for more information.
d. Log in to the BeagleBone through USB Serial Port with PuTTY software. Refer to Lab 1 on how to
establish serial communications between BeagleBone and PC.

Keysight U3810A Advanced IoT Teaching Solution 39


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

2. In $home/debian/LabCode/M1-L6 directory, open the M1_L6_T3_dynamic.c file. This program has


replaced the while loop in M1_L6_T1_static.c with the code below.
while (1)
{
usleep(100000);
mraa_i2c_read(i2c, buf, 2);

x = (buf [0] << 8) | buf [1];


x = (x & 0x7FFF) >> 7;
T = x / 2.0;
if (buf [0] & 0x80)
{
sprintf(buffer,"-%3.1f", T);
}
else
{
sprintf(buffer,"+%3.1f", T);
}

// accumulate data in main buffer


for(i=0; i<6; i++)
dataBuffer[i + read_count*6] = buffer[i];

// Transmit data when buffer is full


if(read_count==SENSOR_BUF-1)
{
home_LCD();
clear_LCD();
LCD_Print("Transmit Data");
for(i=0; i<SENSOR_BUF; i++)
{
mraa_uart_write(uart, dataBuffer+i*6, 6);
usleep(100000);
}
home_LCD();
clear_LCD();
LCD_Print("Idle for 20s...");
sleep(20); // Idle for a long period
}

if(count==10) // Display data value every 1s


{
count=0;
home_LCD();
clear_LCD();
LCD_Print(buffer);
}
count++;
read_count++;
if(read_count==SENSOR_BUF) read_count = 0;// reset counter
}

Keysight U3810A Advanced IoT Teaching Solution 40


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

3. Compile the code and execute the program M1_L6_T3_dynamic.c.


gcc M1_L6_T3_dynamic.c -lmraa -o M1_L6_T3_dynamic
nohup ./M1_L6_T3_dynamic &

NOTE
Remember to run the program with nohup and & in conjunction with & so that the program can run in
the background.

4. Observe the LCD. It should display a temperature reading from the LM75.
a. The program reads and accumulates 120 temperatures from the LM75.
b. Then it transmits all 120 temperatures to the gateway (the Zigbee module that is connected to the
PC) at 100 ms interval. The whole process takes about 12 seconds.
c. Observe the gateway console in XCTU. You should see the temperature values transmitted from
the sensor node Zigbee to the gateway Zigbee.
d. After data transmission, the sensor node will be idle for 20 seconds.

NOTE
Since the program XCTU runs on the PC, the PC must be connected to an XBee module to allow data
transfer. The cable between the PC and U3810A J103 has been removed, isolating the PC from the
sensor XBee. As the Gateway USB is still communicating to the PC through J2103, this explains why
the XCTU console log will display the data received from the Sensor XBee.

Keysight U3810A Advanced IoT Teaching Solution 41


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

Task 3a – Measure the Dynamic Current Consumption for the Zigbee module
You will now use the measurement setups of previous tasks to measure the current consumption of the Zigbee
module and the sensor node (U3810A).
1. Turn on the Keysight 34465A DMM and set up to perform a DCI measurement of the Zigbee module.
Refer to Task 2b – Measuring the current consumption for the ZigBee module for more details on the
procedures.
2. Set the range to 1 A to assure minimum resistance through the DMM.
3. Remove JP101 jumper and press Shift > DCI to perform a DC current measurement. When power is
accidentally disconnected, the Zigbee module should not need to be reprogrammed when power is
reconnected.
Now the current should flow through the Keysight 34465A DMM. The DC current value measured should
be around 14 to 15 mA.

4. Select “Acquire” > Acquire > Digitize on the front panel of 33465A.
5. Configure the sampling rate and duration to 10 kHz and 150 s respectively.

NOTE
By default, the NPLC setting (Shift > DCI > Aperture) is set to 10 each time you power the DMM.
Changing to Digitize mode will change the NPLC to its minimum value. A higher sampling rate will need
a lower NPLC for faster measurement. You can check the NPLC value after power up and check it back
after you have increased the sampling rate of Digitize mode (Shift > DCI > Aperture).

6. From the front panel of 33465A, select “Display” > Display > Trend Chart.
7. Start the digitizing measurement. It will stop after 150 s.

Keysight U3810A Advanced IoT Teaching Solution 42


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

8. After completing the measurement, place back the jumper JP101 and carefully remove the two test probes.
A sample screenshot is shown below.

Busy Reading
Temperature
Data

9. Press “Display” > Zoom to zoom in and see the signals clearly.
10. Observe that the interval of two active data transmissions is about 32 seconds (20 s idle and 120 s reading;
each transmission interval is 100 µs).

Keysight U3810A Advanced IoT Teaching Solution 43


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

11. Pan the signal to view the interval clearly and use the cursor function to measure the interval.

On the other hand, the sensor transmission period is about 12 seconds (120s data sampled at 100µs
interval). The measured period is slightly higher than calculation because the UART transmission (between
the Zigbee module and the BeagleBone module) may incur some delay.
You can also measure the peak current using cursor function (change it to Y) now. Again, you can see
additional information when performing dynamic current measurement.
12. Record the peak current of the Zigbee module in the table below.

Peak current of Zigbee module 40 mA

With the M1_L6_T3_dynamic program running in the background, continue to the next task.

Keysight U3810A Advanced IoT Teaching Solution 44


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

Task 3b – Measure the Dynamic Current Consumption for the U3810A


Since the BeagleBone module dominates all other current consumption, the overall measurement is an estimate of
the current drawn by the BeagleBone module.
1. If you have not already done so, turn on the Keysight 34465A DMM and setup to perform a DCI
measurement of the sensor node (U3810A). Refer to Task 2a – Measuring the total current consumption of
sensor node (U3810A) for more details on the procedures.
2. Set the range to 3 A to assure minimum resistance through the DMM.
3. Remove JP1 jumper and press Shift > DCI to perform a DC current measurement. When power is
accidentally disconnected, you may need to wait and restart the program after the CPU restarts. The DC
current value measured should be around 160 mA to 200 mA.

4. From the front panel of 33465A DMM, select “Acquire” > Acquire > Digitize.
5. Configure the sampling rate and duration to 10 kHz and 200 s respectively.

NOTE
Upon powering up of the DMM, the default value of NPLC is 10. Changing to Digitize mode will change
the NPLC to its minimum value. A higher sampling rate will need the NPLC to be lower for faster
measurement. You can check the NPLC value after power up and check it back after you have increased
the sampling rate of Digitize mode (Shift > DCI > Aperture).

6. From the front panel of 33465A DMM, select “Display” > Display > Trend Chart.
7. Start the digitizing measurement. It will stop after 150 seconds.

Keysight U3810A Advanced IoT Teaching Solution 45


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

8. After completing the measurement, replace the jumper connector in JP1. Carefully remove the two test
probes from TP1 and TP2. A sample screenshot is shown below.

9. Note the peak current for Zigbee module in the Task 3 Exercise at the end of this task and save all the
screenshots. Refer to Task 2b, step 11 for instructions on how to save screenshot.
10. Record the peak current of the Zigbee module below.

Peak current of sensor node (U3810A) 495.58 mA

NOTE
The DMM measurement aperture (input bandwidth) is a function of sample rate. When you increase the
sample rate (for example 50kHz), you may see a peak current that is higher than the 10 kHz sample rate.
This measurement is more accurate due to higher input bandwidth, but you must sacrifice the digitization
duration due to limited memory.
Peak current is important for designing a voltage converter (LDO or DC-DC converter) as it is the limiting
factor of how “small” a voltage converter can be. When the peak current is low, you can use voltage
converter with lower current rating that could save cost and potentially PCB space.

11. Disconnect the J15 USB cable to power down U3810A.

Keysight U3810A Advanced IoT Teaching Solution 46


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

Additional Information
BeagleBone runs embedded Linux, which is a complex operating system for embedded systems. Hence, there are
many background activities (such as housekeeping scripts from the OS, monitoring scripts, and networking daemon
programs such as WLAN and Bluetooth®) when executing the C program. This creates difficulties in identifying a
specific activity (sensor reading, wireless transmission and idle) through the current traces. However, you can still
see the differences in the current measurement profile when you disable the BeagleBone WLAN or Bluetooth®
radio.
These are the commands to disabling and enabling the WLAN and Bluetooth®:

Command Descriptions Linux Commands

Disable WLAN rfkill block wifi

Enable WLAN rfkill unblock wifi

Disable Bluetooth® rfkill block bluetooth

Enable Bluetooth® rfkill unblock bluetooth

1. It is important to always execute the command rfkill unblock wlan after completing the
procedure in which you used the command rfkill block wlan. This must always be
WARNING done before your BeagleBone CPU is shutdown or rebooted. For more information see
Appendix.

Keysight U3810A Advanced IoT Teaching Solution 47


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

Task 4 – Measure Dynamic Power Consumption from Sleep to Wake in One


Sweep
1. If you are continuing this lab from previous lab session:
a. Ensure that your U3810A jumper settings are set up according to Task 1 Connecting Sensor Node
ZigBee with Gateway ZigBee.
b. Ensure that the two ZigBee modules (Gateway and Sensor Node) are connected using SMA RF
coaxial cables. Refer to Task 1 Connecting Sensor Node ZigBee with Gateway ZigBee to see the
connection.
c. Ensure that J15 and J2103 are connected to your PC with micro-USB cables. Refer to Task 1
Connecting Sensor Node ZigBee with Gateway ZigBee for more information.
d. Log in to the BeagleBone through USB Serial Port with PuTTY software. Refer to Lab 1 on how to
establish serial communications between BeagleBone and PC.

2. This task uses the M1_L6_T4_sleepwake.c program. This file replaces the while loop codes section of
M1_L6_T3_dynamic.c with the code below:
mraa_gpio_context button1, button2, button3;

button1 = mraa_gpio_init(B1);
button2 = mraa_gpio_init(B2);
button3 = mraa_gpio_init(B3);

while (1)
{
usleep(100000);
int B1_val = mraa_gpio_read(button1);
int B2_val = mraa_gpio_read(button2);
int B3_val = mraa_gpio_read(button3);
if(!B1_val)
{
home_LCD();
clear_LCD();
LCD_Print((uint8_t*)"PwrBtn Resume");
system("systemctl suspend");
sleep(5);
}
else if (!B2_val)
{
home_LCD();
clear_LCD();
LCD_Print((uint8_t*)"Start WiFi");
system("systemctl start wpa_supplicant");
sleep(5);
}
else if (!B3_val)
{
home_LCD();
clear_LCD();
LCD_Print((uint8_t*)"Stop WiFi");
system("systemctl stop wpa_supplicant");
sleep(5);
}
home_LCD();
clear_LCD();
LCD_Print((uint8_t*)"Push B1 B2 B3");
}

Keysight U3810A Advanced IoT Teaching Solution 48


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

3. Compile the code and execute the program M1_L6_T4_sleepwake.c.


gcc M1_L6_T4_sleepwake.c -lmraa -o M1_L6_T4_sleepwake
sudo nohup ./M1_L6_T4_sleepwake &

NOTE
Remember to run the program with nohup and & in conjunction with & so that the program can run in
the background.
This program will need root privilege to turn on and off WLAN and go into sleep mode.

4. If you have not already done so, turn on the Keysight 34465A DMM and set up to perform a DCI
measurement of the sensor node (U3810A). Refer to Task 2a – Measuring the total current consumption of
sensor node (U3810A) for more details on the procedures.
5. Set the range to 3 A to assure minimum resistance through the DMM, set the range to 3 A.
6. Remove JP1 jumper and press Shift > DCI to perform a DC current measurement.
7. Before you proceed, ensure that the BeagleBone is connected to your WLAN router. Refer to the
“Configure BeagleBone to connect to WLAN network” task of Lab 1 for the instructions.
8. Press the B3 button to disable Wi-Fi connection in the BeagleBone module. Observe that the module is
now consuming from 135 to 167 mA.

Keysight U3810A Advanced IoT Teaching Solution 49


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

9. Press B2 button to enable Wi-Fi connection to the BeagleBone module. Observe that the module draws
about 212 mA (average) when enabled.

10. Press B1 button to put the processor into sleep mode. Observe that the module is consuming only about
36 mA (average).

11. From the front panel of the Keysight 34465A, select “Display” > Display > Trend Chart to configure the
display to Trend Chart.
12. From the front panel of the Keysight 34465A, select “Acquire” > Acquire > Digitize to configure the
acquisition mode.

Keysight U3810A Advanced IoT Teaching Solution 50


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

13. Configure the Digitize mode settings as follows.

Sample Rate 10kHz

Duration 10 seconds

14. Configure the trigger settings as follows.

Trigger Level 150 mA

Trigger Slope Positive (Low to High)

Pre-Trigger Count 5000

15. Press the Run/Stop button on the Keysight 34465A DMM to start the measurement.
16. Wait for a minute before you press the PWR BTN to wake the BeagleBone.

17. The BeagleBone Black Wireless module will wake up from sleep and the current consumption will increase
sharply within a short period. This activity is captured by the Keysight 34465A DMM. A sample screenshot
is shown below:

18. Use the cursor (Press “Display > Cursors) to measure the current consumption level from sleep mode
(36 mA) to active mode (200 mA).
19. Disconnect the J15 USB cable to power down U3810A.

Keysight U3810A Advanced IoT Teaching Solution 51


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

Exercise
Capture the power down waveform and save the screenshot.

Instructor Answer

NOTE
Burden voltage is the V = I x R “droop” created by the current-sensing resistance or the resistance of the DMM
measurement circuit. No DMM can provide instantaneous auto-ranging capability to cover the wide current
range of an IoT device – the momentary high-resistance before up-ranging would appear in the circuit and create
an instantaneous voltage droop that could cause the CPU to reset.
For example, the sleep mode current measurement can be measured by the DMM using a small range (10 mA),
which improves resolution and accuracy at the expense of a higher burden voltage (0.027 V / 10 mA = 2.7 Ω).
Active current (300 mA + peaks) is measured on a high range, either 1 A (0.27 V burden voltage / 1 A = 0.27 Ω)
or 10 A (0.05 V burden voltage at 1 A = 0.05 Ω). Hence, you must manually set the DMM to the 1 or 10 A range
to measure the current consumption for the entire sleep to active process. Using the 1 A range will limit
measurement accuracy to 100 µA and be even worse on the 10 A range.
A DC Power Analyzer can provide zero burden voltage and auto-ranging capability, which greatly improves
the accuracy of current measurement. The DCPA will be discussed in a later course, U3817A/18A.

Keysight U3810A Advanced IoT Teaching Solution 52


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

Task 5 – Resetting the Lab Codes in BeagleBone

You have reached the end of this lab and will need to reset the lab codes for future lab sessions. This is to remove
any modifications made in the lab for future lab sessions. Run the following commands to reset the lab codes.

cd ~
sh LabCodeReset.sh

NOTE
Resetting the lab code will erase any changes made in the LabCode directory. If there are any files that you want
to keep, copy them out of the LabCode directory tree first.

Keysight U3810A Advanced IoT Teaching Solution 53


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

Appendix A – Compile C Code Using BeagleBone


1. Connect the BeagleBone CPU USB port to your PC. This will power up the U3810A.
2. If the drivers have not already been installed, open the BeagleBone Storage folder.

3. Select the appropriate driver from the Drivers folder and install.

4. During the installation, Windows 10 users may see this message. Select the Install this driver software
anyway.

Keysight U3810A Advanced IoT Teaching Solution 54


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

Successful installation will show the message below.

5. If you receive this error, follow the steps to troubleshoot this issue.

Keysight U3810A Advanced IoT Teaching Solution 55


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

a. Go to Device Manager. When you see this other device with the Property Manufacturer: Unknown:
then you will need to load the Microsoft version of the RNDIS Device Driver. You also may need to
reload the driver if you change USB Ports. Right-click on the RNDIS device:

b. Right-click on the RNDIS device and select Update Driver Software.

c. Select the ‘Browse my computer for driver software’ option.

Keysight U3810A Advanced IoT Teaching Solution 56


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

d. Select the Network Adapters device type.

e. Click Microsoft > USB RNDIS Adapter as shown below.

f. A warning might appear and click Yes to bypass. Upon the successful installation of the driver, you
should see the new driver in the Device Manager tree.

Keysight U3810A Advanced IoT Teaching Solution 57


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

6. You may check connectivity to the Beaglebone board by ping it from a Command Window:
ping 192.168.7.2
7. Refer to Auto Boot Up Display Setup in Getting Started Guide to connect and power up the U3810A.
8. Use PuTTY and log in into the BeagleBone module with the following details.
− Host Name: 192.168.7.2
− Port: 22
− Connection type: SSH

NOTE
The connection from PuTTY to the BeagleBone is not using serial connection. It uses the USB RNDIS
device network which is a virtual Ethernet network so that you can use TCP connection toBeagleBone.
This method is used since USB2 and its UART will be required for communication to the Zigbee
module in this lab. The Intel Eclispe IDE method is also possible and is covered in the Appendix.

9. Once you have logged in to the BeagleBone module, go to M1-L1 directory and compile
M1L1_LCDAnimation.c program.
cd LabCode/M1-L1
gcc M1_L1_LCDAnimation.c -l mraa -o LCDAnimation
10. Execute the compiled C code:
./LCDAnimation
11. After LCD Animation program is executed, an animation should appear on the LCD as shown below.

12. Press Ctrl + C in the PuTTY window to stop the LCD animation program.

Keysight U3810A Advanced IoT Teaching Solution 58


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

Appendix B – Save Screenshots with Keysight BenchVue


1. Launch Keysight BenchVue from your Desktop.

2. Make sure your instrument is connected to your PC, then add your instrument to the BenchVue software.

3. Find the Digital Multimeter app from the applications list and install it. Launch the Digital Multimeter app.

4. Start the live mode.

5. Go to Screen Image.

Keysight U3810A Advanced IoT Teaching Solution 59


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

6. Click “Get Current Screen” button.

7. Use the toolbar at the right side to draw lines, shapes, highlight and texts on the image.

8. Click Export button to export the image out from BenchVue.

Keysight U3810A Advanced IoT Teaching Solution 60


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

Appendix C – Keysight U3810A Technical Documents


Board Diagram (Searchable PDF)
This is a searchable PDF of the U3810A board diagram. Use this document to locate jumpers, connectors and
components on the board.

U3810-66501 Board
Diagram.pdf

Schematic (Searchable PDF)


This is a searchable PDF of the U3810A schematic. Use this document to understand the electrical connections of
the components and parts on the board.

U3810-66501
Schematic.pdf

Keysight U3810A Advanced IoT Teaching Solution 61


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

Appendix D – Establish Serial Communications between BeagleBone and


PC
1. If not already done so, download and install PuTTY from http://www.putty.org/. Select the 32-bit or 64-bit that
is compatible with your operating system.

2. Only connect a USB cable from your computer to J15 of the U3810A. The JP1 should be in place while the
JP55 should not be placed.

J15

JP1

JP55

Keysight U3810A Advanced IoT Teaching Solution 62


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

3. Press the Windows key and type Device Manager or type the Run and type devmgmt.msc to open the
Device Manager. Find the COM port that connects to U3810A. Note down the port number. You will need
this to configure the serial communication using PuTTY.

If you see the warning below, the driver was not automatically installed by Windows.

4. Run your PuTTY software and connect to the COM port that you have identified earlier using Serial
connection at 115200 Baud-rate.

NOTE
With the J15 connection for the system console system messages such as
connmanctl> [ 2406.800674] wlcore: ERROR SW watchdog interrupt received! starting
recovery.
…may occur. If they do, press Enter and beginning typing your command on a new line.

Keysight U3810A Advanced IoT Teaching Solution 63


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

Appendix E – Establish Secure Shell (SSH) Communication between


BeagleBone and PC
In this exercise, you will connect the PC (Host) to Beagle Bone via a USB cable and establish a RNDIS connection.
RNDIS is the Remote Network Driver Interface Specification. It defines internet connection via USB and this
connection provides a virtual network to the Beagle Bone that supports various network protocols including SSH
and HTTP. Once the connection is established, a PuTTY terminal using SSH can be used. The local
documentation on the webpage can also be explored. The RNDIS Network IP address of the BeagleBone will be
192.168.7.2 while your PC will be at 192.168.7.1.

When JP1 is in place do not connect a USB cable to both the BeagleBone and J15 at the
WARNING
same time, or anomalous behavior may result.

1. Remove the USB cable from J15 and connect it instead to the BeagleBone CPU USB port to your PC. This
will also power up the U3810A. It may take up to one minute to complete the boot process.

Once the boot process is complete, you should see the BeagleBone Getting Started window or drive listed
in the directory shown in the next image

Keysight U3810A Advanced IoT Teaching Solution 64


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

Install RNDIS drivers


2. If the drivers have not already been installed open the BeagleBone Getting Started drive using File
Explorer.

3. Select the driver for your OS from the Drivers folder and install the BONE_D64.exe file.

4. During the installation, Windows 10 users may see this message. Select the Install this driver software
anyway.

Keysight U3810A Advanced IoT Teaching Solution 65


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

Successful installation will show the message below.

Keysight U3810A Advanced IoT Teaching Solution 66


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

Configure RNDIS adapter


Your PC will need to be on the same subnet using the RNDIS connection. This does not have DHCP so your PC
address needs to be set to 192.168.7.1.

NOTE
You may need to run this step each time a different BeagleBone is connected to the PC.

5. Go to Network Settings, right-click Remote NDIS Compatible device, and select Properties.
6. Click <your Remote NDIS Adapter> and click Internet Protocol Version 4 (TCP/IPv4).
7. Click Properties.
8. Set up the general settings for the IP address as shown below.

6
8

Remote NDIS
Compatible Device

Keysight U3810A Advanced IoT Teaching Solution 67


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

You may receive the following message if you have previously connected a BeagleBone or other device on this
address. Click Yes when the other device is not in use and click No when both devices are not present.

Keysight U3810A Advanced IoT Teaching Solution 68


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

Set Up SSH connection


9. Once the ping command comes back with a reply and a response time, double-click the PuTTY.exe to
launch the PuTTY terminal program.
10. A PuTTY Configuration window will pop up to determine the connection type. Enter 192.168.7.2 as the IP
address, select SSH as the Connection type and Port 22.

Keysight U3810A Advanced IoT Teaching Solution 69


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

11. You will receive the following message if this is the first time your PC is connecting to the BeagleBone.
Click Yes.

12. Click Open to open the terminal window. Press Enter on your keyboard to check and verify connectivity.
Otherwise, refer to Getting Started Guide to upgrade the firmware.

Default username : debian


Default password : temppwd

Keysight U3810A Advanced IoT Teaching Solution 70


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

Appendix F – Cloud 9 IDE Usage


Over the RNDIS connection, the Cloud9 IDE (Integrated Development Environment) can be seen by opening a web
browser to http://192.168.7.2. The default page or the last saved state for the IDE should come up. The page has
three major sections which are the file navigator, text editor, and the console window.

NOTE
At the present time only .js and .php files run using the debugger mode.

Keysight U3810A Advanced IoT Teaching Solution 71


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

1. Open a file in the editor and double-click the M1_L1_GyroscopeDisplay.c file in the File Navigator.

Keysight U3810A Advanced IoT Teaching Solution 72


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

The Editor window should now show the file below. This is a very intuitive text editor that uses the conventional
Ctrl + C to copy and Ctrl + V to paste. Once the file has been modified, go to the console window to compile it.

2. Run the following command in the console window to change to the directory that you are working in.
cd ~/LabCode/M1-L1
3. Run the following command in the console window to compile the C code.
gcc M1_L1_GyroscopeDisplay.c -l mraa -o Gyro

4. Enter ./Gyro to run the code.

Keysight U3810A Advanced IoT Teaching Solution 73


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

The Cloud9 IDE is secured so that it can only be accessed via the RNDIS port on 192.168.7.2.
5. In order to enable another network access, it can be opened using the nginx server.blacklist.
This file is located at /etc/nginx/server.blacklist.
a. To add other networks, add the networks to the allow section. This file will need to be edited with
elevated permissions.
sudo nano /etc/nginx/server.blacklist

Once the file has been edited write it out and exit the editor.

b. To allow the new network access, the nginx service will need to be restarted. To do this, run the
command sudo service nginx restart. Access from other web browsers on the
specified network can be made as long as the BeagleBone is connected to that network. Web
browsers form different network locations will all see the same Cloud9 IDE. That is the information
entered and display is the same. This works well for collaboration on problems. An instructor can
open a browser window on a student IDE and help debug the problem.

WARNING20. It is strongly discouraged to enable all networks access to the Could9 IDE. It bypasses the
login credentials.

Keysight U3810A Advanced IoT Teaching Solution 74


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

Appendix G – Copy and Edit Files with WinSCP

NOTE
After power or reset, the boot process may take some time to complete before the 192.168.7.2 port becomes
active.

Set Up WinSCP
1. For Windows users, download and install a copy of WinSCP from https://winscp.net/eng/download.php.
Upon successful installation, you should see the WinSCP icon on your desktop.
2. Launch WinSCP and click New Site. Select SCP protocol, enter 192.168.7.2 for Host Name, Port Number
22, debian as username, and temppwd as the password.

3. If this is the first time the computer is connecting WinSCP to the BeagleBone, click Yes to the prompt about
connecting to an unknown server.

Keysight U3810A Advanced IoT Teaching Solution 75


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

Copying Files with WinSCP


You should see the GUI below where you can drag files across, to transfer it from the PC to the BeagleBone and
vice-versa.

PC BeagleBone

4. Create a “test.txt” text file in your desktop.

Keysight U3810A Advanced IoT Teaching Solution 76


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

5. Drag the “test.txt” file across to copy it over to the BeagleBone using WinSCP.

Drag the file across

NOTE
For Linux based systems, copy the file using scp M1-L1.zip debian@192.168.7.2 command.

Keysight U3810A Advanced IoT Teaching Solution 77


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

Editing Files with WinSCP


6. With the file in BeagleBone, right-click the “test.txt” file and click Edit. It should prompt a built-in text editor
where you will use it to edit shell scripts with a GUI text editor from PC.

WinSCP built-in Text Editor

7. Save your changes and close the text editor.

NOTE
You may want to frequently save your changes as you edit the file due to the risk of losing your changes if there
are any disconnection between your PC and BeagleBone.

Keysight U3810A Advanced IoT Teaching Solution 78


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

Start PuTTY SSH connection from WinSCP


With the PuTTY software installed in your Windows PC, you can integrate PuTTY to WinSCP where you can easily
start an SSH connection with BeagleBone without having to set up the connection properties in PuTTY.

8. In your WinSCP window, go to Options > Preferences.


9. Go to Integration > Applications.
10. In the window below, verify the following settings. Click OK to apply.

11. Click the button below and PuTTY will automatically log in to BeagleBone with the credentials used in
WinSCP.

Keysight U3810A Advanced IoT Teaching Solution 79


Lab 6: IoT Sensor Node Power IoT Systems Design and
(Answer Sheet) Validation Fundamentals

This information is subject to


change without notice.
© Keysight Technologies 2020
Edition 1, May 2020
Published in Malaysia
www.keysight.com

Keysight U3810A Advanced IoT Teaching Solution 80

You might also like