A single nail, although good for demonstrating a simple electromagnet is not a complete magnetic circuit. It has two open ends instead of a completed magnetic circuit and so what you have is an inductor rather than a transformer. It has a very wide magnetic gap which is good for storing energy...
If your battery is 12 Volts, it is usually better to have at least twice the nominal (12V)
voltage rating of photovoltaics (Solar panels) coming into the MPPT controller.
This is because the Vmp of the modules can get so close to the battery voltage
that there is just not much voltage...