I have seen many projects where the Arduino is just powered right off the vehicle 12V, but personally I would put a 9V regulator (LM7809 would be fine) before the Arduino and some big smoothing caps and place it as close to the Arduino as possible. Use 25 to 50V caps on the side towards the car battery. A 1000uF to 2200uF cap. With this and the regulator, it should protect the Arduino. The 7809 can take a voltage up to 35V.For the solenoid power itself, just connect that to the vehicle power directly and switch it with whatever flavor you like such as an automotive relay, SSR, etc... In a bit of over-engineering, you could use an optoisolator on the Arduino output to ensure voltage spikes don't somehow make it into the Arduino. Or even just a 5.1V Zener between the output and ground (or even just a diode in series since it is always an output to prevent current from entering.)Again, this is probably not really necessary, but those are suggestions to protect things and parts are cheap. They would go in my own design. And likely will soon, as I have a trip computer planned in the near future.If the switches are wired all in series, all switches would need to be closed at the same time. Make sure the switches use the same ground that your Arduino uses. I'm not sure what you mean by a relay on the switches. A switch just closes or opens a circuit. It doesn't generate voltage on its own. However long wires in the car may develop large spikes of current on them. Again a zener would help here. It would just go between the Arduino pin and ground. That would sink any volatge over the 5.1V to ground and away from the Arduino. Or you could use optoisolators here as well, but you would need to provide voltage to the switches on the other side of the the opto isolator. Go with a zener to keep things simple.Just keep in mind that if you do wire the switches in series that they all need to be pressed at the same time to register. So lay them out accordingly so that all CAN be activated at the same time. You could not do a specific sequence this way. And realize there is a chance that it could be accidently activated this way unless you layed it out in some way that it would be very unlikely that all switches would get pushed at the same time (for example by people sitting across all the switches at once.) It would certainly be simpler to wire up and code that way, though.
Your stock button is likely to be getting pulled up and is shorted to ground when pushed. So, the negative side of the switch would always be at ground. The main consideration here is not to disturb the functionality of the original switch (I assume that you would still like to be able to use your rear defroster.) I would tap off the positive side and use a comparator. Your other options are a relay, and you would connect the coil to the positive side as well, but that would mean the coil was always energized until the button is pressed. And it may draw enough current that it is sensed as a switch pressed. A zener diode is another option, but may end up also drawing too much current (a zener will conduct when the voltage is above its threshhold.)A comparator will have a high enough impedence as to not disturb your stock circuit.
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16