You need to find a supply fed from the ignition switch that is only live when the key is turned. Something like the ciggy lighter/accessory socket.
Have you got a multimeter? Makes life a lot easier.
Have you got a multimeter? Makes life a lot easier.