Wind power arduino

  1. Use a diode to prevent the battery from feeding back into the anemometer.

  2. Measure the battery voltage with a voltage divider.

  3. When the battery voltage reaches the limit for that battery's chemistry (e.g. 4.2V for a lithium cell) burn power through a dummy load (light bulb, etc.) to keep it under that limit.

Regarding calculating the state of charge (percent power left) of the battery, the easiest way to do that is with a lookup table. Find a graph showing voltage vs. state of charge and use something like multiMap() to convert that to a percentage of life.