I sent this link to a friend of mine, here are his notes as well:
It looks great so far. Only a few notes:
- You're going to want pull down resistors on those inputs from the 3.5mm jack (on the Arduino side). When it disconnects they will be floating, and that can result in unexpected behavior.
- Obviously make sure the relay can take 25Amps (you may consider a solid state relay). Actually, I would make sure it can take a lot more than that. You typically want about 20% overhear at the least, but with so many unknowns I would make that even higher.
- Test the voltage stability during the ignition and disconnect. High loads like that, coupled with the ground shift may cause problems (like an MCU reset). If there are any issues with it you should be able to filter it out with a cap.
- 78xx regulators kind of suck. Check out something like the tlv70450. Also, I believe the arduino runs at 5V, not 6 (I may be wrong on this though).
- Your code for the piezo won't work the way it is, it will just pop every 18 seconds. You need the output to oscillate. The 255 will just peg the output to a full 100% duty cycle. Drop it to 50% and it should work, and then you can increase it from there if the volume needs to go up. This will also default to ~500Hz, but there are libraries to change the PWM frequency for the analogwrite command. If you care about the 3sec every 15 sec, change the second delay to 12k.
- The timing look you have for the 3sec of noise every 15sec won't work exactly like that. What you have is 3sec for every 18 sec; just change your second delay to 12k.
- I require videos of anything awesome that happens with this.
Hope this helps a bit, let me know if you want me to clarify anything.