8th Generation Honda Civic Forum banner

J-RO'S ADAPTIVE XENON LIGHTS: THE PROJECT

77K views 196 replies 78 participants last post by  kou 
#1 · (Edited)
J-ro's Adaptive Xenon Lights: The Project

J-RO'S ADAPTIVE XENON LIGHTS: THE PROJECT

I have been working on this project for about a month now, and I thought it’s about time I share what I’ve been doing for the past while. This started with my original xenon projector retrofit, which already has a DIY on the DIY list. I wasn’t completely satisfied with the result; functionally, it works very well, but there are some cosmetic things that bug me. I began thinking about redoing the lights with the ever-popular TSX projectors, but then my mind began wandering and I started to think about how I could take it a step further. So I decided to try xenon adaptive headlights, i.e. the lights in luxury cars that turn when you turn the steering wheel. I thought it would give the project some originality and would make them look even better.

Theory:

The theory behind adaptive lighting is fairly simple; the hard part is making that theory work, electronically and mechanically. Basically, you feed signals from the steering and the speedometer into a microcontroller, manipulate the data and spit it out to servomotors that actuate the projectors. OEM systems also monitor the yaw rate of the car, which I feel is getting overly complicated for this DIYer, not to mention a bit unnecessary. Servomotors are great for times when mechanical positioning is required. Unlike a regular motor, servos don’t respond to inputs by changing speed; instead they change their position, and because of this, servos don’t spin the way we think of normal motors. One disadvantage though, is that servos can’t be connected to simple DC signals. They can only operate by reading the length of short incoming pulses, and interpreting them as a position.

Stage 1: Electronics

The first part was to find servomotors that would suit this project. Fortunately remote-control-type servos (“RC servos”) are relatively common, small in size and powerful enough to provide sufficient torque to turn the lights. The second was to find a microcontroller. I have some experience with BASIC Stamp microcontroller kits from university, so I bought a BASIC Stamp 2 kit. The remaining electronics required were resistors, capacitors, LEDs, a power regulator and a breadboard for prototyping.
The beauty of the stamp is that it is a very user-friendly device. It can accept any type of data, manipulate it in any way you want via a program you write in PBASIC (a modified version of BASIC), and output the data to provide any kind of control imaginable. One benefit is that the stamp is very good for controlling the servos since both the stamp and the servos are digital devices and so they work together very easily. Some problems arise with the input data. Since the stamp is purely digital, it cannot directly measure any analog signal, which unfortunately, is the vast majority of input methods, including resistance (potentiometer for steering angle) and voltage (signal from speedometer). Therefore another charge-discharge analog circuit must be made so that the stamp can measure the timing of pulses on the analog circuit to interpret that data, basically indirectly measuring the analog signal via time.
Some issues I had included:
- having to include an outboard 5 VDC regulator to power the servos, since the 5V output on the stamp couldn't provide enough power to run the program as well the motors (stamp output only provides about 100 mA of current)
- having to find a precision potentiometer since the original one couldn’t provide nearly enough resolution to get smooth motion out of the servos
- wiring and timing the analog circuits correctly to input the data from the potentiometer
- managing to integrate a “reverse” function – I thought this would be a good idea, since you want to light up the other direction (the direction you’ll be going when you shift out of reverse) when you’re backing up

On to the pictures:

Below is a picture of the overall electronic setup. I am very confident in this setup, and if anything changes, it will be very minor. The program is also nearly complete; I only need to work out minor bugs with the reverse function (the program is now sitting at 124 lines of code, not including comments). From left to right: the servomotors (“left” and “right”); the breadboard with the stamp on the left (note the green “power” LED and the two red LEDs for monitoring "left" and "right" inputs), the precision potentiometer (blue); the speed input (another potentiometer for now); and the 9V power supply.



Next is a close-up of the inputs (the wires on the blue potentiometer aren’t crossed, they just look like it).



Next is a close-up of the servos (brown wire is ground, red is +5V and orange is the signal input).



Lastly, a close-up of the breadboard. It’s hard to see because of the flash on the camera, but the green power LED is on, as well as the left LED, signaling that the program is interpreting the incoming data as a “left turn” and outputting the appropriate signal to the servos.



Finally, I included a video of the servos in motion. I included a “window” threshold on the centre position of the servos, to keep them from “jumping” left and right (never finding centre), which you can see in the video. The benefit is that this “snaps” the servos to their centre position, which prevents them from moving when the driver is turning the wheel very slightly (such as when correcting position to stay straight, which happens all the time). I also programmed the servos so that the “outside” motor (left motor during a right turn, and vice versa) moves half as much as the inside motor, which you can also see in the video. This is to broaden the arc lit up by the lights. One final note, the sound made by the servos isn’t nearly as loud as it sounds in the video, and once buried underneath the bumper and in the noise of normal traffic, it will be totally inaudible. Also, the motion of the servos is normally much smoother; it's difficult to turn the potentiometer and hold the camera at the same time :)



The final steps for the electronics is to etch my own circuit board, mount the components with the stamp (loaded with the final program) into a case mounted underneath the driver’s dash and locate and splice the signal to the speedometer.

