I am building AVR based diagnostic device for my old Mitsubishi car
I'm going to recommend a photo-MOSFET and some may say that this is over the top but, automotive jobs can be prone to problems of earthing (mainly avoiding multiple earths and thus avoiding unholy currents passing down wires that are not expecting unholy currents). So, I recommend a photo-MOSFET like this device: -
It's basically an optical replacement for a standard mechanical relay and has an on resistance of 2 Ω, an open circuit maximum voltage of 200 volts (will not be bothered by automotive load dumps) and, can conduct 0.7 amps. It's also bidirectional on the output so, if you get it back to front, it will still work: -
It only needs 3 mA input current to activate this device too but, of course you'll need a series resistor from your IO line.
It also costs virtually nothing in Mouser for your peace of mind: -
And they have plenty in stock with plenty of alternatives.
Of course, if you are willing to have your AVR connected to automotive ground in multiple places then be prepared for tears and anguish. Isolation is an excellent way to overcome most automotive sins.
But do I do this with a transistor controlled by an AVR output pin?
Yes you can but, do it with a MOSFET and use optical isolation methods (as per the above) to avoid multiple connections to automotive ground.