Lights dim/pulse when accelerating/decelerating

2004 Ford Focus ZX3. Manual Transmission. Alternator replaced 1-2 years ago for different symptoms/issue.

My problem is that the headlights dim or flash (pulse down to very very dim then back to full) when accelerating or decelerating. Pretty much only when in gear.
They will go back to normal when I depress the clutch pedal (usually I think) or am coasting in neutral.
The fan in the car and other electrics/indicators seem to suffer from same power fluctuations too.

AND ALSO POSSIBLY RELATED.

A little while after seeing this, I noticed a faint then more pronounced clicking coming from left side of dash. (Fuse/relay box?) It seemed to click when the “shift” light would pop on and off about 20% of the time the light did. Otherwise mostly when accel/decel.
I started pulling relays and driving around a parking lot to see if it was one. The click seemed to disappear after pulling the horn relay. (And not the “Battery saver” relay next to it. Odd)

The clicking issue does not happen all of the time when driving. The power dimming does.

Thoughts?

How old is the battery? It seems the battery should provide the base of power for the headlights the alternator keeps the battery charged. In this case I think the battery is going bad and the alternator is working overtime to keep the battery charged and keep power going to the headlights and accessories. Get the battery tested, I think it has lived a good life, but it may be telling you to replace it.

Either battery or alternator. If you did not get a quality alternator, that might be the reason. I had several lifetime alternators from NAPA go bad until I switched to OEM Delco. One was the same type of flickering you mention. Tested good but the voltage regulator still allowed the flickering.

If the battery is 4 or more years old, get it tested. Take it to an auto parts store for the test. If it is bad, they’ll keep the battery and you will walk out with a new one. If the battery is more than 6 years old, you might want to replace it anyway. Replacement cost will be around $100.

Make sure the battery connections are good and clean. The alternator can not charge the battery through dirty connections.

There should be a ground strap between the engine and the body. When you accelerate or decelerate, the engine shifts on its mounts. This might be making and breaking the connection. The negative cable from the battery is connected to the engine block and is also to connect to the body. My guess is that this connection is bad. Headlights draw quite a bit of power in relation to the other lights, but not as much as the starter motor. Since you are not complaining about starting problems, I don’t think you have a battery or alternator problem. I think you need to be certain that there is a good connection between the engine block and the body of the car.

The battery and alternator were tested when I got my oil changed. Both tested fine. (But then again, they did not test when driving.)
I cleaned the battery terminals right after this started.
I’ll try to clean/reseat the grounding strap today.

Be sure to check any grounds to the body from the battery.

I cleaned and re connected all the grounds. No change. I did verify that the clicking was coming from the “battery saver” relay. I switched out the relay with the horn relay and it kept clicking. So it wasn’t the actual relay’s fault.
I was about to reseat the harness on the alternator as a last effort… (I am a computer technician. unplugging and plugging things back in fixes 90% of the world’s problems) but ran out of time. (I would be out of time to drop the car off at the dealer if the issue wasn’t resolved by that.)
So I dropped it off at a dealership. I had another issue that needed looking at (the steering does always straighten out after a turn) and decided to kill two birds with one diagnostic fee.

It appears it was the alternator harness, disconnecting as the engine shifted on the mounts. (good call triedaq).

I’ll have the dealer fix that because it is freezing out and ain’t nobody got time for that.

Don’t give me too much credit. I had bet on the ground system. However, I did guess that it had something to do as the engine shifted on its mounts. Your steering problem may also be related to that harness if your power steering has an electric assist rather than a pump driven by a belt.