# Wireless Data Acquisition System with Feedback Function
## 2 Materials and Methods
### Selecting Components for a Smart Wireless Sensor  
The ability to configure the number of averaged ADC samples in the INA219 in combination with the output of the result in digital form allows you, in order to control the measurement process, to use an inexpensive MCU without an ADC with a program memory of 2 kB, for example, Attiny2313A from company Atmel (San Jose, CA, USA). The Attiny2313A MCU, for which a block diagram of the Attiny2313A microcontroller is shown in Figure 5, was chosen by the authors because of its ability to operate when the supply voltage drops down to 1.8 V and because of its low current consumption. Even at a clock frequency of 4 MHz, its current consumption at a supply voltage of 3.3 V does not exceed 2 mA [40].  
For similar reasons, to build a wireless sensor, the authors used an infrared receiver TSOP31236 from Vishay (Dallas, TX, USA), capable of accurately receiving IR code messages at a distance of up to 24 m even when the supply voltage is reduced to 2.5 V [41]. A block diagram of the TSOP31236 infrared receiver is shown Figure 6.  
To transmit measured current and voltage values via radio, the authors used the JDY-40 radio module, shown in Figure 7.  
Figure 4: A fragment of the program for calculating the contents of INA219 registers.  
Figure 5: Block diagram of Attiny2313A microcontroller.  
Figure 6: Block diagram of TSOP31236 infrared receiver.  
This radio module was chosen because of its ability to provide a transmission range in line-of-sight conditions of up to 120 m at low supply voltages from 2.2 to 3.6 V, its low current consumption in sleep mode--no more than 5 \(\mu\)A [42], and also the convenience of connecting it to a microcontroller via the UART interface.  
To power the sensors, the authors, in accordance with the concept formulated in Section 1, decided to use autonomous galvanic power supplies. The use of autonomous power supplies significantly expands the freedom of choice of installation locations for sensors in the power circuits of the SWPP, which are at different potentials in relation to the common wire, which is especially important for the series-connected batteries of the SWPP.  
The choice of nickel-zinc batteries PKCELL [43] is due to their increased nominal voltage of 1.6 to 1.7 V and the absence of pulsed DC-DC converters in their composition. Such batteries are not sources of additional electromagnetic interference for the infrared radiation receiver included in the developed sensor, as well as for other control and measurement circuits of the SWPP. The nominal voltage of a battery of two such elements is \(\approx\) 3,3 V and is ideal for powering all components of the sensor. Since most of the time, the most energy-intensive sensor module--the JDY-40 transceiver--is in sleep mode, the average current consumed by the wireless sensor does not exceed 2.4 mA, and the continuous operation time from one set of batteries is at least 1 month. When the power supply is discharged to a voltage below 3.05 V (that is, approximately two days before the failure of the most power-critical node), the sensor automatically includes the \"Supply is low\" signal as part of the information byte with the sensor number. This fact is continuously displayed and logged at the receiving end of the radio link along with measurement data and time stamps. Replacing the power source during a pause between transmissions of information packets takes 1 to 2 s and does not disrupt the monitoring process.  
Figure 7: JDY-40 radio module: (**a**) appearance of JDY-40 radio module; (**b**) JDY-40 pin definition.