Giter Site home page Giter Site logo

pid-ballonplate's Introduction

PID-ballonplate

the complete assembly

A simple-ish project using a Raspberry Pi and three servos.

Principle behind the project:

  1. A Pi camera tracks the position of the ball, using OpenCV. A mask is first applied separating the orange color of the ball from the rest. The mask is then eroded twice, blurred, and finally a 'smallest enclosing circle' command returns the radius and the center position.

  2. This information is then filtered by radius. If it is part of the range of radii that the ball is expected to have, the program calculates the error between the position of the ball and the center of the plate. Three errors total are calculated, one for each servos' line of action.

  3. These three errors are then input in the three PID Controllers, including past errors and past derivatives. The PID Controllers then output a change of angle for each servo, which is first normalized against computing time to account for small variations, and then sent using adafruit's servo library to the servos.

Parts list :

  • Raspberry Pi 4b 8 gb
  • Pi Camera V2
  • Adafruit Camera cable extension
  • Three DIYMORE Full metal servos
  • Waveshare Servo HAT
  • Pimoroni Fan Shim
  • Three Dexter Cardan Joints (Universal joints)

The rest of the parts are 3D printed.

pid-ballonplate's People

Contributors

nicohmje avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.