I've successfully used an Arduino to replace my car factory stereo with a MP3 player. The problem I have now is that I want to power down the external amplifier before the MCU turns off. Originally I had it powered using the car's accessory line (controlled by the ignition switch). I have the accessory line going through a power converter circuit to reduce the voltage to 9V and clean up the signal.
So to have a "shutdown" process, I believe I need to instead using the constant 12V line to the battery and use the accessory line to signal a power on & shutdown. When accessory voltage is high, turn on the MCU; when the accessory voltage is low, the MCU can read that and begin a shut down process (which will include powering down the amplifier first).
I think MOSFETs are the solution, and I'm looking at something like this: https://circuitjournal.com/arduino-auto-power-off
My primary power souce will be the car battery (constant, not the accessory) converted down to 9V. Both share the same ground.
How can I integrate the accessory line into a circuit like this?
Thanks.
So to have a "shutdown" process, I believe I need to instead using the constant 12V line to the battery and use the accessory line to signal a power on & shutdown. When accessory voltage is high, turn on the MCU; when the accessory voltage is low, the MCU can read that and begin a shut down process (which will include powering down the amplifier first).
I think MOSFETs are the solution, and I'm looking at something like this: https://circuitjournal.com/arduino-auto-power-off
My primary power souce will be the car battery (constant, not the accessory) converted down to 9V. Both share the same ground.
How can I integrate the accessory line into a circuit like this?
Thanks.