I have never used an arduino or done any electrical or programming ever, but hoping to make a little project to help with my restored car.
My plan is to clean up the indicator wiring by having with 3 switches going in to my arduino and 2 outputs driving mosfets ( to do away with relays and program in a delay)
Inputs
Left
Right
Hazard
outputs
Left
Right
I have a few parts coming to play with and im trying to work out my wiring
All the circuits i come across everyone is using mosfets on the Negative wire, but in cars the lights earth out and running wires back isn't an option.
I have attached a drawing hoping someone can tell me if it will work or point me in the right direction.
Don't use a car 12V supply to directly power your Arduino. The spikes and voltage reversals common to automotive power supplies will kill it quickly. Use a standard car phone charger to produce a reasonably clean (should be clean enough - if unsure add extra filtering and decoupling caps) 5V signal and power your Arduino with that. That charger will have the proper protection circuitry in place.
Then you have the problem that you have to connect grounds to make that MOSFET work: add an optocoupler to the output. Same for the inputs, use an optocoupler.
You can use MOSFETs to switch the +12V line just fine - use a p-channel MOSFET instead.
Do note the different symbols for GND and earth - do not connect those together! It'd negate most of the effect of the optocouplers.
The value of the resistor in the input of U2 is deliberately chosen fairly high, this allows the optocoupler to withstand 120V peaks just fine. It is also low enough to get enough power to the LED (just over 2 mA at a normal 12V) to pull low the output signal.
The PMOS is any power MOSFET, preferably an automotive rate type, that can handle the current your lights require. The gate will be switched at -12V so no need for logic level or so.
Another thing: you may want to add a little buzzer or so to provide the good old "click" signal for your indicators. I've noticed that many modern cars do this, even though they don't use a relay, probably as reminder to the driver that they have their indicators on.
Will be interesting to see how the cancel arrangement is going to work. Also I think you will find a modification such as this will come under the scrutiny of a machinery inspection and possibly a need for certification.
bluejets:
Will be interesting to see how the cancel arrangement is going to work. Also I think you will find a modification such as this will come under the scrutiny of a machinery inspection and possibly a need for certification.
I drove a car for years that did not have an auto cancel mechanism on the indicator stalk even from new. What it did do though was to prevent both left and right indicators to be operated at the same time as they were controlled from a single left/off/right stalk. This is probably more important than the self cancellation.
I did once own a car with semaphore arm turn signals and a previous owner had replaced the original switch with 2 separate ones so it was possible to operate both at once. Mind you, as neither worked reliably it made little difference if both were operated at the same time.
You should be aware that the Atmel datasheet state as follows:
Unless specifically provided otherwise, Atmel products are not suitable for, and shall not be used in, automotive applications.
And IMHO if you plan to use the car in a public place you should get written agreement from your automobile insurer before you waste time or money on an Arduino project.