Hacker News new | past | comments | ask | show | jobs | submit login
Oscilloscope pong for 1 or 2 players (eevblog.com)
161 points by lnolte on April 4, 2017 | hide | past | favorite | 35 comments



Title doesn't do any justice, it's an all-discrete circuit made from diodes, transistors and such. They are soldered not on a PCB but mostly free hanging in air above a copper ground plate. One wrong move and "bazoing" sparkles. The guy didn't draw a schematic beforehand either. He mostly made it up as he went. Amazing.

http://www.eevblog.com/forum/projects/oscilloscope-pong-for-...


"mostly free hanging in air above a copper ground plate"

It is impressive work, both for people inside and outside the industry.

I've built a lot of RF stuff that way, his technique is "normal". What impresses me about the quality of his work is there's no solder or flux splashes on the board and none of the wires have been burned by the iron and the board isn't tarnished like an old copper penny from all the handling. Also there's no visible reworking.

A lot of people buy non-inductive carbon comp many meg value resistors for use as standoffs which I didn't see in the pixs I saw. Most relatively low impedance ckts laugh at being shorted to ground by 8.2 megs yet it can be physically useful to anchor connections. Another option I've done and seen others do is take a piece of PCB and chop it into squares and stick the squares on the groundplane with glue or solder. I've had unfortunate incidents with the "hacksaw a grid of isolated squares" where the hacksaw didn't isolate the squares so I haven't done that since the 80s, but others have better luck. I've had extremely mixed results making microstripline using a shear and soldering the strips into place. You can buy pre-etched boards to support ground plane construction, including little boards when you need some SMD. I've done the "flip the chip over, super glue, and solder wire wrap wires to the leads" but its not fun.

I made a complete 80M ham radio receiver back in the 80s using the ARRL Hayward "radio amateur solid state design" or something like that, the title was all generic words you can't google for, using that construction technique. The brown book with the 70s era power RF transistor on the front cover (back in the bad old days when like 100 watt device cost like half a car payment and blew up if you looked at it wrong and was made of beryllium oxide heat sink and came with a toxic waste shipment bag for when you disposed of it). Anyway it looked like a war relic by the time I was done. I think I built at least two VFOs and three mixers by the time I was done (different designs, troubleshooting to get lower drift, etc) and things gradually got trashed as I modified endlessly. I'm not sure every stage was simultaneously 100% perfect at any time, but at one time or another every stage at least momentarily worked.

The truly skilled make things look easy that are actually pretty well impossible, which makes the article very impressive.


  >>  I've done the "flip the chip over, super glue, and solder wire wrap wires to the leads" but its not fun.
Depends on your idea of fun, but this is a pretty standard way of breadboarding analog/RF circuits. (not used much as PC board fab has gotten so fast and cheap)

I have done it many times, and I think it is fun :)


Its a top of the board troubleshooter vs bottom of the board troubleshooter thing. I can look at a chip and poke a scope probe on pin 7 almost by reflex from the top but from the bottom (aka flipped chip) I guarantee I'll solder at least one chip "flipped".

I'm enough of an old timer that I'm still used to thru-hole enough that flipping a chip doesn't totally mess me up. I would imagine "kids these days" who never worked a thru hole PCB will likely be rather confused about where pin 1 appears when a chip (or board) is flipped....

Of course your fine tip sharpie pen is handy for numbering pins and preventing OCD cycles (Is that flipped over chip an opamp or a microcontroller? You can't see after its glued down, ya know). And lack of scribble on the groundplane is yet another example of this being project being fine workmanship. He doesn't even have stuff like +12V or LSB/MSB marked which is impressive.


I just thought, if the idea isn't to reflect waves in a transmission line I'm going to be very disappointed. Now I'll have to leave the idea here: The speed of transmission in long connections is measurable. The electromagnetic pulse travels with lightspeed and the big impedance mismatch at the end of an open line will reflect the most of the pulse. The proportion of the length to the time of transmission is almost 1/c in conductors, approximately 1 meter per 3 nano seconds. Using really long lines and switches on two sides of a closed loop, a game of reaction could be created.

Kilometer long coils might not seem viable, and I don't know enough about wireless transmission to paint a nice picture, but induction introduced by coils of wire would delay a wave packet proportional to a 4th of the frequency of the wave.

Edit: Bonus points for attaching a buzzing speaker each to either end :)


Its a XY oscope so the highest freq signal required in the schematic appears to be 1200 Hz look at his clock gen system around page 17.

