Close
0%
0%

OsziPong

Play Pong on your Oscilloscope, in style.

Public Chat
Similar projects worth following
This is actually an old project way back from 2015. I showed it on Makerfaire Berlin 2016 and 2018. Over the years it received several updates.

With OsziPong you can play Pong on every oscilloscop without modifications, by using the XY mode which every scope has.
You can play OsziPong on analog and digital Osciloscops but only on analog CRTs you get the ghostly green shine which makes this project special. Sound comes from a small piezo speaker.

Fun fact: CRTs are still the highest contrast display today. So even when i show you pictures, to get the real experience you have to build it up yourself. Your screen can not show it to you.

You can find the german project page here: Breadboarder Webpage

Gameplay

The first few seconds after you start, the game title is presented and you realize that the game you are about to play is Pong. The game starts after a few seconds with the ball in the middle and random speed and direction. Both players can control their paddle with a Potentiometer. I guess you know the game rules, if not ... well i hope you are ashamed of yourself. Sound effects come from a small piezo speaker. The typical "pong like" sound is played when the ball hits the paddels or the side barrier.

The game goes on until one player reaches 30 points. The points of each side are visible on the upper boarder of the screen. The game freezes when one player reaches 30 points so every body can see who won/was humiliated because of his/her pathetic lack of pong skill. Additonaly "Press Reset" blinks on the screen.

Video Signal

Two R2R-DACs generate two control voltages which draw the picture on the display. When the scope is in XY mode the voltage on channel 1 controls the electron ray in X direction and the voltage on channel 2 controls the Y direction. The ray is moved over the screen and the screen lights up where it is hit. After a wihle the screen gets dark again an a new picture can be drawn.

This sketch shows the X and Y controlvoltages to draw a rectangle.

But there is one big problem. You can not draw ... you have to. The electron ray will always point somewhere on the screen and will draw. So everything in the picture like paddles, ball, point counter, etc. is connected by continuious lines. But there is a special trick to draw separate objects on the screen. The brightness of each line depends on the time it took to draw it. If the electron ray moves slower the screen receives more energy and shines with a higher intensity. So the brightness of each line is controlled by the drawing speed. Lines i don't want you to see, i just draw them as fast as possible. Problem solved.

The ball is drawn in a different way. When the µC is busy running the game logic it can not move the electron ray over the screen. So instead the ray is "parked" on the balls position when nothing is drawn. Therefore the ball shines much brighter and longer and drags a ghostly tail.

Build your own

There is only one IC used in the hole build. All other parts are passiv and through-hole components like resistors and capacitors so beginners should be able to bild their own. In extrem emergency situations even on perf board.

And this is what the newest revision looks like.

OsziPong_V2.hex

just the .hex code for the µC (ATMega16A). no compiling necessary. Should also be compatible with older versions of the ATMega16 and ATMega32.

hex - 15.50 kB - 06/30/2022 at 01:50

Download

OsziPong_V2.zip

source code of OsziPong. The .zip achive contains an AVR Studio project. If you don't want to compile everything yourself, just grab the .hex code.

x-zip-compressed - 137.96 kB - 06/30/2022 at 01:47

Download

topcover.brd

the top cover is made from a pcb, this is the layout (eagle board)

brd - 7.07 kB - 06/30/2022 at 01:45

Download

assembly_plan.pdf

assembly plan

Adobe Portable Document Format - 31.10 kB - 06/30/2022 at 01:44

Preview
Download

BOM.ods

bill of material

spreadsheet - 5.79 kB - 06/30/2022 at 01:43

Download

View all 8 files

  • 1 × PCB
  • 1 × ATMega16A or ATMega32
  • 47 × 10k Ohm resistor
  • 1 × 500 Ohm resistor
  • 3 × 100nF capacitor

View all 14 components

  • 1
    Put in and solder 10k Ohm resistors at R1...R8, R23...R32 and R47

    Put 10kOhm resistors in the PCB and solder them as depicted in this image. If you are not sure about something, look for the assembly plan and the bill of material in the project documentation.

    Tip: If you want it to look nice, put all resistors in the same direction. Otherwise the direction doesn't matter.

  • 2
    Put in and solder a 500 Ohm resistors at R48

    That is how it should look when you are done. Bonus points if you can spot the difference ^^.

  • 3
    Put in and solder 10k Ohm resistors at R9...R22 and R33...R46

    Now solder all the up-right resistors. All of these resistors are 10k Ohm resistors.

    It is hard to see, but from this picture you should be able to guess where to put these resistors. This is before .....

    ... and this is after soldering.

View all 11 instructions

Enjoy this project?

Share

Discussions

Timo wrote 07/26/2022 at 10:40 point

Yes it definitely has one and i am aware of that. But then you would have to make a third connection to the scope. Also it works pretty well without Z-mod. As long as you can park the ray at the balls position it is very easy to implement. But for games which don't have a "ball" this might be more complicated.

In the end, i decided against using the Z-mod input to keep everything tidy and it also keeps it simpler for beginners who often don't know what the Z-mod input actually does. ^^

  Are you sure? yes | no

Joseph Eoff wrote 07/26/2022 at 10:24 point

I think it quite likely that your Tektronix oscilloscope has a Z-mod input.  That would allow you to turn off the trace while moving from one object to another.

Check page 3-16 of the Tektronix 2225 operator'S manual:

https://download.tek.com/manual/tek_2225_op_and_opt.pdf

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates