Automated Dice Tester Uses Machine Vision To Ensure A Fair Game

People take their tabletop games very, very seriously. [Andrew Lauritzen], though, has gone far above and beyond in pursuit of a fair game. The game in question is Star War: X-Wing, a strategy wargame where miniature pieces are moved according to rolls of the dice. [Andrew] suspected that commercially available dice were skewing the game, and the automated machine-vision dice tester shown in the video after the break was the result.

The rig is a very clever design that maximizes the data set with as little motion as possible. The test chamber is a box with clear ends that can be flipped end-for-end by a motor; walls separate the chamber into four channels to test multiple dice on each throw, and baffles within the channels assure randomization. A webcam is positioned below the chamber to take a snapshot of each “throw”, which is then analyzed in OpenCV. This scheme has the unfortunate effect of looking at the dice from the table’s perspective, but [Andrew] dealt with that in true hacker fashion: he ignored it since it didn’t impact the statistics he was interested in.

And speaking of statistics, he generated a LOT of them. The 62-page report of results from his study is an impressive piece of work, which basically concludes that the dice aren’t fair due to manufacturing variability, and that players could use this fact to cheat. He recommends pooled sets of dice to eliminate advantages during competitive play. 

This isn’t the first automated dice roller we’ve seen around these parts. There was the tweeting dice-bot, the Dice-O-Matic, and all manner of electronic dice throwers. This one goes the extra mile to keep things fair, and we appreciate that.

Continue reading “Automated Dice Tester Uses Machine Vision To Ensure A Fair Game”

Electric Cars Sound Off, Starting July 1st

By and large, automakers have spent much of the last century trying to make cars quieter and more comfortable. Noise from vehicles can be disruptive and just generally annoying, so it makes sense to minimise it where possible.

However, the noise from the average motor vehicle can serve a useful purpose. A running engine acts as an auditory warning to those nearby. This is particularly useful to help people avoid walking in front of moving vehicles, and is especially important for the visually impaired.

Electric vehicles, with their near-silent powertrains, have put this in jeopardy. Thus, from July 1st, 2019, the European Union will enforce regulations on the installation of noise-making devices on new electric and hybrid vehicles. They are referred to as the “Acoustic Vehicle Alert System”, and it’s been a hot area of development for some time now. Continue reading “Electric Cars Sound Off, Starting July 1st”

Seeing Transistors Switch In Infrared

In the hacker and DIY community, there are people who have exceptional knowledge and fantastic tools. These people are able to do what others could only dream about, and that others can only browse eBay looking for that one tool they need to do the job. One of these such people is [John McMaster]. He is the resident expert on looking inside integrated circuits. He drops acid on a chip, and he can tell you exactly how it works on the inside.

At the hardwear.io conference, [John] shared one of his techniques for reverse-engineering intgrated circuits. He’s doing this by simply looking at the transistors, and looking at the light they give off. He’s also looking at the wrong side of the die.

The technique [John] is using is properly called backside analysis, or looking at the infrared emissions of electron recombinations. This happens at the junction of every transistor when it’s active, and these photons are emitted at the bandgap of silicon, or about 1088 nm, far into the infrared. This sort of thing has been done before by [nedos] at CCC in 2013, but rarely have we seen a deep dive into the tools and techniques needed to look at the reverse side of an IC and see the photons coming off.

An IC, seen in infrared

There are several tools [John] used for this work, and he actually did a good comparison of different camera technologies used to image infrared photon emissions from integrated circuits. InGaAs cameras are expensive, but they offer high sensitivity. New back-illuminated CMOS cameras and cooled CCDs normally reserved for astrophotography were also tested, and as always, you get what you pay for; the most expensive cameras worked best, but there were ways you could make the cheap ones work.

As with any camera work, preparing the lighting is of utmost importance. This includes an IR pass filter, and using only LED lighting in the lab with no sunlight, incandescent, or halogen light bulbs in the room — you don’t want any IR, after all. A NIR objective in the microscope was sourced from eBay, for about 1/10th the normal cost, because the objective had a small, insignificant scratch. Using this NIR objective made the image twice as bright as any other method. You can successfully image a chip with this, and [John] tested the setup on a resistor inside a CD4050 chip; the resistor glowed a slight purple, the color you would expect with infrared sensors. But can it work with I/O levels in a more modern chip? Also, yes. It needs some Photoshop to process, and stretching the 12-bit or 16-bit color space into an 8-bit color space, but it does work.

Finally, the supreme achievement of doing backside IR analysis. Is that possible with even this minimal setup? This requires some preparation; the silicon substrate in an IC is transparent in IR, but there is attenuation and this is especially important when the substrate is 300 um thick. This needs to be shaved down to about 25 um thick, which surprisingly is best done with fine sandpaper and a finger.

While few IR emissions were observed via backside emissions, the original plan wasn’t to completely analyze the chip, but merely to do some floor planning. For this, it worked. It’s a remarkable amount of work to see the inside of a silicon chip.

Steamed Hams Localized Entirely Within A Printed Circuit Board

