## 4 The SensoTube Architecture's Implementation Reference Model
### Expandability and Inter-Layer Services Mechanisms
#### 4.2.4 Inter-Layer Energy Management Service Mechanism  
The power of the shields has been designed so as to ensure the maximum versatility in development and experimentation. In particular, there are ten independent connection pins at the S-BEC 2 (see Figure 11), which provide all of the functional shields with the necessary voltage sources. The maximum current rating per BEC's pin is around 5 A and it is more than enough for the vast majority of the WSAN systems in agriculture or other similar application domains (e.g., forestry, environmental monitoring, etc.).  
In addition to the above typical power supply mechanism, an additional mechanism has been introduced, referred to as the P-BEC. The P-BEC has been designed so as to allow the functions of in-system monitoring and control of the energy in a WSAN node. The implementation of the P-BEC incorporates a \(2\times 8\) pins BEC. As shown in Figure 22a, the upper pins of the BEC are routed to a row of through-hole pads. The lower pins of the BEC have to be terminated at a PML shield. To ensure standardization in design, certain voltage names have been given to the lower eight pins of the BEC, i.e., +3.3 Vdc, +5 Vdc, V_BAT, and V_AUX0 up to V_AUX4.  
One or more of these voltages can be connected to the upper pins of the BEC by another shield, e.g., an ETL shield, which can monitor and control the energy flow to other shields. Next, with the use of a dual-pin-header (P12 in Figure 22b), any shield can select one of the available voltage sources from the BEC. The pins of this pin-header can either be shorted by the use of jumper, in order to directly provide the voltage source to the circuits of the shield, or help the engagement of various circuits for current monitoring and/or circuits for switching ON and OFF the energy flow. Although, the feature of breaking the voltage supply signals path in order to measure the flow of currents is known in the embedded systems design area [150], the integration of this technique into the WSAN systems is new.  
Figure 23 illustrates the sheet symbol of the schematic drawing of the P-BEC mechanism. The complete schematic drawing file is given in Figure 24. Signals with the \"_In\" post-fix are considered as potential power signals to the shield, whereas signals with the \"_Out\" post-fix are those that coming from any other shields, e.g., from a PML shield.  
Figure 21: The J-BEC sheet symbol used as a design template for the incorporation of the J-BEC expansion mechanism in new shields designs.  
Figure 22: The P-BEC mechanism for inter-layer power management services: (**a**) the schematic drawing; and (**b**) the three-dimensional view.  
Figure 23: Selective connection of shield’s signals to S-BEC’s signal by the use of pin-headers and short-circuit jumpers.  
Figure 24: Selective connection of shield’s signals to S-BEC’s signal by the use of pin-headers and short-circuit jumpers.  
Figure 25: Example of monitoring and control of the energy at group and shield level using the P-BEC mechanism.  
Figure 25 illustrates an example of the P-BEC mechanism usage. In particular, a PML shield accepts +12 Vdc and converts it to a +5 Vdc to power any shield that needs +5 Vdc for its operation. The +5 Vdc is then routed to the particular P-BEC's pin. Through the P-BEC an ETL shield can measure the current flowing to other shields that are using the +5 Vdc for their operation. Additionally, the ETL shield is able to switch-ON or OFF the +5 Vdc voltage source. Such features enable the energy management of a group of functional shields. At the shield level, e.g., in the case of a DCL shield, the +5 Vdc voltage can also be controlled and monitored locally. The logical signals that are mentioned in Figure 25 can be digital output signal of the shields' on-board MCUs.