# A Power-Line Communication System Governed by Loop Resonance for Photovoltaic Plant Monitoring
## 2 Materials and Methods
### Electronics Designed  
The central hub of the PLC configuration was the PIC16F1615 8-bit Microcontroller (MCU). A simple ASK modulation scheme was used. For a minimum cost and for simplicity an integrated comparator within the microcontroller has been used as a reception device. For transmission, the switching mechanism for modulation was derived from the MCU working in conjunction with the TSM8588 CS_A1811 push-pull MOSFET integrated circuit (IC), with an n-MOSFET and a p-MOSFET encapsulated together. This way, a minimum number of external components are needed, and the main working load relies on the microcontroller and its firmware. Figure 1 shows the schematics of the TX-RX electronics. The microcontroller is placed in the center, with the detail of its integrated comparator along its two analog inverting and non-inverting inputs, and the two digital outputs used for driving the TX power amplifier. Regarding the TX section on the right of the figure, the two digital outputs drive the MOSFET gates. The two MOSFETs are connected in a push-pull configuration between the positive and negative leads of the solar module, so a TX amplitude equal to the module voltage can be achieved. Two resistors (R5 and R6) between gate and source provide a way for gate charge evacuation, improving the switching speed. The n-MOSFET is driven directly from the microcontroller output since the switching thresholds of the MOSFET are digitally compatible. In turn, the p-MOSFET must be driven from the second digital output through a capacitor, because a DC voltage displacement is needed to trigger the p-MOSFET gate. The digital independent control of the two gates allows for the ease in programming within the firmware all the output signal parameters (frequency, pulse duration, dead times) while specially preventing shot-through during push-pull operation. The value of the two resistors R7 and R8 allows for adjusting the output power sent to the line and determining the output impedance of the transmitter. Finally, the capacitor C3 prevents the DC voltage from the string line to enter the TX power stage. Regarding the RX section on the left, the resistor divider (R1, R2 and R3) provides a bias DC voltage to the comparator input representing a threshold for the RX signal that will avoid spurious switching of the comparator because of the noise at the input line. RX signals are injected from the line through the DC isolating capacitor C2 and resistor R4 to the input resistor R2. Capacitor C1 bypasses resistor R2 for AC signals, improving the input sensibility. When the amplitude of a received signal is over the threshold mentioned, the output of the comparator switches according to the RX signal, and its output can be read by the firmware in a digital fashion and processed for demodulation. The anti-saturation coil (L1) designed and described before is shown also in Figure 1 placed between the positive lead of the String and the positive lead of the solar module, avoiding the flow of the communications signal through the module, and making the performance independent of its working point. No filtering of the output signal has been implemented, because as proved in our field measurements the high Q resonance characteristics of the loop filter properly rejects harmonics out of the carrier frequency chosen. Our general setup for field measurements is sketched in Figure 2, where a PV string is shown with several blocks in series labelled \"A\". Each \"A\" block represents one PV module in the string with its communications electronics and anti-saturation coils connected as detailed in the same figure. In the combiner box the \"A\" block has no PV module connected but just a short circuit in place to allow DC current flow, and in addition in this case the serial port integrated within the microcontroller is activated to receive external commands from a host and to send back diagnostics data to it.