If you are unfamiliar with active headlights here is a description of what they are.
Active headlights come in 2 different versions one version uses an LED array coupled with local dimming type control to aim or point the lights in the direction of travel. The second type use servos to physically move an HID projector that is inside the headlamp housing. The first use of curve active headlamps was in a vehicle made by Tucker. They used a mechanical connection to the steering linkage to move a 3rd headlamp housing located in the center of the vehicle.
With the wonderful world of technology we live in there are systems in a vehicle that can be communicated with to collect bits of information that allow this to be done electronically instead of needing a mechanical connection to the steering linkage.
My project is retrofitting a curve active system and also a horizon active system to the factory reflector single bulb headlamps on my 2008 Pontiac Solstice.
I have been working on this project for about a year now and had to learn many new things. I am extremely ambitions and I decided that I wanted to add 2 projectors to each headlamp housing. There was no way I could fit 2 projectors, 2 bulbs, 4 servos and also the electronics inside of the stock housings. I had to come up with a way to make the housing larger and I wanted to keep it made of all of the same materials as the stock housing. I took the stock housings apart and removed the reflector assemblies. I then cut the back of the housing out leaving only a little bit of the original housing. The little bit was the part that seated to the lens. I then friction welded on flat pieces of the same plastic to come up with a basic shape. One I had that basic shape I created a mold by filling the inside with Bondo. I refined the mold and came up with the final shape.
Next step was building a vacuum forming machine so I could use a single piece of plastic to make the back portion of the housing. That piece I then friction welded to the little bit of original housing that was left.
After working out all of the mechanical bits and making the components needed to move the projectors I moved onto the electronics. I decided that I wanted to spice up the turn signals and the side marker lights at the same time and I added in a grip of addressable RGBW LEDS . For a prototype I used these off the shelf modules.
ESP32 WROVER with 8mb SPIRAM
4 channel relay module
4 metal gear servos that I modified so I could read the position from them.
PCA9685 16 channel pwm controller
MCP2515 CAN interface
MPU9250 9 DOF MEMS sensor
2 5V 5A regulators
The MEMS sensor is used to calculate the pitch and roll of the vehicle. That is what I am using to lock a set horizon. So if I drive over a speed bump when the front tires go over the projectors will pitch down and when the rear tires go over the projectors will pitch up.
I am using the CAN interface to collect the steering angle from the ESC (Electronic Stability Control) system in the vehicle. I am also collecting the vehicle speed and transmission gear.
I wired everything up and got it all running but man o man is it UGLY! I have decided to design a right proper board with everything on it. I have done several revisions of the board starting off with being able to just plug all of the existing modules into the board. That design would be a really tight fit. so after some thought and a lot of reading I decided that I want to only have a single board in each headlamp and all of the components are mounted to that one board.
I need some help with this aspect of it as I am not an electrical engineer and trying to understand what I need to do for different aspects of it by reading the things I can find on the internet is simply not working.
I want to ditch the use of mechanical relays and use MOSFETs instead. I need to be able to use a +5v signal to turn the MOSFET on which will couple a +12V to +15V source to a device. The maximum amperage is as follows.
HID ballast 1 - 15a
HID ballast 2 - 15a
high beam shutter solenoids - 10a
5v regulator - 10a
5v fan - 0.07a
I am not 100% sure on how to design the “MOSFET relays” I have a basic idea but i am not sure how to go about calculating resistors. I know I am going to need an NPN BJT and a P channel MOSFET for 4 of the relays and the one for the fan because the current draw is so low I should be able to use just an NPN. The issue with the fan is the load is not a constant so I am not sure how to select the resistor(s) needed.
The other thing I need some help with is designing 3 voltage regulators. They all need to be able to take an input voltage from 10v to 15v. One needs to output 1a @ 3.3v the second needs to be 1a @ 5v and the 3rd needs to be 10a @ 5v. All of the schematics I am able to dig up have a pot to set the output voltage, this is not going to work and I need something that is hard set.
I am going to continue to use a module style MPU9250 because of the lack of availability for the IC.
This is the list of IC’s that I will be using.
ESP32 WROVER - processor
PCA9685PW,118 - servo pwm controller
PCF8574T/3,518 - i2c IO expansion (provides the +5v for the relay triggers)
MCP2562-H/P - CAN transceiver, the ESP32 has a built in CAN interface that I will be using, This is not SMD because none are available from supplier and I am using the 2562 because it is powered by 5v but has a v-ref pin to set the logic level for the pins that connect to the processor, the processor pins are 3.6 volt tolerant.
I will also be using the following resistor arrays
4310R-102-331LF - 330ohm, 5 resistor, isolated (voltage divider)
4310R-102-101LF - 100ohm, 5 resistor, isolated (voltage divider)
4608X-102-221LF - 220ohm, 4 resistor, isolated (servo PWM lines)
4604X-102-103LF - 10kohm, 2 resistor, isolated (I2C pullups)
The voltage divider is for sensing ignition, high beam, low beam, turn signal and parking light from the vehicle. I need to bring 15v down to under 3.6 volts.
I found a schematic for making the MOSFET relays for 4 of the relays using a FQP47P06 MOSFET and a 2N3904 NPN BJT the issue is the 2N3904 is no longer made and I do not know how to make adjustments to be able to use a different NPN.
For the fan relay I was thinking of using a BC33716BU NPN but my issue here is calculating the resistor value because the load is not going to be a constant, it is a PWM controlled fan and I would like to be able t adjust the fan speed. I am going to be using a 40mm x 40mm x 10mm Noctua 5V PWM fan.
I am OK with SMD parts as I am planning on having the assembly done as I do not have the proper setup to mount SMD parts cleanly.