I have a general problem with that. If someone just copies what I do, they don't have the ability to repair or tailor it to their exact needs, all advantage is lost. My camp system is quite complex operating a half dozen devices with multiple control loops. I can break parts of it out, without actually testing I can never be sure they are fully functional. I am only in the development phase when at camp about three weeks from now for the next couple of months. I can tell you I'm working on a universal board right now that will support many of my core programs like refrigerator, MPPT controller, linear current booster for running a pump without a battery, and water heating. My system currently runs on multiple arrays the highest voltage string is 36V. I am going to buy 3 grid type panels so I can test without interrupting my home system. I will make all these programs available as they are verified.
If you use the micro for only heating water you are wasting the power of this device.
Here is the basic concept of my water heating. A capacitor bank is used to short term store energy from the solar panel. When I mean short, less than 1/100 sec. This is the premise of every power supply, storing the peaks of every cycle to supply power in the valleys. Multiple capacitors are used because general consumer capacitors are limited in ripple current to less than an amp. This current causes heating of the capacitor which shortens life. More caps, the less current in each cap, less heating and longer life. This is the same principle that the techluck works on. They only have three caps and they will not last long. If someone has this system add an external capacitor bank. Solar panels are current sources. That current will add to the capacitor current and you can have peak current at the MPPT voltage for the given resistance it is connected to. That power is dumped with PWM for a duty cycle, 5% to 100% depending on how much current the panel produces.
This is where the arduino comes in. It measures the voltage on the capacitor bank and a simple decision is made, is the voltage higher or lower than the setpoint. It has an analogWrite function to create PWM duty cycle 0-255. So a simple counter is used that increases or decreases the count depending on voltage read each loop. The loop is slowed down so the system has a chance to respond. More than fast enough to respond to clouds.
I count up to 3 X 255. The first 255 turn the first element on. If the number gets larger the second heater is also turned on. When top heat is high enough the first heater is turned off and all energy goes to lower second heater. If that turns fully on, the top heater begins coming on again until the high limit temp is reached. Then a small PWM is enabled equal to tank heat loss.
The power electronics is quite simple. I use opto isolators for voltage level shifting. The micro is 5V and that drives the LED through a resistor. The transistor of the opto pulls the gate up to 12V. Those data sheets always give the resistance with at least 10V of drive. They need to be slammed hard to pass current without heating. Optos are slow, the reason we drive them at low frequency. Trade off is a bigger capacitor bank (not that big or expensive) for non critical part layout, no EMI, and minimal parts. Here is the basic schematic of the heater driver. My fingers are getting tired.