fisha
Member Since: 28 Aug 2012
Location: Scotland
Posts: 299
|
DIY Self Levelling Headlights - An open discussion... | |
From the outset: Lets not get distracted into the details of whether HID need self levelling for MOT or not. Lets have a talk about what would be the system requirements for a DIY self levelling system.
Background:
I like HID lights, they are better than halogen, and I miss them on my FL2. I would like to fit a conversion set to my lamps, but would also like to have self levelling. There is an ultrasonic self levelling system from the likes of Hella, but thats about £200+ and I can't help think that there may be better methods considering that a height level sensor is already available for the freelander that bolts onto the suspension arm, and from which you get a voltage signal proportional to the deflection of the arm.
At the moment, the projector halogen lights have a levelling switch beside the main light switch on the dash. I'm assuming that just creates an analogue voltage that the headlight units then adapt to match.
SWITCH --- (VOLTAGE) --- HEADLIGHT
My idea for a DIY system would be to retrofit the height sensor (genuine part) and then use a small prototyping board to read that value, and then output a suitable voltage value in place of the dash switch.
SENSOR --- (VOLTAGE) --- ARDUINO etc --- (VOLTAGE) --- HEADLIGHT
Guesstimating rough values could in theory put the project at a lot less than the Hella setup.
Sensor = £50
Arduino + case etc = likely sub £50?
Cables = not a lot
Then it would be a case of programming the board to learn the loaded/unloaded sensor reading range and to give a suitable signal back out that would match the range of the dash switch.
-------------------------------------
But there is more to it than that for a headlight levelling system ... which is where I'm looking for ideas and suggestions.
Obviously as you drive along, then the sensor will be moving with the suspension and giving tons of different readings. You're not wanting the headlights to be going up and down like crazy trying to match that.
There is also the dip movement that an HID light system does sometimes (but not every time i don't think) on startup - i think that may be something that MOT testers look for to confirm self levelling?.
When does the system know/consider that the loading on the car has changed? At start up only? constant monitoring? every 15 minutes?
Any thoughts / discussions would be gratefully appreciated.
|
18th Nov 2013 12:08 pm |
|
fisha
Member Since: 28 Aug 2012
Location: Scotland
Posts: 299
|
I don't remember the Range Rover doing it. My mini cooper does it once in a while, but not every time.
I think for the purposes of this type of project, initially it would be easier to program in a dip movement every time. i.e. lights on = output to dip lights for 2 seconds ( so lights start to move down ), then return to last known good value ( lights return back ) which would give a 4 second dip movement, and shouldn't affect driving in that time frame.
What I'm wondering most is addressing the load amount of the car on an on-going basis If I took a reading from the sensor at start up, then thats no guarantee of the load in the car further down the line. Its more than possible for people to get in a car whilst its all running and lights on. ( And for people to get out ) Its those circumstances that would need the load to be re-calculated on the go.
then how often it should be re-calculated and the output changed? every 5,10,15,30,60 seconds ... minutes?
|
18th Nov 2013 1:40 pm |
|
alex_pescaru
Member Since: 12 Mar 2009
Location: RO
Posts: 4642
|
1. The original system has two sensors. One on the front left wheel and one on the rear left wheel. You should also fit two. Then you should do the math between the two signals to perform the leveling.
2. The standard HID equipment, NOT AFS, does not dip the lights on start-up. It just does the math above.
3. The leveling ECU is also knowing the speed information from the CAN bus and a leveling is performed every time the speed is dropping to zero. Enough for a proper leveling. If it's not too complicated for you, your Arduino should also listen to the speed and then do the leveling only when the speed is zero, therefore eliminating the dynamic leveling. Otherwise, if you don't want or can't read the speed, monitor the signal variation of the two leveling sensors and when the signal is stable and not varies during, let's say 2 seconds, then do the math. During travel in 2 seconds for sure there is signal variation because of the street irregularities.
Just my 2 cents or how I would do it.
|
18th Nov 2013 8:33 pm |
|
fisha
Member Since: 28 Aug 2012
Location: Scotland
Posts: 299
|
Alex, Very interesting, thank you.
Initial thought is that a canbus interface via arduino will need a daughter board for the interface, it exists, but adds to the complexity. / cost.
As a means of smoothing the readings I was thinking along the lines of sampling the sensor and each time you read it, you average it against the averaged previous 10 readings (likely more). Arduino on paper can sample analogue plenty ( hundreds ) times per second.
Given the idea of measuring when stopped, then I suppose the sensor reading reading would become fairly stable. it would be easy to check whether the sensor readings was within a certain tolerance of the previous for a set length of time, and if so, the adjustment made.
As for 2 sensors, again, easily added, (but also adds cost). Would need more thought on what to do with the front reading, i suoppose the lower the front reads in terms of height, it should reduce the amount the lights dip when they react to the rear sitting lower.
|
18th Nov 2013 10:19 pm |
|