It is possible or are there any coding for arduino to start charging a 6v lead acid rechargeable battery at 50% and stop charging when it 100%? I use Piezoelectric transducer to charge the battery. Please help me if you know, thank you.
It would be quite straight forward:
- Get voltage associated with the battery at 50% and get arduino to monitor the battery (sample voltage every so often) using a voltage divider and then on detecting voltage is below or at the 50% level start charging( turn on relay or similar)
2)Get voltage associated with battery at 100% and when this is attained stop charging(turn off the relay).
Find out how commercial charges do this - I think they're using the current flowing through the battery as measure, not sure, not a battery expert - and mimic that in your setup.
The hardest part is probably determining the 50% level, especially when the battery is under load/charging at the same time.
Lead acid batteries are pretty resistant to overcharging and most piezo transducers I know of provide very little current. I'd just connect them together and not bother with any circuitry.