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?
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
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
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...
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..
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.
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.
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..