Controlling 12V dc truck lights with a 16F690 microcontroller

Thread Starter

JDR04

Joined May 5, 2011
367
Hi Folks, please could somebody help me with this.

I have several 12V dc truck trailer lights of different colours. I would like to control these lights on and off, flashing etc.

What I need to know is what is the best method I can interface these 12V dc lights with the microcontroller? All suggestions will be appreciated. Thanks a lot.
 

Papabravo

Joined Feb 24, 2006
21,159
Hi Folks, please could somebody help me with this.

I have several 12V dc truck trailer lights of different colours. I would like to control these lights on and off, flashing etc.

What I need to know is what is the best method I can interface these 12V dc lights with the microcontroller? All suggestions will be appreciated. Thanks a lot.
Logic level MOSFET, available from Digikey
P-channel - https://www.onsemi.com/pdf/datasheet/nds356ap-d.pdf
N-channel - https://www.onsemi.com/pdf/datasheet/fdpf320n06l-d.pdf
 
Last edited:

crutschow

Joined Mar 14, 2008
34,281
Are the lights controlled by apply 12V or by grounding them?

If it is by applying 12V, then you will need a P-MOSFET along with a level shifter driver (e.g. NPN transistor) to go from the microcontroller voltage to 12V.

If you ground the lights, then you can use an N-MOSFET with no driver.
 

dl324

Joined Mar 30, 2015
16,845
I have several 12V dc truck trailer lights of different colours. I would like to control these lights on and off, flashing etc.
Is this for an off-road vehicle? Or something that would be regulated by federal, or the equivalent, transportation laws?
 

Papabravo

Joined Feb 24, 2006
21,159
STMicroelectronics has packaged, automotive-rated, fully protected high side and low side drivers that are 5V CMOS compatible. Easy to use and bulletproof. I have used the ones in the attached datasheets with success. There may be newer versions.

Good luck!
We used the VN340 from SGS-Thompson, the predecessor of STmicro, in industrial control products and were very happy with it.
 

splud

Joined Jun 30, 2013
38
Project requirements should be made clearer: voltage rating and current consumption of the lamps (incandescent, bare LED, or LED with "built-in" resistor for 12V operation?), whether they are to be independently controlled, or switched as a number of lamps in parallel?

N-FET low side switching is certainly easy. If you have a lot of [independent] devices to switch, does your microcontroller have the requisite IO ? You could use a latched shift register (74xx595) - or several in series - to drive more transistors from just three IO pins on the micro.
 
Last edited:
Top