there must be a low dropout regulator (LDO) that can work with a difference of about 0.5v, maybe someone knows some models to recommend
Alex
Even then, if the battery becomes discharged below 12.5V, the regulator will drop out of regulation and the output will fall.
What is it that you want to run from this circuit? Are you just trying to ensure that it doesn't receive a voltage above 12V? Will it tolerate a range of input voltages, say from 10 to 12V? If so, you can go ahead and use a suitably rated LDO. When the battery is full, above the LDO's dropout voltage, the supply will be regulated to 12V. When it falls below the dropout voltage, the output voltage will fall as the battery voltage falls.
If you really need to ensure that the output is exactly 12V, with an input that can be either above or below 12V, then you will need some form of buck-boost circuit, which is probably more complicated than you want or need :wink:
Edit: As an example, a quick search found the Micrel MIC29151-12WU (
**broken link removed**) which has a dropout voltage of ~0.2V (worst case 0.6V) and can supply 1.5A. With this, you could achieve a regulated 12V until your battery voltage fell to 12.2V. Of course, it costs a bit more than a bog-standard 7812 but you get what you pay for!