In the "good ole days" you'd use IC opamps instead of transistor ckts to directly generate NTSC video signals at an analog level. There are a zillion google able links here is one:

http://www.electronixandmore.com/projects/pong/index.html

Or an example of digital logic driving a scope

http://www.electronixandmore.com/projects/scopepong/index.ht...

In the 80s or early 90s it was a "thing" in Z80 programming class to drive two DAC with a Z80 running some assembly language you wrote yourself to display a vector cube. Then you demonstrated your ability or lack thereof WRT trig and made the cube rotate. That took about two lab periods. There were a couple alternatives for that lab and I did a sampler where I had an A/D sample a bit less than 64K of sound at 8Ksamples/sec when a button is pressed and then it output the sample repeatedly. It was kinda fun.


Any idea on what material the thick support wires mounted on the PCB are made of?


Tinned copper like everything else is what I'd expect.



Wow, this looks even more amazing!


This is amazing, never thought you can make a pong game without writing a single line of code, without using any CPU.

Moving the bars with knobs, and drawing lines is fine, but doing bounce ball effects with sound.. miracle


If you can "read" a schematic, you'll see that it's actually fairly simple; in fact, you should be able to notice the repetition of many areas - it's a very modular design.

Just a bunch of simple and repeated circuits arranged in a certain manner; it's essentially a very special-purpose "computer" where the "code" is fixed in the hardware (literally "hard coded"). Much of it borrows or is identical to analog computing circuits (most especially the way the "ball" is drawn - sine/cosine waves generated and scaled, then combined on the x/y axis, which are also updated by oscillators for the ball movement).

Don't get me wrong, it's an amazing achievement, especially done "blind" and "dead-bug" style.

Also, note the various places where it looks like two diodes are in parallel, hooking up one line to ground. I'm not sure exactly what it is doing here in this circuit, but I know that in single-element ultrasonic distance sensor circuits, such a similar construct is used to protect the input of the receiver portion of the circuit from the high-voltage (due to amplification) of the transmitter when the "ping" is generated; in other words, it acts like a "voltage clamp" or filter to attenuate the signal. That is probably what is going on here, too - to prevent high-voltage spikes from being transmitted further down the line, and routing them to ground. Something like that...


You can make a pong game easily on FPGA and VGA output, no CPU needed :)


Thats really cool. Especially completely analog.

Like the original "tenis of two" circa 1960 https://en.wikipedia.org/wiki/Tennis_for_Two

In a older thread about asteroids, I learned some older arcade games there were these things called XY monitors which were used by early video games (Asteroids, battle zone, starters, tempest..), which drew on the screen by moving a beam around the screen and turning on and off. Moving slower means things are brighter. Similar to an oscilloscope.

https://news.ycombinator.com/item?id=13981733

There is a youtube video where someone takes a modern laser projector and recreates asteroids similar to the beam moving on the oscilloscope (Though programmed using c). https://www.youtube.com/watch?v=FkHjG759ABY&t=774s

There were some interesting links in response to my comments: including an xy monitor manual.

[1] http://www.arcade-museum.com/manuals-monitors/Atari%20Monito...


> drew on the screen by moving a beam around the screen and turning on and off

Actually all CRT displays (box TVs/monitors) did this, only they move the beam in a predefined pattern (line by line downwards) and all you can do to control image is to turn the beam gradually on or off. Color uses an RGB shadow mask and three phospohors with different colors stuck together to make a pixel.

But on vector displays like you mention, which were much less common, the software actually defined the beam path and you could have super-precise vector graphics. Some displays were of the storage tube type, which would glow for several minutes, so once drawn you could add more stuff to an image, but to erase you had to reset the whole screen - very similar to a Kindle display. Others had ~30fps refresh rate.

Vector displays were great back when memory was so limited a 6404808 bits image was out of the question. Storing only vertices of polygons is much cheaper. But due to the poor text rendering and shading capabilities of vector displays, bitmapped CRTs took over once memory had been riding Moore's law for a while.


Wouldn't you expect vector text to look better? Sharper. Like going from text at 100 DPI to 300 DPI. Is it a precision issue with controlling the beam?


Linearity of the scope amplifiers was a big issue. Back when this was a thing there was a big difference in image quality between a Tektronix or HP oscope vs some no name scope. For probably 40 years people have been hooking up 8 bit microprocessors and DACs to a scope and trying to display a clock or something and getting a perfectly round clock dial with a cheap scope is not easy.


