Ball and Beam - MicroController
Loading...
12,683
Loading...
Ratings have been disabled for this video.
Uploader Comments (m0nkeyville)
see all
All Comments (10)
-
I used an Ultrasonic SRF04 range finder. Then used a PIC18F452 to interface it.
-
Wow..... What sensor did you use to measure the position of the ball in the tube??
Loading...
Me too using PIC18F452! Able to share with me how you interface it with the servo motor?
tckrto 1 year ago
@tckrto Depends on the servo, but i mine was controlled by a timed pulse on a control pin. So a 1500usec pulse put it at neutral with a change of this time changing the angle. So set the control pin high for a delay of 1500usec then low and it will stay at 0deg(rees). Set it high for 1900usec and it will go 45deg clockwise, or 1100usec for a anti-clockwise 45deg angle. Personally i set up a case statement for each angle i required and embedded the timings into the case statements for easy use.
m0nkeyville 1 year ago
Well done but i guess there is an overshoot with these Kp and Kd constants...
ozanenginoglu 1 year ago
@ozanenginoglu
Thanks for the comment! The underlying mathematics behind the control worked in modelling. Unfortunately the control required from the servo to reflect the underlying maths just wasn't available. I required about 0.5 degrees of control from the beam and i had at best about 4 degrees and a very slow response.
I guess that's the problem giving a electronics student a partially mechanical project.
m0nkeyville 1 year ago
You could probably have achieved it by using an easing function to slow the ball before it reached its destination. Really depends on how accurate your sensor is and how precise and responsive the motor/servo is.
TheOneFreeMind 3 years ago
The sensor was excellent....capable of about 1mm precision. The servo was rubbish as its precision was never going to be responsive or accurate enough with such a large beam. With a better system of beam control the fuzzy logic and proportional differential control methods would have been successful but the beam engineering let me down.
m0nkeyville 3 years ago