Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Switching 12V vehicle headlights with Arduino / Mosfet combination

Status
Not open for further replies.

VanDerMax

New Member
Quick intro: a ground level noob, started to tinker with electronics at the beginning of this year after I couldn't get any electronics shop in my town replace my bike's gauge cluster SMD LEDs. I bought a trash soldering iron and looked at few tutorials and did the job myself - surprisingly it worked, but I bought too bright SMD's and I didn't like the temperature of the color, so I thought about if there's a way to have it adjustable at all times.

I discovered addressable leds, drivers, ESP32's and all that, and eventually installed the addressable LEDs in the cluster, controlled wirelessly via phone app, and now I'm looking to make a new project.

I learned few things about mosfets, I managed to assemble a code for Arduino IDE that controls the LED the way I want, and tested the 12V 25W LED bulb on my desk with bench power supply and Arduino hooked to buck converter, with the LED bulb controlled with a breadboard size pushbutton and a mosfet. I bought the wrong (high Rds, not logic level) nMOS at first, but learned to read some specs and got IRL2203 that operates the light and keeps cool with no heatsink.

The challenge is how to install it in the vehicle while keeping the original controls intact and without adding anything extra. I am going thru YouTube vids on schematics and trying to figure out where in the "headlight circuit" should I tap in with the Arduino and mosfet. One thing that kind of worries me now, I'm starting to think I planned this wrong going with the nMOS and all, I highlighted all the headlight-relay wires and it seems that pMOS would be the correct choice to tap into these wires, and accessing ground wires for nMOS would be too challenging?

As I'm not well versed in these, please let me know what can I do here.

One idea I had was completely remove headlights from the circuit, from the relay and everything, and run a separate circuit from headlight fuse? Just thinking out loud :D Let me know how would I go about solving this :) cheers

Sy30fyW.jpg
 
What is the Arduino there to do?

If you want to tap into the original controls, and have some replacement lighting, there is no need for any logic to turn things on and off. Just power the circuit when light is wanted.
 
You seem to have traced the circuit. The dip beam lamp is fed from the light switches. The main beam switch comes from the dip beam circuit and powers a relay. The relay powers the main beam lamp and the main beam warning light.

You should be able to connect the 12 V 25 W LED bulb in place of either main or dip lamps with no other changes.
 
Yeah I traced the circuit trying to figure out how to tap into the existing circuit - and leave the existing commands - and have it all working.

My test setup consists of Ardu and IRL2203 so for example "high beam / low beam" buttons should be on Ardu pins to drive the mosfet for switching them - and there's a Passing switch which acts like a pushbutton on the high beam, basically as long as you have it pressed, the high beam is on...this is also something I would run via Arduino and nMOS but the more I ponder on this the more is looks like half of the circuitry is to be replaced :D

Tapping into highlight fuse seems the fastest way to go here.
 
I still can't see why you are looking at using the Arduino at all. A 12 V LED light will work when connected to power, exactly as the 12 V 55 W bulbs do at the moment.

If don't want to change when the headlight turns on and off, there is no point in changing any wiring.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top