Trammel Hudson's blog is also a great resource for vector monitors, cool things done on oscilloscopes, etc: https://trmm.net/Category:Vector_display


If someone could explain how this works to someone who only understands basic circuits, that would be much appreciated. How does it maintain state and draw shapes on the oscilloscope and trigger sounds with such basic components? Amazing!


I'll try my best to explain with my electronics hobby background...

It's full of analog circuitry like integrators, comparators, op amps etc (note: it's made from discrete transistors, so you won't find an opamp chip in there). The "state" as you mentioned is maintained as a a voltage.

The velocity of the ball is stored as a voltage, and the position is produced by integrating that with an integrator. Collisions are found with a comparator, and connected to the circuitry that maintains the velocity.

The output to the oscilloscope is two voltages that control the position of the beam.

Analog electronics is one of those dying art forms where the number of people capable of doing things like this is quickly dwindling. It's no longer a viable way of building actual products except for a few special applications.

I find it a sad state of affairs that we, the mankind, have learned and developed skills and knowledge that we'll be collectively forgetting less than a century later.


I find it hard to believe that analogue electronics is disappearing. I'm an undergrad ECE student and the largest part of my course is analogue, with work in labs too. Granted, it's not an immensely popular hobby, but many art forms and jobs are necessary but aren't hobbies.


If it's RF, or chip-surface level - there's analog in there somewhere. While digital logic is somewhat forgiving, for production level work you do need to have some understanding of analog to make a successful design and stable implementation. Plus there's always the power-supply stuff, and a bunch of other things that will always be analog as well. So I agree that it won't completely die off (especially in the commercial realm) - but it certainly isn't as common in the hobbyist world as it once was.

/saying this as someone who considers analog a black though beautiful art


There is plenty of analog work in the RF engineering careers. I mostly do digital but most of my coworkers started out and currently work on analog boards. Although we are moving a lot of our stuff to SDR so the RF board in the product is just getting smaller but needs to be able to handle larger bitrates.


The oscilloscope works like a vector display (or x-y plotter). A circle can be displayed by feeding a sinewave voltage to the Y input and a cosine to the X input. Adding a voltage to the Y input moves the ball up and down. Similarly, adding a voltage to the X input moves the ball left to right. Increasing the amplitude of both the X and Y signal will enlarge the ball. State is maintained by flip-flops built from discrete transistors (mono-stable multivibrators). Collision detection is just a matter of comparing the X and Y voltage of object A to the X and Y voltage of object B. If the voltage are (almost) the same, both objects are on the same screen position.


A quick view of the system he uses comparators and function generators to create signals for the x/y/ball/paddles, which in case of the ball hitting the x/y axis limit are equal to the lowest or highest of the x/y axis triangular signal which will signal a 'hit'. But this was looked at in a glance and it is quite a lot more complex and mostly goes beyond mis simple analogue electronic knowledge.

See the link on the form post for the schematics and some example readouts of the signals.


I think these images are called "Lissajous Figures".


A Lissajous figure is what you get when both the X and Y positions of the beam (or virtual beam) are controlled by sinusoidal oscillators. This is using the same XY mode on the oscilloscope as used for drawing Lissajous figures but it's not a Lissajous figure itself.


Technically (loosely) the way the ball (circle) in the game is a lissajous figure; it uses a scaled sin and cosine signal driving the x and y input of the oscope to create it. It's one of several signals (mainly on the y-side) that are mixed down (done in a similar manner to a simple op-amp backed audio mixer circuit) before being sent to the scope input.


It's more like a custom homebrew analog computer with a few unusual additions.

Seriously impressive.


I wonder if the person who made it knew about Tennis for Two? https://en.wikipedia.org/wiki/Tennis_for_Two


Almost certainly. His youtube channel spends a large amount of time tearing down oscilloscopes and other electronic test equipment.


I remember doing similar in MIT digital lab in 1975. My team built Conways Game of Life out of TTL gates. I did the display on the oscilloscope. The grid was 32 by 32, limited by memory sizes at the time. Memory was the most expensive chips at the time, so the lab rationed them. We had double buffer design. One chip held the current generation for display and input to the game engine. The other chip held the next generation.


Next step: build his analog pong computer into his home built CRO? Just like having "snake" inside your phone, but it's pong inside your CRO.

https://www.eevblog.com/forum/projects/designed-a-cro-in-spi...


Lol, this reminds me of the time many moons ago when a highly experienced tech showed me how to receive and display (good ol' NTSC) TV on a scope


Wow! That's some serious analog talent.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: