Can you post a full wiring diagram? Hand drawn is fine, please no fritzing, we hate fritzing here.
Also, what makes you say it doesn't work? (ie, what are the symptoms?)
Basicly what happens is that the lidar runns fine by itself, and the stepper runns fine by itself, but when both are conected to the sme arduino, the lidar running on 5V and i2c and the stepper runing on 11.1V and a A4988 driver, the lidar gives >nack and stops after 2-5 readings. and the stepper dosent move.
i will supply a hand drawn diagram after work today, reason for the fritzing like image is Pulsedlights Lidar Lite reference image for i2c.
Basically you need at least a large electrolytic across the supply for driving stepping motors. Otherwise the ripple current can be too much for the driver board's ceramic capacitor.
Basically you need at least a large electrolytic across the supply for driving stepping motors. Otherwise the ripple current can be too much for the driver board's ceramic capacitor.
That should be fine. If it were me I would also include a 0.1uF ceramic capacitor across those two big ones to cope with the higher frequency.
The only thing I would change on your diagram is that you have the ground of the motor driver connected to the ground of the Arduino. There is also a common ground provided by the power supply being the same source so this wire is acting as a ground loop. I would try disconnecting this.
So the circuit looks OK maybe it is your layout giving you problems, make sure the wires for the motor are not running along side the Arduino wires.
Grumpy_Mike:
That should be fine. If it were me I would also include a 0.1uF ceramic capacitor across those two big ones to cope with the higher frequency.
The only thing I would change on your diagram is that you have the ground of the motor driver connected to the ground of the Arduino. There is also a common ground provided by the power supply being the same source so this wire is acting as a ground loop. I would try disconnecting this.
So the circuit looks OK maybe it is your layout giving you problems, make sure the wires for the motor are not running along side the Arduino wires.