I am working on the position control of a two-link robot manipulator. I am using 24V DC motor with an encoder. When I fed the program to the Arduino board Mega2560, in the beginning, it moved smoothly, but later on, it started shaking. I have connected to Arduino board to the PC by USB cable. I am guessing following reasons behind it: 1) PWM signals fluctuate On and Off. 2) power supply to the Arduino board. Can anyone look into this and suggest me a solution?
Post your code and a wiring diagram/schematic of your set-up
Sorry to say, but I cannot post code here. It is very big code with a control law.
Hi,
Are you using PID control?
Have you got sufficient current supply to drive and support the drive motors?
What are the specifications of the motors.
Thanks... Tom..
The main goal for forum is helping members learn and grow in programming........
How about a schematic?
I am not using PID control law. I have used 24V Dc motor with BTS7960 driver. I have given power supply to Arduino board through USB from PC.
No code, no schematic, I don't see how anyone here can provide any help
How are you powering the DC motors?
What are the specifications of the motors, can you please post link to motor specs/data?
Schematic would be very helpful about now!!!!
Tom...
Once I got proper result, I will post it in detail. I am also beginner in this work.
A big job if you are a beginner.
But if you cannot submit the required info, Good Luck.
Tom..
Very likely the motor power supply is inadequate.
1:
2: a photo of your hardware
.. so lots to go wrong. So
3: a simple code to move the position from A to B, and what happens when you run it.
My first guess: if there is slack in your system you will ned to include hysteresis or the PID will continually be attempting to compensate. It needs calibration - but PID will not fix a poor mechanical arrangement.
I tend to agree, given the PSU is from the PC.
Which USB are you using, is it USB2 or USB3?
Given the current limitations and how fast the control is, the USB could current limit then you would get sporadic loss in data.
As others have said you need to post more details about the project.
It works well with simple code. I agree with your first guess: if there is slack in your system you will need to include hysteresis or the PID will continually be attempting to compensate. It needs calibration - but PID will not fix a poor mechanical arrangement.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.