DIY Pong - Part 3 of 4 -The Ball

The ball is the tricky part.

The vertical motion of the ball is constrained by the floor and ceiling of the video screen. This is the easy part.

A triangular waveform generator is used to output an analog voltage. This is fed to the gate of an FET (field effect transistor) used as a variable resistor that determines the duration of a monostable multivibrator. This gives the ball its vertical motion between the top and bottom of the screen. The second half of the monostable multivibrator determines the height of the ball.

Ball Motion Circuit

U9 is a dual op-amp (LM358) used to create a triangular waveform. It consists of a square wave generator, U9A, feeding an RC integrator, U9B, with ramp set by R24 and C24. Resistors R21 and R22 are adjusted to give a 50% duty cycle.

The triangular wave is fed to the gate of an N-channel FET. I used a 2N5484 FET only because that was what I had handy.
VR28 is adjusted to set the linearity of the ball motion.

VR29 is selected to set the maximum extent of the monostable, i.e., the position of the ball at the extreme right and bottom of the screen.
VR30 is selected to set the minimum extent of the monostable, i.e., the position of the ball at the extreme left and top of the screen.

These can be replaced with suitable variable resistors for ease of adjustment.

The connections at the right of the circuit schematic would replace the resistor in the monostable multivibrator circuit that determines the position of the ball. The circuit is the same for both the horizontal and vertical motion. The speed in the two directions should be made different speeds by choosing different values of C24.

Here is a sample of the ball in motion.
Ball demo

Breadboard Circuit
The circuit on the breadboard is growing. I still have to add monostables for the two paddles.


In the 4th and final post, I will show the ball and paddles in play.

DIY Pong - Part 1 of 4 - Getting Started
DIY Pong - Part 2 of 4 - The Paddles
DIY Pong - Part 4 of 4 - The Play

Blog entry information

Last update

More entries in General

More entries from MrChips

Share this entry