Project:
To use an Arduino to control automotive lighting in as flexible a manner as possible. The initial implementation will be as a turn signal flasher replacement, and it will eventually be usable to manage headlights and other lighting fixtures in an automotive environment.
A previous topic dealt with using an Arduino to control p-channel power MOSFETs using PWM rates from 980 to 2500Hz.
This topic will deal with the human switching and power management bits.
Goals for this topic:
-
Human switch management (2 switches: 1 provides power; 1 goes to ground)
-
Power management (manage plus/minus 5-120V down to plus 10-18V at up to 20A)
Tasks: -
Mitigate voltage spikes
-
Manage (hopefully eliminate) voltage transients above 16V
-
Prevent reverse polarity
-
Disallow less than 10V
-
Switching logic to manage a +12V switch and a ground switch to enable power
Proposed circuit:
Description:
- Everything to the left of JP1 through JP6 is inaccessible; nothing can be changed here. (Nope; nothing. Don't even think about it.)
- C1 mitigates voltage spikes
- TVS1 (3KP16CA) manages (redirects?) voltage transients above 16V
- Q1 (IRF4905) prevents reverse polarity.
- Note*: C1, TVS1 and Q1 will be repeated just to the right of JP1.
- D3a (1N4740A) passes anything above 10V; turns Q2 off (allows Q4 to turn on)
- S1 turns Q3 off (allows Q4 to turn on)
Logic: We must have more than 10V and S1 must be closed for Q4 to turn on. - Ra and Sa1/Sa2 are place-holders for the Arduino's power management, the Arduino, and the PMOSFETs it uses to manage Ra1/Ra2.
- S2 is supposed to have the same effect (allow Q4 to turn on). See question below.
- Ra1 and Ra2 represent the loads I'm trying to manage with this project. Current draw is going to be anywhere between 20 and 150 watts each.
EDIT (2017-03-02) I was not clear on the logic required to turn power on using this circuit. Here is the logic table:
10V S1 S2 Q4
--- ------ ------ ---
no [i]any any[/i] OFF
yes open open OFF
yes open closed [b]ON[/b]
yes closed open [b]ON[/b]
yes closed closed [b]ON[/b]
Concerns/questions:
-
What needs to be done to have S2 behave the same way - have the same result - as S1? There is likely a very simple answer to this one, but I appear to have hit a brick wall.

-
Can the zener (D3a) be used the way I have it?
-
Q1 and Q4 are going to need to be able to manage up to 20A. At an RDS(on) of .02 Ohms, this means they'll dissipate about 8 watts. This will require heat sinks. I have exactly zero experience with heat sinks; I have no idea how large these need to be. I do have some like this:

Would these be sufficient? If not, descriptions and pics of something would be helpful. -
Are D2 and D3b even needed?
-
I'm a little concerned about quiescent power consumption - the amount of power consumed when S1 and S2 are both open. This needs to be minimized as much as possible.
-
I've been reading up on TVS diodes. I still cannot figure out their practical applicability. For example, Littelfuse's 3KP16CA's specs are VR of 15, VBR of 16.7 to 18.5, and VC of 26. What is the max voltage I'll see at Q1's drain?
To be done/added: -
The Arduino needs to know the state of S2. I've been thinking an optocoupler as the primary interface, but there's little point in pursuing this until I figure out how to get S2 to function.
-
It may be worthwhile to let the Arduino know the state of S1 also.
-
The wire runs from JP5/6 to Ra1/2 are highly variable and could be up to 3 metres. It has been suggested that I employ a snubber or a catch diode. I don't (yet) know enough about either to determine if they can be added here. Note though that whatever is employed, it has to occur within this circuit. I.e. It has to occur before the longish wire runs and the (possibly inductive) loads.
NB There was a tendency in my previous topic on PWM control of PMOSFETs for some to suggest the use of n-channel MOSFETs. While they wound up not being included there, I was hoping there might be opportunities to use them in this topic. If anyone has suggestions on how to incorporate them here (providing parts count is not higher than any p-channel solutions), I'm all ears.
Like in other topics, I'm very much looking forward to learning from the amazing crew here. ![]()
Cheers!
Dirk



