What a punch card looks like to openCV

21st Century Punch Cards Are 3D Printed And Read By OpenCV

While a punch card is perhaps the lowest-density storage medium available, it has some distinct advantages. As [Bitroller] points out in the write-up of his punch card project, if he was using stainless steel instead of PLA his 3D printed punch cards would likely outlast everything he owns, and survive a five-alarm fire to boot. If you have 16 bytes you really, really don’t want to forget — or are willing to store your private key in a shoe box — this project might be of interest.

The nice part is that he’s built a handy Python script to generate printable files for the punch cards, which encode 16 bytes of information and 4 bytes of error correction using the Reed-Solomon algorithm. That’s just enough for a password and the error correction means up to two bytes can be recovered in the case of read failure.

The reading is where this gets interesting — again, [Bitroller] provides a handy script, but this one uses OpenCV to read the entire punch card at once from a webcam image, using the contrast between a black table and the light-colored PLA cards. It’s massively overkill and would have needed a supercomputer in the days when punch cards were common I/O, but that’s what makes this a great hack.

We only have one quibble: if you use additive manufacturing, can you still call it a punch card? Nothing was punched out, after all.

If you think punch cards are totally irrelevant in the modern day, well, you might be right– but that doesn’t stop us from playing with them. If punch cards make you think of Big Iron in the early days of computing, maybe think further back– they were used for everything from Jacquard looms to the original MIDI.

Measure The Earth’s Rotation Victorian Style

You’ve probably seen a Foucault pendulum in a museum. This Victorian-era science demonstration is named after physicist Léon Foucault and shows how the Earth rotates compared to a pendulum moving in a fixed plane. [RyanCreates] shows you how you can make your own, and it is surprisingly simple.

All you need is a heavy weight like a small mushroom anchor, fishing line, and a swivel — all things you can pick up at any sporting goods store. You’ll need a way to suspend it all, such as an eye hook in the ceiling.

In addition to the mechanical parts, the build calls for a camera to record the results and a lighter or other source of flame. The reason? To release the pendulum, you burn a thread that prevents it from swinging. This allows for a clean release with no sideways force.

The amount of your rotation depends on your latitude. At 33 degrees north, for example, you can expect 360*sin(33)/24 or 8.17 degrees per hour of rotation. [Ryan] measured a somewhat larger number, which was probably due to an error source, especially since he is measuring the angle using captured camera frames in Photoshop. That has to introduce some error, and small pendulums like this are incredibly sensitive to errors.

If you try it and find the source of the error, we’re sure [Ryan] would love to hear from you. Museum pieces are typically much larger, have ultra-low-friction pivots, and use electromagnets to keep the pendulum moving since, after all, even a Foucault pendulum can’t run forever.

This Random Number Generator Does It With Neon

The quest for true randomness has roots in cryptography and is a rabbit hole that gets surprisingly deep with alarmingly rapidity. Still, the generation of random-enough numbers is a popular hacker project. Part of the appeal is the way these devices strive to incorporate physical phenomena, and in [Joshua Coleman]’s case, his Neon Entropy (Pseudo) Random Number Generator uses a trio of vintage neon lamps.

Neon lamps discharge at rates that vary unpredictably. They’re also pretty to look at.

[Joshua] chose neon lamps in part because the discharge rate of an energized lamp is a variable, physical process that makes a good source of entropy. They also have an attractive visual appeal that fits the concept [Joshua] had in mind. Unlike random number generators that kick off by measuring radiation or some other imperceptible thing, it’s possible — at least in a sense — to see this one working.

The small variations in the three neon lamps are measured optically by three TEPT4400 ambient light sensors (isolated from the neon lamps themselves) and turned into analog signals. A Raspberry Pi Pico W reads these signals, then uses them in a process that culminates in SHA-256 64-bit values that can be used as random seeds.

There’s also a web dashboard that shows everything live, furthering the “watch it work” concept [Joshua] is aiming for. The video below shows the project in action if you want to see how the sausage gets made.

Earlier we mentioned how random number generators are popular projects among hackers, and here are a few selected ones. Don’t miss the stylish glow and slick enclosure of this Nixie tube RNG, or the lava lamp RNG which is in fact not a gimmick. And while it is commonly understood that meaningful randomness must come from outside a digital chip, uninitialized internal volatile RAM — if accessed correctly — can be a remarkably good source of entropy.

