=> Raspberry pi 3 model B powered with car battery I have two questions :
1- How can I calculate car battery life ?
2- Is their negative impact for the start-up of the vehicle when I use his battery when the car is powered off ?
An average sedan car battery can provide about 45 Amp Hours at 12 Volts.
The Raspberry Pi 3B has a maximum current draw of about 2 Amps at 5 Volts.
For a simplistic guesstimate, you can simply divide:
Please note that this guesstimate is on the high end of plausible. Lead Acid batteries do not discharge linearly.
This depends on how everything is connected. When a vehicle's ignition is placed in Start, the accessories are all turned off. The only thing receiving power is the starter motor.
So, if you've hooked up your Pi through the accessory circuit, the Pi won't affect starting at all. However, the Pi will also lose power during an ignition event.
If you've configured a voltage regulator circuit that provides 5 volts directly from the battery, than the Pi will draw current at all times even during an ignition event.
In the direct battery connection scenario, the 1 or 2 Amp draw is unlikely to affect ignition if the ambient temperature isn't too extreme. However, the voltage across the battery may drop as the starter motor begins to turn. So, the Pi's supply voltage may become erratic causing unexpected behavior.
In either case, the Pi will certainly drain the battery over time and lower the overall battery's lifetime.