## 2 System Architecture
### Solar Energy Harvester  
The block diagram of the target H\({}_{2}\) gas sensor, including the required external components and the main blocks of the proposed solar energy harvester, is depicted in Figure 1. Four miniaturized nanowire solar cells have been connected in series to be used as the energy source. The main tasks of a solar energy harvester block are battery charging, battery management and energy management. The direct charging method proposed in [6] has been used for charging the target NiMH microbattery with very high efficiency. In this approach, battery voltage (V\({}_{\text{bat}}\)) is compared with open circuit voltage of the PV module (V\({}_{\text{pv}}\)) using a dynamic comparator, and if it is lower, the battery is connected to the PV module to store harvested energy. If V\({}_{\text{pv}}\) drops below V\({}_{\text{bat}}\), the switch between V\({}_{\text{pv}}\) and V\({}_{\text{bat}}\) is kept turned off to avoid battery discharge through the PV module. In the direct charging method that has been deployed for solar energy harvesting, the maximum power point voltage (V\({}_{\text{mpp}}\)) of the PV module should be close to the V\({}_{\text{EOC}}\) of the battery to achieve high efficiency. Although P\({}_{\text{mpp}}\) and I\({}_{\text{SC}}\) of the PV module changes considerably in different lightning conditions, V\({}_{\text{oc}}\) and V\({}_{\text{mpp}}\) of the PV module does not change significantly. In Figure 2, deliverable power of the PV module in different illumination levels has been simulated using the electrical model of the target PV module [12]. In AM1.5, solar intensity is almost 1 mW/mm\({}^{2}\). Although, in 10% of AM1.5, deliverable power is reduced by roughly the factor of 10; V\({}_{\text{oc}}\) drops from 2.35 V to 1.95 V.  
The second main task of the energy harvester circuit is battery management. As the charging current is limited by the PV module, the battery is charged in either standard or trickle charging modes, depending on the illumination conditions [2]. In trickle charging mode, the battery is charged by a small current, and it can be continuously charged after reaching V\({}_{\text{EOC}}\). However, in standard charging mode, the battery charging should be stopped after reaching V\({}_{\text{EOC}}\) to avoid permanent damage to the battery. In addition, to avoid full discharge of the battery that reduces the cycle life of the battery, the battery should be disconnected from the sensor when it drops to V\({}_{\text{EOD}}\). In order to avoid overdischarge or overcharge of the battery in standard charging mode, V\({}_{\text{EOC}}\) and V\({}_{\text{EOD}}\) voltage levels are detected by this circuit. Figure 1: Block diagram of the proposed hydrogen gas sensor. Finally, the last task of the energy harvester circuit is energy management. Since, under reduced light intensity, the power delivered by the PV module may be lower than the average power consumption of the sensor, the energy harvester circuit should reduce power consumption of the microsystem to avoid full discharge of the battery during this period. Under reduced light intensity, the microsystem continues its autonomous operation at a lower speed and with a lower duty cycle. The proposed energy harvester circuit reliably measures energy stored in the target battery and scales the power consumption of the microsystem up or down according to the measurement results. In order to reduce the power consumption and speed of digital circuits, operating frequency is scaled down and data transceiver is activated by a lower duty cycle. Bias currents are also scaled down to reduce power consumption and the speed of analog circuits. In order to reliably estimate the energy stored in the battery, battery voltage is measured when the battery is discharged by a high discharge current. The PV module, with the total area of 28 mm\({}^{2}\), can provide a maximum power P\({}_{\mathrm{mpp}}\) of 2.88 mW at its V\({}_{\mathrm{mpp}}\) in AM1.5 illumination [1].