Stepper shield and AI noise

Dear all

I am working in a project that I use a stepper motor and a distance sensor that has an out put 0-5V DC

I power the Shield and the sensor with same power suply with 12V 1A.
I expect resolutions from distance below 1mm but is impossible, is about 2-3mm noise

After some experiences, I discover that, if I cut the power to the shield, the signal from sensor is perfect, noise below 0.1mm.
Some colleagues suggest to use 2 power supplys, but this solution is not a good way for the project. I try it and it reduces a lot the noise, but not so much as cutting power to the shield.
Can someone help with some tip or idea?

Best regards
CPalha

Noise is NOT measured in mm. Have you calibrated your system so you can predict the error range?

Hi Paul

I have both displays, volts and mm, but is the same. If you want I can share a file with readings combine some solutions and you could see the voltage variations

CPalha

You measure noise with an oscilloscope. Have you calibrated the length vs. some number of motor steps, like 100 steps always will give xx mm in length.

No I do not measure. The stepper is for carrying the laser throught 3m long and it works fine and steppers are calibrated for 3m.
The problem is the laser sensor output, even the motor stopped, but given power to the shield (and motor with power), the signal from laser is too variable

CPalha

You are not trying to connect using one of those plastic breadboards, are you?

I would start by providing the filter with a 'cleaner' power supply. Use inline filter; ferrite or low value resistor and capacitor(s).

Ensure your sensor and motor return are not commoned either,

No.
One thing I know, without powering the shield, the laser signal output is the expected.

Hi Stevemj

If the power are the same, the return should the same, I suppose, I am not electronic.
My friends from electronic dept suggest 2 separated power supply...

Please see this graph with 4 situtations.

Same power supply, powering and not powering shield
2 power supply, powering and not powering shield

Where is the current limited power supply for the laser? Is the current limit varying?

Current?
Below is the datasheet from the sensor

dataSheet_OD2-P250W150U0_6036646_en.pdf (451.5 KB)

I give up. Good luck.

Thanks :slight_smile:

It says 0-10volt analogue output.
Your diagram says 0-5volt, so what is it.

Minimum sensor supply is 18volt.
I expect a 12volt regulator inside (how else could it output 0-10volt),
and that won't work if you power it with 12volt.

If that doesn't help...
Try to switch your Uno to 1.1volt Aref in setup(), and use a voltage divider to 1volt.
Because comparing sensor voltage to a noisy default 5volt could result in a noisy A/D output.

Analogue sensors are very sensitive to grounding.
Try moving analogue ground of the sensor to another ground pin (other side of the board?).
Leo..

Have a search for common mode ground resistance and impedance coupling, e.g. https://incompliancemag.com/article/common-impedance-coupling-between-circuits/.

Connect all your grounds at one point, a 'star' point. You do not want the heavy (and noisy) current sharing a return with the sensor or A/D's return.

Say, the return resistance is 10 milli ohms and your motor current is 1A. Then if that current flows in the same return resistance as your sensor then you will get 10 millivolts of uncertainty.

Hi Wawa

In fact I use a 24V DC that powers the laser
Then I use a stepdown to convert 24V to 12V Dc and power the stepper shield
From the laser I use a volt divider, I have an output of 0-10VC but with volt divider I get 0-5 V output.

CPalha

Hi stevemj

For me it is a litle bit confuse....
In past I remember some electronic student has used some diods to prevent reverse current, or I am wrong.

Best
CPalha

I did not mention reverse current...? #Confused by that.

Another piece of the puzzle that is different from post#1.

Maybe the buck converter is the source of the noise.
Why do you lower the supply for the (unspecified) stepper driver (and unspecified motor).
Don't know the shield (no link posted), and it seemst to have sockets for current controlled drivers, which usually work better with a higher supply.
Maybe you can just remove that buck converter.
Leo..