How Random Is Random?

Many languages feature a random number generator library for help with tasks like rolling a die or flipping a coin. Why, you may ask, is this necessary when humans are perfectly capable of randomly coming up with values?

[ex-punctis] was curious about the same quandary and decided to code up an experiment to test the true randomness of human. A script guesses the user’s next input from two choices, keeping a tally in the JavaScript backend that holds on to the past five choices. If the script guesses correctly, they take $1 from the user. Otherwise, the user earns $1.05.

The data from gathered from running the script with 200 pseudo-random inputs 100,000 times resulted in a distribution of correct guess approximately normal (µ=50% and σ=3.5%). The probability of the script correctly guessing the user’s input is >57% from calculating µ+2σ. The result? Humans aren’t so good at being random after all.

It’s almost intuitive why this happens. Finger presses tend to repeat certain patterns. The script already has a database of all possible combinations of five presses, with a counter for each combination. Every time a key is pressed, the latest five presses is updated and the counter increases for whichever combination of five presses this falls under. Based on this data, the script is able to make a prediction about the user’s next press.

In a follow-up statistic analysis, [ex-punctis] notes that with more key presses, the accuracy of the script tended to increase, with the exception of 1000+ key presses. The latter was thought to be due to the use of a psuedo random number generator to achieve such high levels of engagement with the script.

Some additional tests were done to see if holding shorter or longer sequences in memory would account for more accurate predictions. While shorter sequences should theoretically work, the risk of players keeping a tally of their own presses made it more likely for the longer sequences to reduce bias.

There’s a lot of literature on behavioral models and framing effects for similar games if you’re interested in implementing your own experiments and tricking your friends into giving you some cash.

Turning Old Toggle Switches Into Retro-Tech Showpieces

While those of us in the hacking community usually focus on making new things, there’s plenty to be said for restoring old stuff. Finding a piece of hardware and making it look and work like new can be immensely satisfying, and dozens of YouTube channels and blogs exist merely to feed the need for more restoration content.

The aptly named [Switch and Lever] has been riding the retro wave for a while, and his video on restoring and repairing vintage toggle switches shows that he has picked up a trick or two worth sharing. The switches are all flea market finds, chunky beasts that have all seen better days. But old parts were built to last, and they proved sturdy enough to withstand the first step in any restoration: disassembly. Most of the switches were easily pried open, but a couple needed rivets drilled out first. The ensuing cleaning and polishing steps were pretty basic, although we liked the tips about the micromesh abrasives and the polishing compound. Another great tip was using phenolic resin PCBs as repair material for broken Bakelite bodies; they’re chemically similar, and while they may not match the original exactly, they make for a great repair when teamed up with CA glue and baking soda as a filler.

3D-printed repairs would work too, but there’s something satisfying about keeping things historically consistent. Celebrating engineering history is really what restorations like these are all about, after all. And even if you’re building something new, you can make it look retro cool with these acid-etched brass plaques that [Switch and Lever] also makes.

Continue reading “Turning Old Toggle Switches Into Retro-Tech Showpieces”

Modular Music Synthesis On The Web

It is hard to imagine how the electronics hobby survived without the Internet. You found like-minded people and projects in magazines. And it is even harder to imagine what projects were in the magazines before the widespread availability of CPU chips. Think about it, there are only so many things you can build with a handful of tubes, transistors, and small ICs. But before the computer revolution took over the hobby, there were always a lot of articles about music synthesis. Coming full circle, you can now build a virtual synthesizer on the web using Zupiter, a modular synthesizer that runs in your browser.

That link is actually about Zupiter, but you can go straight to it if you just want to play. However, we had to do a little reading and try some of the examples, too. You can see a video about the synthesizer, below.

Continue reading “Modular Music Synthesis On The Web”

Literal Stretch-Sensing Glove Reconstructs Your Hand Poses

Our hands are rich forms of gestural expression, but capturing these expressions without hindering the hand itself is no easy task–even in today’s world of virtual reality hardware. Fret not, though, as researchers at the Interactive Geometry Lab have recently developed a glove that’s both comfortable and straightforward to fabricate while capturing not simply gestures but entire hand poses.

Like many hand-recognition gloves, this “stretch-sensing soft glove” mounts the sensors directly into the glove such that movements can be captured while hands are out of plain sight. However, unlike other gloves, sensors are custom-made from two stretchable conductive layers sandwiched between a plain layer of silicone. The result is a grid of 44 capacitive stretch sensors. The team feeds this datastream into a neural network for gesture processing, and the result is a system capable of reconstructing hand poses at 60Hz refresh rates.

In their paper [PDF], the research team details a process of making the glove with a conventional CO2 laser cutter. They first cast a conductive silicone layer onto a conventional sheet of silicone. Then, with two samples, they selectively etch away the conductive layer with the unique capacitive grid images. Finally, they sandwich these layers together with an additional insulating and glue it into a hand-shaped textile pattern. The resulting process is a classy use of the laser cutter for the design of flexible capacitive circuits without any further specialized hardware processes.

While we’re no stranger to retrofitting gloves with sensors or etching unconventional materials, the fidelity of this research project is in a class of its own. We can’t wait to see folks extend this technique into other wearable stretch sensors. For a deeper dive into the glove’s capabilities, have a look at the video after the break.

Continue reading “Literal Stretch-Sensing Glove Reconstructs Your Hand Poses”

Connected World Contest: Four Top Winners Announced

We love seeing the astonishing array of projects large and small entered into Hackaday contests which push the boundaries of what is possible. Our latest has been the Connected World contest which was announced back in June, and today we’re pleased to bring you its four top winners. As a recap, the brief was to create something that connects wirelessly and shows a blend of creativity and functionality. The final four have a diverse range of applications, and here they are with their respective categories:

Continue reading “Connected World Contest: Four Top Winners Announced”

These Dice Know If You’re Cheating

Fans of D&D are surely aware of the significance of a good pair of dice. What if your dice were not only stylish, but smart? For anyone who’s ever had to deal with playing board games with less than reputable siblings or friends, the electric die just might be your savior.

The dice are configured via Bluetooth, tracking rolls and stats over the course of gameplay captured by an accelerometer.

The PCB had to have a flexible surface – specifically in the shape of an unfolded icosahedron – in order to form the shape of the die which constrains the design to two layers. Each face contains an LED facing outwards to light up the number on that side. The LEDs are directly powered by a rechargeable battery, which uses a small coil for wireless inductive charging. Rather than opting for a Qi charger chipset, which regulates the maximum amount of power transmitted if the efficiency falls below a threshold, [Jean Simonet] uses a simpler charger setup using a full bridge rectifier, capacitors, and a linear regulator to create a stable 5V supply for the receiving end.

While the initial design for the die required an injection molded plastic shell, an easier solution was to simply cast the designs in resin. The electronics are placed into a dice mold and cast just as a regular die would be.

This luckily also solved the issue of needing to fit the components inside a screw-on container with a removable lid, which presented a hassle in terms of finding a battery that would fit the dimensions. The LEDs – purchased for cheap on Alibaba – are daisy chained to reduce the complexity of the routing.

One issue with the LEDs, however, is that the internal PWMs modulating the intensity remain on even at an intensity of 0, constantly drawing 21 mA (for the 21 LEDs on the die). This causes the battery to die after 2-3 hours. The solution [Simonet] used was to add a transistor to cut off power to the LEDs and to have the MCU toggle the transistor when the LEDs are turned off. Even this solution didn’t solve the entire problem since the LEDs still drain current from the data and clock lines, so those lines had to be low before going to sleep.

There were some stability issues with using a small buck converter to bring the LiPo voltage down to 3.3V, so the power regulation was done directly by the MCU instead. Switching the die off is controlled by a magnetic switch connected to a power buck converter that turns off logic when a magnet is present. This initially caused the LED control lines to become floating when power was turned off, turning the LEDs to arbitrary colors. The solution was to wire the output of the magnetic sensor to the MCU and to allow the software to handle the LEDs as well.

Maybe it’s because creator [Simonet] happens to be a game developer as well, but the early development stages of the electronic die (CAD, circuit schematics, prototyping, hand soldering components) were streamed on Twitch, adding some interactivity to even the build phase. The end result may be small, but these dice certainly have large brains!

Continue reading “These Dice Know If You’re Cheating”

Willem Kolff’s Artificial Organs

In my youth I worked for a paid ambulance service, and while we all lived for the emergency calls, the routine transports were the calls that paid the bills. Compared with the glamor and excitement of a lights-and-siren run to a car wreck or heart attack, transports were dull as dirt. And dullest of all were the daily runs from nursing homes to the dialysis center, where rows of comfy chairs sat, each before a refrigerator-sized machine designed to filter the blood of a patient in renal failure, giving them another few days of life.

Sadly, most of those patients were doomed; many were in need of a kidney transplant for which there was no suitable donor, while some were simply not candidates for transplantation. Dialysis was literally all that stood between them and a slow, painful death, and I could see that at least some of them were cheered by the sight of the waiting dialysis machine. The principles of how the kidneys work have been known since at least the 1800s, but it would take until 1945 for the efforts of a Dutch doctor, using used car parts and sausage casings, to make the predecessor of those machines: the first artificial kidney.

Continue reading “Willem Kolff’s Artificial Organs”