# Ball And Plate Pdf Editor

## Ball and plate pdf editor

The ball on plate problem consists of a flat plate on which a ball needs to be positioned. Ball positioning is only achieved through unstable equilibrium where any small changes in the plate angle will result in the continual acceleration of the ball until it leaves the plate. Such a system presents an interesting controls problem as closed loop control is needed for stable ball positioning on the plate.

This allows for two separate independent control loops. One loop controls the x-location of the ball and another controls the y-location. Each control loop for the x and y axis consists of two parts; an inner control loop and an outer loop.

The inner loop is responsible for running the stepper motors in closed loop for angle control. Motor angle is obtained from quadrature encoders on each stepper motor.

A set angle for the stepper motors is provided from the outer loop and the difference between the set angle and measured angle drives the stepper motor angular velocity. The outer loop controls the actual ball position on the plate. The input to this loop is desired ball location and feedback is measured ball location. The ball location is obtained using a 4-wire resistive touch screen on which the ball rolls.

## The best online tool to edit PDF documents

The difference and rate of change of the difference between the set and measured locations determines the output angle that is fed into the inner control loop. The outer control loop takes on the form of a proportional-derivative PD controller, while all that is needed for the inner loop is a proportional controller. The output from the entire control system is the position of the ball on the plate.

The position is controlled by adjusting ball acceleration.

## Ball and Plate

Ball acceleration is a function of plate angle and plate angle is a function of stepper motor angle. Using the small angle approximation, a small change in motor angle from equilibrium should result in a linearly related change in plate angle and therefore change in acceleration of the ball.

This rudimentary approximation works quite well for controlling the ball even at larger angles. Did you use this instructable in your classroom? Add a Teacher Note to share how you incorporated it into your lesson. The platform is designed to have three degrees of freedom. The stepper motors are set up in an equilateral triangle pattern.

This configuration couples the x and y motion but results in a simpler mechanical design to fully restrain the platforms position.

The design also allows the platform to pivot around the location of the ball instead of just the center. This approach should permit for more abrupt acceleration changes of the ball, as the ball goes through no vertical displacement during plate angle adjustments.

Currently the platform is only programed to pivot about the center.

## The original online Free PDF editor & form filler.

Closed loop stepper motors were chosen because they work with existing 3D printer electronics. Adding feedback eliminates the missed step problem inherent to stepper motors and allows for more accurate microstepping as the measured angle is controlled, not the step count. The included SolidWorks part models and drawing are for reference only. My intention is to provide enough detail for someone to make a similar project but not make an exact copy.

One should improve on the design and adapt it to fit one's needs. The first version of the motor arms and platform are shown while the finished project shows a revised set. The SolidWorks models for the revised parts are provided. Adhere the touch screen to the acrylic sheet using thin double sided tape in the corners. Make sure the active side is up. The three stepper motors will be labeled A, B, and C.

Ball location measurements are accomplished using an 8. Resistive touch screens are effectively voltage dividers with the x and y locations measured sequentially. To obtain position from the screen, 4 microcontroller pins are required.

All bins must be bidirectional with low output impedance and high input impedance. Two of the pins need to measure analog voltage. The top and bottom plates inside of the touch screen are resistive, in the range of 1K ohm, but insulated from each other when the screen is not touched.

To make an X location measurement the two pins connected to the bottom portion of the screen are set to outputs with low impedance.

Volume 3 book 5 chapter 1 lotro quests

One of the pins is set high and the other is set low. This creates an electrical potential across the bottom portion of the screen. The pins connected to the top portion of the screen are set as high impedance inputs and an analog value is recorded from one of the pins.

## Step 1: ​Design Approach

When the screen is now touched, the top portion of the screen makes contact with the bottom, creating a voltage divider and producing an analog voltage proportional to the touch location in the X direction.

The process is reversed to record the Y location of the touch.

It is desirable to only take measurement when a touch is present. A third configuration is set to wait for a touch condition and only enter the location measurement state when a touch is present. This is accomplished by setting the top or bottom side of the screen to ground; setting the connected pins to output low.

## 3DOF Ball on Plate Using Closed Loop Stepper Motors

The other layer is connected to high impedance inputs with a pullup condition on one of the connected pins. The digital state of the pullup pin is monitored until a touch on the screen pulls the layer low by connecting to the other grounded layer.

Stepper motors are normally operated in an absolute fashion where the amount of steps sent to the motor are tracked in order to determine motor movement. This procedure has two unwanted qualities. The most obvious is lost steps. If the motor encounters a load sufficient to stop motion, the actual position is lost, as the commanded steps no longer match the motors location. The less obvious problem is producing and counting motor steps when using microstepping at high speeds.

## Kalman Filter #1: Modeling Ball-Plate system

A typical stepper motor has steps for a full revolution. This translates to steps for a full revolution if using 32 microstep controllers.

When running the motors at RPMs, an output of steps per second are needed per motor. Running three motors would result in almost K logic changes per second. Doing this level of real-time processing on a 16MHz 8-bit microcontroller leaves no headroom for other tasks. The solution is to offload the step generation to hardware level timers and compare registers while using encoders on the motors to directly measure movement.

A closed loop system can then be setup with the input value representing the difference between a desired motor angle and the measured angle from the encoder. The needed pulse train is generated from three bit hardware timers with three compare registers. The timers are setup with no pre-scaling producing a count rate of 16MHz that resets when the count equals the compare register.

A corresponding output pin is toggled on timer reset, generating a pulse train needed to move the stepper motor. The frequency of the pulse train is set by the size of the compare register and determines the RPM of the motor. Scaled output from the stepper motor control loop can now be fed into the compare register to set motor RPM. With this method, all stepper motor signal generation is accomplished at a hardware level leaving the microcontroller free for other tasks. A proportional-derivative PD control loop is implemented in order to achieve staple ball positioning.

An integral component was added, but not needed. The proportional term in the control loop is simply the difference between the commanded location and the measured ball location multiplied by a proportional gain. The proportional term results in smooth movement of the plate angle, as changes in ball location normally result in a large number. The behavior can be improved by increasing the time between measurements but then the system response time becomes large. The solution is to use more of the balls history to better predict the current velocity.

## Below we show how to add your signature to a PDF document

A second order accurate stencil using only past measurements to predict the current derivative is desired. The stencil should have good noise rejection and time response behavior. Pavel Holoborodko has published such a list of stencils for one sided derivative estimation from which a 16 point stencil was selected. The resulting derivative is significantly smoother than the simple case while maintaining good system response time.

Both proportional and derivative components are added together such that the proportional part tilts the plate to accelerate the ball toward the set location and the derivative component tilts the plate to slow the balls motion. The magnitude of each value can be set by adjusting the gain values until the system is critically damped.

Platform angles representing X and Y tilt need to be transformed into the three stepper motor angles. The X and Y axis are projected onto the three motor axis to determine relative control weightings. This approach is only an approximation of the desired behavior but works as needed. Consistent code execution rates are needed. This is achieved through the use of an interrupt routine that triggers every 1ms off of Timer0.

## Now with more options! Make your choice, online or desktop?

Code execution flags are activated in the interrupt routine that allow different portions of the code to run. The code requires several libraries including: encoder , running median , running average , and PID.

The PID library could be easily eliminated as only the proportional part is used for the stepper motor angle control. The screen will need an initial calibration. In the beginning portion of the code under "touch screen stuff" calibration values can be entered. Uncomment "Serial.

Touch the screen at the indicted locations under the "touch screen stuff" section and enter the displayed values in the code. After calibration, re-comment the serial prints.