Random Number Generation By Brain

If you want to start an argument in certain circles, claim to have a random number generation algorithm. Turns out that producing real random numbers is hard, which is why people often turn to strange methods and still, sometimes, don’t get it right. [Hillel Wayne] wanted to get a “good enough” method that could be done without a computer and found the answer in an old Usenet post from random number guru [George Marsaglia].

The algorithm is simple. Pick a two-digit number — ahem — at random. OK, so you still have to pick a starting number. To get the next number, take the top digit, add six, and then multiply by the bottom digit. So in C:  n1=(n/10+6)*(n%10). Then use the last digit as your random number from 0 to 9. Why does it work? To answer that, the post shows some Raku code to investigate the behavior.

In particular, where does the magic number 6 come into play? The computer program notes that not any number works well there. For example, if you used 4 instead of 6 and then started with 13, all your random digits would be 3. Not really all that random! However, 6 is just a handy number. If you don’t mind a little extra math, there are better choices, like 50.

If you think humans are good at picking random numbers, ask someone to pick a number between 1 and 4 and press them to do it quickly. Nearly always (nearly) they will pick 2. However, don’t be surprised when some people pick 141. Not everyone does well under pressure.

If you want super random numbers, try a lava lamp. Or grab some 555s and a few Nixie tubes.

A Dim Bulb Tester Is For Testing Other Equipment, Not Bulbs

If you’re testing old stereo equipment, a dim bulb tester can really come in handy. It’s not for testing bulbs, though, it’s a tester that uses a dim bulb to test other things. [Nicholas Morganti] explains it all in his guide to making your own example of such a tool. Just be wary — you need to know what you’re doing with mains voltages to do this safely!

The dim bulb is a deceptively simple tool that nonetheless often proves useful in diagnostics. It normally just consists of a bulb connected in series with the equipment under test. The bulb is intended to be a similar wattage to the power draw of the equipment itself. Take for example, an amplifier. If the bulb glows brightly when the amp is under no load, it suggests there may be a short circuit somewhere. That’s because the glowing bulb indicates that plenty of current is being drawn under a condition when very little should be flowing. The bulb protects the equipment by essentially acting as a bit of a current limiting device. It’s a soft-start tool for a piece of vulnerable equipment.

Building one is usually as simple as gathering an enclosure, a plug receptacle, a bulb socket, and some other ancillary parts to lace everything together. [Nicholas] explains it all with clear diagrams and tells you how to follow along. It’s easy enough, but you really need to know what you’re doing to use one safely, as mains voltages are involved.

It’s a great tool to have if you’re getting into amplifier repair or similar work on old gear. If you’ve been whipping up your own must-have tools, don’t hesitate to let us know!

Another Tesla Coil Starts

Everyone interested in electronics should build at least one Tesla coil. But be careful. Sure, the high voltage can be dangerous, but the urge to build lots of coils is even worse. [Learnelectronics] shows how to build a slayer exciter using a 3D-printed core, and lots of wire of course. You can see the coil, an explanation of the design, and a comparison to a cheap kit in the video below.

Of course, you hear about Tesla coils, but it is really more of a Tesla transformer. The 3D-printed core holds the many turns of the secondary coil. The larger Tesla coil, amusingly, upset the camera which made it hard to get close-up shots.

Continue reading “Another Tesla Coil Starts”

World’s First Precision Lathe: Indispensable When Constructing The Antikythera Mechanism

The precision lathe with the hooks, the bowstring, and vise visible as material is being processed. (Credit: Clickspring)

We commonly tend to associate lathes with the Industrial Revolution, when metalworking shifted largely from blacksmiths to machinists, but the use of lathes is much older than that. As [Chris] over at the Clickspring YouTube channel demonstrates in a recent video, small precision lathes were exceedingly common in the Ancient World. Not only is there ample historical evidence of them being used as far back as 1300 BCE in Ancient Egypt, but they’re also the most optimal way to get perfectly round pins and other, more intricate shapes that would be an absolute nightmare to create with just some metal files and chisels.

In the video, [Chris] uses two metal hooks, bent in a ninety-degree angle and clamped down in a vise, tapering towards each other into points. A bow string around a round piece of wood is used to bootstrap a more permanent retention element and bushing for the bow string as it is drawn over the wood to rotate it. Subsequent material that has to be worked on in the lathe is then clamped between the two points. This way, using basic materials that have been around for thousands of years and some muscle power, it’s possible to create a small lathe that can be used to create perfectly symmetrical shapes, such as those used in the construction of the Antikythera Mechanism, which [Chris] has been rebuilding for the past years, using only period-correct tools. He’s learned a lot about the mechanism in the process.

Continue reading “World’s First Precision Lathe: Indispensable When Constructing The Antikythera Mechanism”

Remote-Control Kinetic Sand Table Uses A Single Arduino

There’s nothing fun about a Sisyphean task unless you’re watching one being carried out by someone or something else. In that case, it can be mesmerizing like this Arduino-driven kinetic sand table.

What you can’t see. Image via [thang010146] on YouTube
Like many of these builds, it all started with an ordinary coffee table from the hacker’s favorite furnitüre store. [NewsonsElectronics] opened it up and added a 3mm-thick board to hold the sand and another to hold the rails and magnets.

After designing some pieces to connect the rails and pulleys together, [NewsonsElectronics] let the laser cutter loose on some more 3mm stock. A pair of stepper motors connected to a CNC shield do all of the work, driving around a stack of magnets that causes the ball bearing to trudge beautifully through the sand.

Be sure to check out the videos after the break. The first is a nice demonstration, and the second is the actual build video. In the third video, [NewsonsElectronics] explains how they could write the world’s smallest GRBL code to swing this with a single Arduino. Hint: it involves removing unnecessary data from the g-code generated by Sandify.

Don’t have a laser cutter? Here’s a sand table built from 3D printer parts.

Continue reading “Remote-Control Kinetic Sand Table Uses A Single Arduino”

Pinball With No Computers

Pinball machines were the video games of their day. Back when they were king, there were no microcontrollers — everything was electromechanical. We know from experience that fixing these was difficult but we imagine that designing complex play behavior with a bunch of motors, relays, clutches, contacts, and more would have been excruciatingly difficult. [Technology Connections] has several videos about an old Aztec machine and he promises more to come. You can watch the first two below.

To give you an idea of what’s involved, imagine a very simple pinball machine that supports a single player and a handful of targets. When the ball hits a target, that could trigger a micro-switch. The switch closure could trigger a relay that closes a contact for a short period of time. That contact energizes a solenoid that advances the score wheels. So now, when a ball hits a target, the score wheel will spin enough to award ten points. To make sure there is enough time for the score to advance, the relay uses something like a mechanical flip flop.

Sound complicated? That’s nothing. Don’t forget, the machine also has to reset the score at the start of the game, count the ball in play, and end the game when the last ball returns. Then consider a real game. There will be multiple players and fancy sequences (e.g., hit the red target three times to award double scores for other targets).

While we knew a fair bit about the design of pinball machines already, we did learn a lot about their history and where the idea came from. The video also explains why it is called pinball since modern machines don’t really have pins — these were like relay-based computers with strange electromagnetic I/O devices.

While pinball machines were the best example of this sort of thing, there were also things like bowling machines and ladder-logic industrial control systems. We’ve even seen an electromechanical phone answering machine.

Continue reading “Pinball With No Computers”

Tube Design Tips To Save A Writer’s Project

Most of the stories we cover here are fresh from the firehose, the newest and coolest stuff to interest you during your idle moments. Sometimes though, we come across a page that’s not new, but is interesting in its own right enough to bring to your attention. So it is with our subject here, because when faced with a tube circuit design problem, we found salvation in a page from [The Valve Wizard].

Do you need to apply negative feedback to a triode amplifier? The circuit is simplicity itself, but sadly when we were at university they had long ago stopped teaching the mathematics behind the component values. Step forward everything you need to know about triode amplifier negative feedback.

Negative feedback is a pretty simple idea: subtract a little of the amplifier’s output from the input. It reduces the amplifier’s gain with a flat response, so it’s useful for removing humps in the frequency response and reducing the tendency for distortion. In a single-ended triode amp it’s done with a resistor and capacitor from anode to grid, but the question is, just what resistor or capacitor?. Here the page has all the answers, taking the reader through calculating the desired gain, and picking the value of the capacitor to avoid affecting the frequency response. We wish that someone had taught us this three decades ago!

The website is full of really useful info about valve or tube amps, and it’s worth mentioning that he’s made it available in book format too. There’s no reason not to have a go at vacuum electronics. Meanwhile in case you are wondering what project prompted this, it was a quest to improve upon this cheap Chinese kit amplifier.