Maybe you’ve heard of a TV show called The Simpsons. Steamed Hams make a one-gag appearance in an unforgettable luncheon where Principal Skinner poker-faces his way out of a disaster with Superintendent Chalmers. Meanwhile, over on imgur, [Agumander] has put a black and white screencap from Steamed Hams in a printed circuit board.

The memory for this chip is an AT28C64, a 64 kilobit or 8 kilobyte steamed RAM. You call it a steamed RAM despite the fact that it is obviously a ROM. There is no microcontroller on this board or really anything resembling programmable logic. Everything is just logic chips. This board displays a 256×256 1 bit per pixel image over composite video. The sync is generated with the help of a 14MHz crystal and some circuitry taken from the original PONG board. Other than that, it’s just a bunch of NANDs and ORs that roll through the address space of the ROM and spit values out over a composite video port.

The build began by breadboarding everything save for a nifty solderless breadboard power adapter. Three ROM chips were programmed with different images — a cat, something to do with vaporwave, and some guy that looks like the poster from Eraserhead. Everything worked on the breadboard — yes, even at 14 MHz — so the build moved on to a printed circuit board.

The result is fantastic, and should work well on anything with a composite video port. We’re awarding bonus points for putting a socket on the ROM, simply so [Agumander] can change the image without whipping out the desoldering braid. If you need a refresher on Steamed Hams, it’s from the 7th season Simpsons episode ’22 Short Films About Springfield’.

A Baby Named DJ

Some of us are guilty of picking up questionable hardware from garage sales, fleamarkets, and well-meaning relatives. There is a balance between turning down a good investment and hoarding, and if we figure out how to tell the difference you will be the first to know. [Clem Mayer] may start on the side of unwise acquisition, but he pushes a broken fetal detector into the realm of awesome by converting it to an analog synthesizer, born to headline at an Eastern European dance party.

He starts with a basic teardown, and we get to see how old hardware was serviceable with only two standard screws. It is a good thing too, because the nickel-cadmium batteries are older than some of you and they are in need of replacement. New nickel-metal hydride batteries got it up and running but [Clem] does not have a baby bump so its functionality turned to Pink Floyd era synthesizer circuit bending. Circuit bending involves modifying a circuit for sound it was not intended to make.

Continue reading “A Baby Named DJ”

Abusing A CPU’s Adders To Optimize Bit Counting

If you like nitpicking around C code and generated assembly language — and we’ll admit that we do — you shouldn’t miss [Scaramanga’s] analysis of what’s known as Kernighan’s trick. If you haven’t heard of the trick, it’s a pretty efficient way of counting bits.

Like the Wheatstone bridge and a lot of other things, the Kernighan trick is misnamed. Brian Kernighan made it famous, but it was actually first published in 1960 and again in 1964 before he wrote about it in 1988. The naive way to count bits would be to scan through each bit position noting how many one bits you encounter, but the problem is, that takes a loop for each bit. A 64-bit word, then, takes 64 loops no matter what it contains. You can do slightly better by removing each bit you find and stopping when the word goes to zero, but that still could take 64 cycles if the last bit you test is set.

Continue reading “Abusing A CPU’s Adders To Optimize Bit Counting”

Hams Gone Wild: Amateur Radio Field Day 2019

Of all the images that amateur radio conjures up, the great outdoors doesn’t usually figure heavily. People seem to think hams sit in a dark room at a desk heavy with radio gear, banging out Morse code into late into the night and heedless of the world outside the window. All of which sort of sounds like hard-core gaming, really.

And while that image certainly applies in a lot of cases, hams do like to get out and about at least once a year. That day is upon us with the 2019 Amateur Radio Field Day. Hams across North America reserve the fourth full weekend of each June to tear themselves out of their shacks and get into the world to set up operations in some kind of public venue, generally a park or other green space. Part cookout, part community outreach, and part slumber party – it lasts all weekend and goes around the clock – hams use field day as a chance to show the general public where amateur radio really shines: real-time worldwide communications under austere conditions.

It’s also a chance to get folks excited about getting their license, with many Field Day locations hosting “Get on the Air” stations so that unlicensed folks can try making a contact under the supervision of a licensed operator. Licensed but underequipped hams also get the chance to spin the knobs on someone else’s gear, and maybe line up that first rig purchase. And there are plenty of opportunities to learn about new modes as well, such as FT8 and WSPR. As an example your scribe is looking for some guidance on getting started with APRS, the automated packet reporting system that’s used for things like high-altitude balloon tracking.

If you have any interest at all in learning how to properly operate radio equipment, you owe it to yourself to track down the nearest Field Day location and stop by. The American Radio Relay League (ARRL) has a ton of Field Day information, from a map to locate the 1500 Field Day sites to rules for the contests that will be run that weekend to guides for setting up and operating an effective Field Day setup. There will be 40,000 hams out there this year, and they’d all be thrilled if you drop by and ask a few questions.

Continue reading “Hams Gone Wild: Amateur Radio Field Day 2019”