This chapter covers the fundamental aspects of energy harvesting-based wireless sensor networks (EHWSNs), ranging from the architecture of an EHWSN node and of its energy subsystem, to protocols for task allocation, MAC, and routing, passing through models for predicting energy availability. With the advancement of energy harvesting techniques, along with the development of small factor harvesters for many different energy sources, EHWSNs are poised to become the technology of choice for the host of applications that require the network to function for years or even decades. Through the definition of new hardware and communication protocols specifically tailored to the fundamentally different models of energy availability, new applications can also be conceived that rely on "perennial" functionalities from networks that are truly self-sustaining and with low environmental impact. 703 704 WIRELESS SENSOR NETWORKS WITH ENERGY HARVESTING hardware, protocol stack design, localization and tracking techniques, and energy management [1].Research on WSNs has been driven (and somewhat limited) by a common focus: energy efficiency. Nodes of a WSN are typically powered by batteries. Once their energy is depleted, the node is "dead." Only in very particular applications can batteries be replaced or recharged. However, even when this is possible, the replacement/ recharging operation is slow and expensive and decreases network performance. Different techniques have therefore been proposed to slow down the depletion of battery energy, which include power control and the use of duty cycle-based operation. The latter technique exploits the low power modes of wireless transceivers, whose components can be switched off for energy saving. When the node is in a low power (or "sleep") mode its consumption is significantly lower than when the transceiver is on [2,3]. However, when asleep the node cannot transmit or receive packets. The duty cycle expresses the ratio between the time when the node is on and the sum of the times when the node is on and asleep. Adopting protocols that operate at very low duty cycles is the leading type of solution for enabling long-lasting WSNs [4]. However, this approach suffers from two main drawbacks: (1) There is an inherent tradeoff between energy efficiency (i.e., low duty cycling) and data latency, and (2) battery operated WSNs fail to provide the needed answer to the requirements of many emerging applications that demand network lifetimes of decades or more. Battery leakage and aging deplete batteries within a few years, even if they are seldom used [5,6]. For these reasons, recent research on long-lasting WSNs is taking a different approach, proposing energy harvesters combined with the use of rechargeable batteries and super-capacitors (for energy storage) as the key enabler to "perpetual" WSN operations.Energy-Harvesting-based WSNs (EHWSNs) are the result of endowing WSN nodes with the capability of extracting energy from the surrounding environment. Energy harvesting can exploit different sou...