How to Initialize AFS Headlights on Hyundai i40
Published: June 27, 2026
Quick Answer
If your Hyundai i40’s Adaptive Front Lighting System (AFS) warning light stays on or the headlights stop swiveling, you need to initialize the system. This process re-teaches the control module the motor positions after battery disconnection, bulb replacement, or sensor work. The most reliable method uses a professional OBD2 diagnostic tool like Hyundai GDS or Launch X431. A manual switch-toggling trick exists but often fails on newer models. Start with a scan tool for a guaranteed fix.
Why AFS Initialization Is Needed
The Adaptive Front Lighting System on your Hyundai i40 uses motors inside the headlight assemblies to swivel the low-beam beam pattern as you turn the steering wheel. It also levels the beams based on vehicle load. The control module stores precise motor positions. When any of the following happen, that stored data can be lost or corrupted:
- Battery disconnection or low voltage – the ECU loses memory when power drops below 9V.
- Headlight assembly replacement or bulb change – removing the unit physically moves the motor gear, and the module no longer knows where "zero" is.
- Steering angle sensor or leveling sensor replacement – the system relies on these inputs; swapping them without recalibrating creates a mismatch.
- AFS warning light on the dashboard – this amber icon with an "AFS OFF" or headlight symbol signals that the system detected a fault and disabled adaptive operation. Initialization is often the first step to clear it.
I’ve seen many i40 owners panic when this light appears after a simple battery swap. The good news: in most cases, a straightforward initialization procedure resolves it, and you don’t need to replace expensive headlight modules.
Step-by-Step Initialization Procedures
1. Preparation
Before attempting any initialization method, make sure your car is ready:
- Park on level ground and turn the engine off.
- Center the steering wheel – the wheels must point straight ahead.
- Turn the headlight switch to the OFF position.
- Check your battery voltage with a multimeter. You need at least 12.5V (engine off) for the procedure to complete. Low voltage is the number one reason initialization fails.
Pro tip: if your battery is weak, charge it overnight or jump-start from another vehicle while performing the steps. The AFS motors draw a fair amount of current during recalibration.
2. Method 1: Using a Diagnostic Tool (Recommended)
This is the method I recommend to every workshop owner I train. A proper scan tool guarantees success and gives you feedback if something else is wrong.
Connect your OBD2 scanner that supports Hyundai-specific AFS functions. Popular options include:
- Launch X431 series (I use this daily – see the author bio)
- Autel MaxiSys or MaxiCOM
- Hyundai GDS (dealer software)
- Snap-on SOLUS or VERUS
Navigate to the AFS module. The path typically looks like:
- Chassis → AFS (Adaptive Front Lighting) → Special Function → Initialization or Calibration.
- Some scanners label it "AFS Position Initialization" under the lighting system.
Follow the on-screen prompts. Usually the scanner will ask you to:
- Turn the ignition ON (engine off).
- Turn the headlight switch ON.
- Wait while the system cycles the motors – you’ll hear a whirring sound for about 30–60 seconds.
- The scanner then reports "Initialization Complete" or shows a success message.
Clear any fault codes. After initialization, go to the DTC (Diagnostic Trouble Code) menu and erase all AFS-related codes. Common codes like C1234 or C1250 may disappear only after clearing.
Verify the fix. Turn the steering wheel fully left and right. The headlights should dip and swivel in sync with the steering. If they don’t, repeat the procedure or inspect the motors.
Experience note: On some i40 models (especially 2015+), the scanner may require you to hold the steering wheel at a specific angle during the procedure. Check the scanner’s instructions – some ask you to turn the wheel 90° left, then right before finalizing.
3. Method 2: Manual Procedure (Limited Success)
If you don’t have a scan tool handy, you can try the manual "switch dance" method. I want to be upfront: this works on some i40 models – typically pre-2015 – but often fails on later ones. It costs nothing to try, but don’t get frustrated if it doesn’t work.
- Turn the ignition to ON (engine off). Do not start the car.
- With the headlight switch in the OFF position, quickly toggle it ON–OFF–ON–OFF–ON within 3 seconds.
- On the third ON, leave the switch in the ON position.
- Listen carefully for a whirring, clicking, or humming sound from both headlights. That’s the motors self-testing.
- Wait about 10 seconds. If you hear the sound, the system is attempting calibration.
- Turn the headlight switch OFF. Then turn the ignition OFF.
- Start the engine. The AFS warning light should be gone if successful.
Why this often fails: The manual method relies on a specific timing window that Hyundai changed in later firmware revisions. On a 2017 i40, for example, the control module simply ignores the switch toggling. If you don’t hear any motor noise, don’t repeat the procedure – it may confuse the module further. Move to Method 1.
4. Verification
Regardless of which method you used, you must confirm the system works correctly:
- Steering test: Turn the steering wheel fully left while watching the left headlight beam pattern on a wall. It should rotate inward. Repeat for right.
- Leveling test: With the engine running, press the rear suspension down (or have a passenger sit in the trunk). The beam should dip downward slightly.
- Road test: Drive on a dark, quiet road and make a sharp turn. The lights should swivel into the curve. If they stay fixed, initialization didn’t take.
If the AFS warning remains after initialization, check these components:
- Rear axle leveling sensor (mounted on the rear suspension arm) – often gets bent or unclipped.
- Steering angle sensor zero-point – may need a separate steering angle calibration.
- Headlight motor connectors – moisture or corrosion can block communication.
Common Troubleshooting Issues
| Problem | Likely Cause | Solution |
|---|---|---|
| Initialization fails in scanner | Battery voltage below 12.5V | Charge battery or use a power supply |
| One headlight works, other doesn’t | Faulty motor, wiring, or relay | Swap relays from the underhood fuse box; if no change, motor may be dead |
| Warning light returns after a few drives | Mechanical binding in swivel mechanism | Remove headlight, check for debris or broken gears |
| No sound from motors during procedure | Blown fuse or module power loss | Check fuse labeled "AFS" or "H/LP LVL" in engine compartment fuse box |
| Manual method produces no response | Model year too new | Use a scan tool – manual won’t work on 2015+ i40 |
FAQ
Q: Do I need to initialize AFS after changing a bulb?
Yes, if you removed the entire headlight assembly or disconnected the large electrical connector. For a simple bulb swap where you only twist the bulb socket out, initialization is often unnecessary. However, if the warning light appears after the change, run the initialization to clear any fault memory. According to Hyundai technical bulletins, the system stores the last-known motor position; disconnecting the module erases it.
Q: Can I drive with the AFS warning light on?
Yes, the headlights still work in manual mode. You’ll have fixed low beams and high beams, but the adaptive swivel and auto-leveling will be disabled. It’s safe for short-term driving, but get it fixed soon – you lose visibility on curves at night. Also, the warning light may indicate a pending electrical issue, so don’t ignore it for weeks.
Q: How much does dealer initialization cost?
Most dealerships charge half an hour of labor, typically $50–$100 depending on your location. Independent shops with Hyundai-capable scanners may charge as little as $30–$50. If you have a Launch X431 or similar tool, you can do it yourself for free.
Q: Will disconnecting the battery again reset the initialization?
Yes, it can. If the module didn’t successfully write the calibration data to permanent memory (due to a low battery during initialization), a subsequent battery disconnect will erase it. Always ensure the battery is strong before starting, and avoid disconnecting the battery for at least 24 hours after a successful initialization.
Q: Is there a difference between “initialization” and “calibration”?
Initialization resets the module and relearns the motor stroke limits (end stops). Calibration typically refers to adjusting the beam pattern to meet legal aim specs (e.g., using an optical headlight aimer). Some advanced scan tools combine both steps – running initialization followed by a headlight aim check. For the i40, simply running initialization is usually enough.
Q: My i40 is 2017 – does the manual trick work?
Almost certainly not. The 2017 i40 uses a different AFS control module that requires a hard reset command from a diagnostic tool. You can try the manual method, but don’t expect success. I recommend using a Launch X431 or visiting a shop.
Final Recommendations
- Always start with a diagnostic tool. It’s quicker, more reliable, and gives you diagnostic feedback. Trying the manual method first is fine if you have time, but don’t waste hours repeating it.
- Keep your battery healthy. Low voltage is the #1 cause of AFS issues on Hyundais. If your battery is over three years old, test it before initialization.
- If the manual method fails, don’t repeat it. Doing the switch dance multiple times can confuse the module and may even set additional fault codes. Move to a scan tool or professional help.
- Check for software updates. Hyundai issued Technical Service Bulletins (TSBs) for some i40 model years (especially 2012–2014) where the AFS module needed a firmware update to resolve recurring initialization failures. A dealer or advanced scanner with online update capability can apply these updates.
- Inspect physical components while you’re at it. While you have the scan tool connected, look at live data for the steering angle sensor and leveling sensor. If values are erratic, the problem may not be initialization – it could be a faulty sensor.
About the Author: Erwin Salarda is an Automotive Service Equipment Technician based in the Philippines, specializing in computerized automotive diagnostic equipment such as OBD scanners and wheel alignment systems. Since 2012, he has been actively providing technical support, equipment installation, troubleshooting, after-sales service, and hands-on training for automotive service equipment used by workshops and automotive professionals.
He has received specialized training from international suppliers and manufacturers, including Launch X431 in Shenzhen, China, Lawrence Engineering Company in Guangzhou, China, and 3Excel Wheel Alignment Company in Shenzhen, China. Through these trainings, he developed advanced expertise in automotive diagnostics, calibration, wheel alignment systems, and computerized automotive service technologies.
Erwin Salarda provides professional after-sales support and technical training for automotive diagnostic and wheel alignment equipment, helping clients maximize the performance and proper use of their tools and systems. His experience covers equipment setup, software updates, calibration procedures, troubleshooting, and operational guidance for automotive workshops and service centers.
With more than a decade of experience in the automotive equipment industry, Erwin Salarda continues to support automotive businesses by delivering reliable technical expertise and practical training solutions.
For inquiries and equipment purchases, please visit https://carlifterph.com/
Related Posts
- How to Code Diesel Injectors on Hyundai i40: Complete Step-by-Step Guide
- How to Force DPF Regeneration on Hyundai i40 CRDi (Step-by-Step Guide)
- How to Reset EGR Adaptation on Hyundai i30 CRDi (Step-by-Step)
- How to Calibrate Blind Spot Monitor on Hyundai i30 | Step-by-Step Guide
- Hyundai i30 Lane Camera Calibration: DIY Guide & Cost