Continue reading “This Random Number Generator Does It With Neon”

Wigglegrams With A Pinhole Camera

A pinhole camera is almost a rite of passage in photography, given that you can make one so easily with little more than a cardboard box and enough tape to keep the light from coming through the cracks. [Socialmocracy] has made one that’s 3D printed, and it’s a nice design that takes 4″ by 5″ photographic paper. The shutter is held on with magnets, and the lid is attached with thumbscrews.

As neat as printed pinhole cameras are, it’s not as though they’re particularly uncommon. What makes this one stand out from the rest is that it’s actually two cameras in one. One box, two cameras, side by side. Landscape format and it’s a pair of panoramic cameras, while in portrait mode it’s a stereo camera. Even the simplest of cameras can do wigglegrams!

We like this camera, because it manages to add something to such a simple formula.. He’s taking comments on whether to release the STLs, so drop in your two cents.

Continue reading “Wigglegrams With A Pinhole Camera”

A 1947 Radio Gets A Face Lift

We’ve all done it. We spy an old radio at a garage sale or resale shop. We know someone should bring it back to life, but it looks like a project, so we pass it by. Not [Ken] from [Ken’s Shop]. He found an Arvin 664A AM radio from 1947 in what appears to be a home-built cabinet and decided to bring it back to life.

From what we could find, the original case was a white plastic, not the wood box it is in today. So the first challenge was simply getting inside to see what was going on. Continue reading “A 1947 Radio Gets A Face Lift”

A man's hand is shown holding a color photograph of a vase of flowers against a black background.

True-Spectrum Photography With Structural Color

Although modern cameras can, with skill and good conditions, produce photographs nearly indistinguishable from the original scene, this fidelity relies on the limitations of human vision. According to the trichromatic theory, humans perceive light as a mixture of three colors, which can be recorded and represented by cameras, displays, and color printing; a spectrometer, however, can detect a clear distance between the three colors present in a photograph and the wide range of spectra in the original scene. By contrast, one of the earliest color photography methods, Lippmann plates, captured not just true color, but true spectra.

A Lippmann plate, as [Jon Hilty] details, starts with a layer of photographic gel containing extremely fine silver halide crystals over the back of a glass plate. This layer is placed on top of a mirror, traditionally a mercury bath, and put in the camera. When light passes through the emulsion and reflects off the mirror, it interferes with incoming light to create a standing wave. The portions of the emulsion at the wave’s antinodes absorb the most energy, converting local silver halide crystals into reflective silver. The spacing of the silver particles depends on the incoming light’s wavelength, and is fixed in place during the development process.

This creates a matrix of vertically-stacked diffraction gratings, each diffracting back the original wavelength when illuminated with white light. Unlike normal diffraction gratings, the wavelength of diffracted light doesn’t depend strongly on the viewing angle; since the interference structure here is vertically-arranged, it refracts a narrow range of wavelengths across all possible viewing angles. The viewing angles, however, are limited; unlike with dye-based photographs, you can only view the colors nearly straight-on. This, along with the necessity for long exposures, the chance of producing washed-out colors, and the impossibility of creating reprints, kept Lippmann plates from ever really catching on. The basic concept lives on in holograms, which encode spatial information in a similar kind of photographically-formed diffraction pattern.

For a more conventional method of color photography, we’ve also seen a recreation of the autochrome method. Alternatively, check out this homemade silver halide photography emulsion.

Thanks to [Stephen Walters] for the tip!

Matching Transistors

Transistors in some circuit configurations work together and, frequently, need to be matched. This is so common that you can sometimes find ICs that are just a pair of transistors made with the same piece of silicon, so they should be matched very closely by default. But with discrete transistors, two devices of the same type are not always identical. [Learn Electronics Repair] covers the topic and explains how to match devices in the video below.

Depending on the circuit, the matching parameters may be different, but generally, the idea is that you want similar gains or matching saturation characteristics. The reason is that when you have multiple transistors working together, you don’t want one to do more work than the other device. This is inefficient and could drive the “better” component to fail.

Continue reading “Matching Transistors”