Added: 4 years ago
From: m0nkeyville
Views: 12,681
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (10)

Sign In or Sign Up now to post a comment!
  • Comment removed

  • Me too using PIC18F452! Able to share with me how you interface it with the servo motor?

  • @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.

  • Comment removed

  • Well done but i guess there is an overshoot with these Kp and Kd constants...

  • @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.

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

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

  • Wow..... What sensor did you use to measure the position of the ball in the tube??

  • I used an Ultrasonic SRF04 range finder. Then used a PIC18F452 to interface it.

  • Yup that's basically it. The control box worked fine but the beam mechanics were rubbish. Even though i knew i wanted to put the beam at an offset of 1 degree i couldn't achieve it. Basically meant that the ball oscillated around a point rather than settling on it. If anyone wants code etc i'm happy to hand it out. University is over for me

  • what does it do?

  • i think it just tries to get a ball to stay in a area

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more