Signal Noise caused by PWMing

Hi,

I have a big problem which I cant quite figure out how to get around it.
I am PWMing pin 10 of Arduino Mega at 4 KHz which is driving a gate driver and that is driving a N-Channel mosfet, and the mosfet is switching a low resistance (0.5 Ohm) load at 12V.
I am supplying the power for arduino and my sensors from the same 12V. There are chokes and big capacitors (3300uF) and small capacitor (10uF) to filter out the noise on the 12V line before getting into the Arduino.
However I am still seeing a lot of noise in the sensor data.

What more do i need to do to fully suppress this noise?

Thanks

How are the ground wires arranged? (in particular are any parts of the high-current circuit shared with
sensor ground lead?

Are high current wires close to sensor wires?

The power supply ground goes to a grounding block. The grounding block received all the grounds: the sensors, the high current components, and the arduino.

No, the high current wires are separated by a fair distance from the sensor wires...

Some calculations and measurements will inform us. The current might be up to 24 amps

v = ir

i= v/r = 12/.5 = 24 amps

The ripple is estimated to be 0.9 volts below 12 volts. Measure it too.

i = c dv/dt

dv = i dt/c

dt = 1/8000 hz = 125us

dv = 24 amps 125us / .0033F = .9 volts ripple

To fix it, put a regulator on the 12 v to drop it to 9v to power the Arduino.
LM317 regulator

Make sure the wires carrying the sensor's ground do not carry the return current for the PWM.
A photo and drawn schematic would help.
What sort of noise are you seeing?

I cant really drop the voltage to 9V, because one of my sensors needs 12 V to operate.

Is there a way to condition the 12V before giving it to Arduino and sensor board? is there such thing as 12V to 12V regulator?

Thanks for your reply.

Yes they are called DC to DC converters but why not drop the 12V down to 9V before you feed it into the arduino?

I can drop the voltage to 9V for the Arduino, but I need 12V for one of my sensors. And if the 12V line is fluctuating, then the data from that sensor will be unreliable.
So... we are back to the beginning: to filter out the 4 KHz noise from the 12V line caused by PWMing...

Any thought?

Thanks

I can drop the voltage to 9V for the Arduino, but I need 12V for one of my sensors.

Dropping down to 9V is not mutually exclusive with still having 12V for your sensors.
Feed the 12V into a 9V regulator and feed your sensors from the 12V input.

There are chokes and big capacitors (3300uF) and small capacitor (10uF) to filter out the noise on the 12V line before getting into the Arduino.

I would add small ceramic capacitors of 0.1uF into the mix. Did you use a pi filter like the last circuit in this link
http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html

Don't connect the ground sides of the sensors to the grounding block. Instead, connect them to one of the ground pins of the Arduino, and don't connect anything else to that ground pin. Connect a different Arduino ground pin to your grounding block.

Use differential sensing. Use two of your 12v sensors so that common-mode noise is ignored by the differential outputs after standard processing of the two outputs. Both sensor outputs will have noise but it will be a common mode noise not a different noise. This technique is explained in the literature.