Calibration is an important step towards building reliable IoT systems. For example, accurate sensor reading requires ADC calibration, and power monitoring chips must be calibrated before being used for measuring the energy consumption of IoT devices. In this paper, we present ProCal, a low-cost, accurate, and scalable power calibration tool. ProCal is a programmable platform which provides dynamic voltage and current output for calibration. The basic idea is to use a digital potentiometer connected to a parallel resistor network controlled through digital switches. The resistance and output frequency of ProCal is controlled by a software communicating with the board through the SPI interface. Our design provides a simple synchronization mechanism which prevents the need for accurate time synchronization. We present mathematical modeling and validation of the tool by incorporating the concept of Fibonacci sequence. Our extensive experimental studies show that this tool can significantly improve measurement accuracy. For example, for ATMega2560, the ADC error reduces from 0.2 to 0.01 . ProCal not only costs less than 2 of the current commercial solutions, it is also highly accurate by being able to provide extensive range of current and voltage values.
 Testbeds are indispensable for debugging and evaluating wireless embedded systems. While existing testbeds provide ample opportunities for realistic, large-scale experiments, they are limited in their ability to closely observe and control the distributed operation of resource-constrained nodes - access to the nodes is restricted to the serial port. This paper presents FlockLab, a testbed that overcomes this limitation by allowing multiple services to run simultaneously and synchronously against all nodes under test in addition to the traditional serial port service: tracing of GPIO pins to record logical events occurring on a node, actuation of GPIO pins to trigger actions on a node, and high-resolution power profiling. FlockLab's accurate timing information in the low microsecond range enables logical events to be correlated with power samples, thus providing a previously unattained level of visibility into the distributed behavior of wireless embedded systems. In this paper, we describe FlockLab's design, benchmark its performance, and demonstrate its capabilities through several real-world test cases. In this paper, we present the design and implementation of Nemo -- a practical in situ power metering system for wireless sensor networks. Nemo features a new circuit design called shunt resistor switch that can dynamically adjust the resistance of shunt resistors based on the current load. This allows Nemo to achieve a wide dynamic current range and high measurement accuracy. Nemo transmits real-time power measurements to the host node solely through the power line, by modulating the current load and the supply voltage. This feature leads to a noninvasive, plug & play design that allows Nemo to be easily installed on existing mote platforms without physical wiring or soldering. We have implemented a prototype of Nemo and conducted extensive experimental evaluation. Our results show that Nemo can transmit high-throughput measurement data to the host through voltage current load modulation. Moreover, it has satisfactory measurement fidelity over a wide range of operating conditions. In particular, Nemo yields a dynamic measurement range of 250,000:1, which is 2.5X and 7X that of two state-of-the-art sensor network power meter systems, while only incurring an average measurement error of 1.34 . We also use a case study to demonstrate that Nemo is able to track the highly dynamic sleep current consumption of TelosB motes, which has important implications for the design of low duty-cycle sensor networks that operate in dynamic environments. Wireless sensor networks emerged as a key technology for prolonged, unsupervised monitoring in a wide spectrum of applications, from biological and environmental to civil and military. The sensor networks should operate autonomously for a long period of time under stringent resource and energy constraints. Energy conservation and power-awareness have become a focus of a number of research efforts, as sensor network nodes must operate on batteries or use energy extracted from the environment, such as solar energy or vibrations. Runtime power measurements and characterization of real existing systems are crucial for studies that target power optimizations, including techniques for dynamic adaptation based on the current energy status. This paper introduces an environment for unobtrusive real-time power monitoring that could be used for a number of wireless sensor platforms. We describe our methodology for calibration and validation of the environment and give empirical data for the Telos wireless sensor platform when it runs a subset of representative applications. Energy is one of the most critical resources in Wireless Sensor Networks (WSN). For any WSN deployment, being it for a productive use case or for a testbed, the ability to perform energy measurements is of major importance, e.g., to estimate the status of the WSN, the need for maintenance, or for remaining lifetime. This paper presents a distributed energy measurement system for outdoor applications. An existing testbed has been extended by the micro controller unit (MCU)- based oscilloscope PotatoScope. Measuring voltage and current of the sensor node, undervolting effects and energy consumption of realtime applications can be observed. The PotatoScope is capable of capturing the power dissipation precisely at a high temperature range of 100 K. Using high sample rates with up to 500 kHz, the system needs to be capable of storing and archiving the measured data. A final evaluation shows a 0.9 drift for voltage measurements and a 1.6 drift for current measurements over the range of 100K. Using an SD card, long-term measurements can be made with up to 500 kHz. Nevertheless, a live mode allows sample rates up to 2 MHz when using the PotatoScope with a computer. We present SPOT, a scalable power observation tool that enables in situ measurement of nodal power and energy over a dynamic range exceeding four decades or a temporal resolution of microseconds. Using SPOT, every node in a sensor network can now be instrumented, providing unparalleled visibility into the dynamic power profile of applications and system software. Power metering at every node enables previously impossible empirical evaluation of low power designs at scale. The SPOT architecture and design meet challenges unique to wireless sensor networks and other low power systems, such as orders of magnitude difference in current draws between sleep and active states, short-duration power spikes during periods of brief activity, and the need for minimum perturbation of the system under observation. From wearables to smart appliances, the Internet of Things (IoT) is developing at a rapid pace. The challenge is to find the best fitting solution within a range of different technologies that all may be appropriate at the first sight to realize a specific embedded device. A single tool for measuring power consumption of various wireless technologies and low power modes helps to optimize the development process of modern IoT systems. In this paper, we present an accurate but still cost-effective measurement solution for tracking the highly dynamic power consumption of wireless embedded systems. We extended the conventional measurement of a single shunt resistor's voltage drop by using a dual shunt resistor stage with an automatic switch-over between two stages, which leads to a large dynamic measurement range from μA up to several hundreds mA. To demonstrate the usability of our simple-to-use power measurement system different use cases are presented. Using two independent current measurement channels allows to evaluate the timing relation of proprietary RF communication. Furthermore a forecast is given on the expected battery lifetime of a Wifi-based data acquisition system using measurement results of the presented tool.