129Views12Replies

Author Options:

ball - on - plate PID controller Answered

Hello everyone
I work on a project ball on a plate and have a problem making the ball move a circular motion
Please Help
Thanks 

12 Replies

user
Downunder35m (author)2017-10-17

How can we help without knowing the details?
Please provide some pics of the setup, your code and maybe a short video showing the actual problem with the movement.

Select as Best AnswerUndo Best Answer

user
aljaur (author)Downunder35m2017-10-19

Ball - on - plate is one of the applications of
automatic control consists of a flat plate and ball is usually made of iron is
judged in the balance of the ball on this plate using a servo motor usually
consists of two motors, one of the X axis and the other for the Y axis and
control this system using Arduino I have a problem making the ball move a
circular motion on the board

Select as Best AnswerUndo Best Answer

user
iceng (author)2017-10-18

Did you make it do the square yet ?

Select as Best AnswerUndo Best Answer

user
Downunder35m (author)iceng2017-10-19

I am starting to think this is a school project or similar.
Otherwise posting some meanngful pics or code would be a good thing...
I saw something similar on the web as an automation project for students ;)
There they would get a lot of parts, some of which are not really required and have to put it all together to make it work.
Of course with own coding and all.
Problem for the students in question is that they have use "PID control" for the axis movement and check the position of the platform only by means of a gyro sensor.
The first challenge is to build a working platform as there are a lot of parts to choose from but only a few will really work together as planned.
The final problem is that the students doing the coding need to find a way to shut off the positiong system to get a signal that relates to the movement of the ball and to turn it back on again with the required corrections.
The term PID control in the project description can make you think it is only for the motor control.
But in fact it is far more for the checking of the ball speed and platform position.
For example:
Platform leveled and ball in the true centre.
Here nothing would be required as the system is stable.
First hurdle to on the assignment is to make the platform center the ball and hold it there no matter where the ball is placed on the platform.
Next is making the ball move in a controlled way without dropping off the platform.
Usually it starts from stable with a square that is repeated a few times.
The circle is to demonstrate how the PID control works to match the positioning speed to the movement of the ball.
The more circles you can run in a set time the better your system will be.
Final goal is to use a joystick, trackball or mobile phone to control the ball on the platform without it dropping because the user did something wrong.
Like trying to dop it off by tilting the platform and leaving it in this position - here the code must make sure the ball is kept steady at the limit of what coding and mechanics can do.
How well you score depends on smooth the ball is controlled and how stable the system is in terms of bad user input.

Aljaur can feel free to correct me on the details of the assignment but I think I am pretty close unless his teacher does not aim for the full assignment ;)

Select as Best AnswerUndo Best Answer

user
aljaur (author)iceng2017-10-19

I did not make it move a square motion. I just made it settle at any point I set. I want to support the regime with the circular movement

Select as Best AnswerUndo Best Answer

user
iceng (author)aljaur2017-10-19

Before you can make it circle, the engineer says you need to demonstrate you have single axis control, ergo the square is obviously a sequence of 4 single axis motions to prove your understanding of motion mechanics..

A circle will combine simultaneous two axis movement to roll your ball in a circular path.. There is a mathematical relationship that I will not immediately disclose, lest I confusing the issue, until you demonstrate single axis knowledge..

Select as Best AnswerUndo Best Answer

user
aljaur (author)iceng2017-10-19

I have a sensor which is resistive touch screen (x-y sensitive). x- axis is working separately of y-axis

Is that what you mean about (single axis control).

By the way, I controlled x-axis motion individual by PID controller and it is working perfect. However, x-y motion it still needs a hard work.

Select as Best AnswerUndo Best Answer

user
iceng (author)aljaur2017-10-19

Downunder has it right..

What data do you feed to your PID (Proportional Integral Differential) control to make the ball go in a straight_line, stop and come_back to the starting spot ?

Do you turn a potentiometer ?

Do you send RS232 or I^2 serial command strings ?

Or do you depend on ladder programing to respond to a High/Low/High switch transition ?

Select as Best AnswerUndo Best Answer

user
Downunder35m (author)aljaur2017-10-19

I think that lack of control and understanding is exactly what Iceng means.
Having a sensor and moving axis does not mean you have the understanding for the required calculations and calibrations required.
And I fail to see how you can have trouble with the y-axis as the motion control would be exactly the same as for the x-axis.

Select as Best AnswerUndo Best Answer

user
Jonathanrjpereira (author)2017-10-18

You should provide more details about the parts & components used. Also describe your problem in detail.

Select as Best AnswerUndo Best Answer

user
aljaur (author)Jonathanrjpereira2017-10-19

Ball - on - plate is one of the applications of
automatic control consists of a flat plate and ball is usually made of iron is
judged in the balance of the ball on this plate using a servo motor usually
consists of two motors, one of the X axis and the other for the Y axis and
control this system using Arduino I have a problem making the ball move a
circular motion on the board

Select as Best AnswerUndo Best Answer

user
aljaur (author)2017-10-18

I'm sorry I did not put the details, but this video shows the required movement

https://www.youtube.com/watch?v=_YILNkytBjE

Select as Best AnswerUndo Best Answer