Stage 2: Mechanics

The three key components that need to be added between the servo and the projector are a “base plate” to mount the servo under the reflector, a shaft to attach to the servo that runs up into the reflector area of the headlight and a bracket to mount the projector onto the shaft.
The base plates for the servos were fairly easy, except that the servo must be kept level with the ground; since the headlights are angled, I needed to figure out what the angle was so that the servo would end up level with the ground. I determined that the angle was 5°, and so knowing that, I machined the rectangular blocks below out of ABS plastic with the 5° angle, a large hole for the shaft from the servo and four mounting holes for the servo.



Here is one of the servos mounted to the base plate with a circular adapter that came with the servo. I’m not sure what the adapter is really for, but it will come in handy for mounting the shaft.



Below are the two brackets for mounting the projectors. I machined them out of 1/8” 6061 aluminum plate and bent them 90° using a finger brake. I thinned the ends to minimize the amount of material that is pinched between the two halves of the projector. The beauty of this is that I would like a slightly bluer color out of the lights, but I don’t want it badly enough to warrant spending the money on 6000K bulbs. With the bracket supporting the projector between the two halves, it also acts as a color mod. The bracket is about 0.040” thick where it is pinched by the projector, which is about the thickness of one #8 washer, which will provide a minor color mod (thanks for the info, caveman74 :))



The next picture shows how the bracket sits in the back half of the projector.



The next picture shows how the projector sits with the bracket attached and the two halves bolted together. In the picture, I am holding the projector because the weight of the glass lens makes the projector want to tip forward. This also makes me a bit nervous because with so much weight at the front of the projector, vibration and metal fatigue in the bracket may start to become an issue. This is where I could use some suggestions. My idea right now is to make bronze rails for the metal rim of the projector lens to ride on (bronze has very good wear resistance) but something simpler would be better.




  • 01-09-2007: I will add pictures of the shafts once I get them machined. I’m still debating between ABS and aluminum for those parts.
    Long term problems that I foresee:
    - fatigue and vibration in the projector and bracket, as mentioned above
    - some kind of moveable cover for the projectors (needs to be aesthetically pleasing); currently considering black buna rubber (wrinkles?) or a rigid cover with a slide attached to the projector
    - sealing the back (big problem); currently buna rubber sheet is my only idea since it is very pliable
    - longevity of the servos (no idea!); should consider making the servos replaceable if necessary

  • 01-31-2007: new ideas for mechanical operation on page 7.

  • 02-03-2007: Final program complete. See post #70.

STILL UNDER CONSTRUCTION...



*Feel free to offer suggestions... I’m always open to ideas for making the project better!
 
See less See more
10
#5 ·
^^^Thanks!
Unfortunately I don't think this won't work for an existing retrofit, Jester. I assume that your projectors are glued or somehow permanently fixed in the housing? If you could separate the projectors from the housing, then you might be able to make it work.
 
#7 ·
Jester FPS said:
Yeah, there's silicon holding the projector in place, but it can be heated and disassembled.

Can't wait to see the final version.
Okay, so you might be alright then. I have to finish making a few parts for the Mechanics section, but when I update it, I'll let you make your own judgement :)
 
#10 ·
J-Ro said:
Okay, so you might be alright then. I have to finish making a few parts for the Mechanics section, but when I update it, I'll let you make your own judgement :)
Thanks man, I have a set of 06 Si Headlights when I did my retrofit and a set of '05 S2K Projectors just laying here so I'm halfway there.

I could really use this application since I do a lot of night driving.
 
#11 ·
gbae: ironically, the "extra" cost to go from a xenon retrofit to an adaptive xenon retrofit was only about $60-70. And I definitely don't have the cash for a Lexus... wish I did though :)

truflip: the difficulty level isn't huge... my diy should be fairly easy to follow once I come out with it. The problem is that some of the extra parts needed will require machining equipment, i.e. lathe, mill and finger brake. Luckily we have these at work and I'm allowed to use them for my own stuff on off-hours, but most people don't have access to that stuff. It might be possible without that equipment by changing some things around, but I'm not sure. It's hard to explain right now because everything's still in my head but not on paper :)
 
  • Like
Reactions: 06Fg2
#20 ·
Thanks everyone... that keeps me going even when the project is hassling me and I just feel like chucking it out the window :)
I'm hoping to make a few more parts today/tomorrow... I need two shafts to go between the motor and the projector bracket and I need to make a new bracket since I broke one of them when I was trying to bend it in the brake. :mad:
 
#23 ·
Great project you have going here. I'm a graduating Computer Engineering student myself and love playing with this kind of stuff (digital/analog circuits). I'm at work and the pictures are blocked at the moment, but as soon as I get home I'm going to check them out. Sounds like you probably know more than me, but if you need any help or suggestions, let me know :)

+rep for you :)
 
#24 ·
CNUco2007 said:
Sounds like you probably know more than me, but if you need any help or suggestions, let me know :)
I doubt I know more than you, I'm a mechie :D
Not sure how many more program problems I'm going to have, but I'll let you know if I do... thanks!!

J
 
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top