Flipping A Coin 10,000 Times With A Dedicated Machine

Flipping a coin is often the initial example used to help teach probability and statistics to maths students. Often, there is talk of how, given a fair coin, the probability of landing heads or tails should approach 0.5. Of course, if you want to test this, it pays to have a machine do the hard work for you. [Andrew Consroe] has the rig to do just that.

The build consists largely of 3D printed parts. A large cylindrical shroud is used to keep the coin within the flipping area. A spring-loaded dowel is actuated by a stepper motor spinning a cam, which flips the coin. Once the coin has landed, it is photographed with a webcam. An image processing pipeline then determines whether the coin landed heads or tails. A black spot is used on one side of the coin to aid analysis, as the poor-quality webcam images weren’t good enough to recognise the coin in its standard form. Once the flip has been analysed, a sliding aperture is used to push the coin back towards the flipper for the next cycle.

The machine completes a flip approximately every two seconds, meaning 10,000 flips would take approximately 2.5 days. Unfortunately, due to noise and occasional coin escapes, [Andrew] hasn’t yet been able to achieve his goal. He aims to increase speed significantly before making an all-out attempt.

Coin flips can make for decent random numbers, but if you need better ones, perhaps NIST can help you out. Video after the break.

Continue reading “Flipping A Coin 10,000 Times With A Dedicated Machine”

Window In The Skies: Why Everyone Is Going To Mars This Month

Mars may not be the kind of place to raise your kids, but chances are that one day [Elton John]’s famous lyrics will be wrong about there being no one there to raise them. For now, however, we have probes, orbiters, and landers. Mars missions are going strong this year, with three nations about to launch their rockets towards the Red Planet: the United States sending their Perseverance rover, China’s Tianwen-1 mission, and the United Arab Emirates sending their Hope orbiter.

As all of this is planned to happen still within the month of July, it almost gives the impression of a new era of wild space races where everyone tries to be first. Sure, some egos will certainly be boosted here, but the reason for this increased run within such a short time frame has a simple explanation: Mars will be right around the corner later this year — relatively speaking — providing an ideal opportunity to travel there right now.

In fact, this year is as good as it gets for quite a while. The next time the circumstances will be (almost) as favorable as this year is going to be in 2033, so it’s understandable that space agencies are eager to not miss out on this chance. Not that Mars missions couldn’t be accomplished in the next 13 years — after all, several endeavors are already in the wings for 2022, including the delayed Rosalind Franklin rover launch. It’s just that the circumstances won’t be as ideal.

But what exactly does that mean, and why is that? What makes July 2020 so special? And what’s everyone doing up there anyway? Well, let’s find out!

Continue reading “Window In The Skies: Why Everyone Is Going To Mars This Month”

A Stylish Raspberry Pi Camera

The Raspberry Pi HQ camera module is an exciting product that for the first time puts something close to a decent quality interchangeable lens camera into the hands of hardware hackers. It’s already attracted the attention of those who have a wish to explore the boundaries of camera form factors. Our latest entrant in this field comes courtesy of [BBまどーし], who has opted for a very good 3D-printed analog of a conventional compact camera.

On the front as you might expect is the module, concealed behind a smart plastic ring. Behind that is a battery compartment, concealing not the brace of 18650s or the bare LiPo pouch that you might expect, but a 10,400 mAH USB power bank. Behind that is something approaching a conventional Raspberry Pi case, designed to take a Hyperpixel screen. The battery might seem an unadventurous choice, but it serves to highlight just how much bang for your buck can now be found in compact power banks. It may not have a hacker aesthetic, but you can’t argue with its cost and simplicity.

The details are the interesting part of this design, for instance it has a standard accessory shoe printed into its top. There is also a shutter button, but they admit to not being a software wizard enough to get it working. Perhaps a quick look at this Pi Camera in a 1970s Merlin game would be in order.

A Simple Soft Power Switch Using Common Modules

If you want to easily control the power in a circuit, you’ll probably reach for the classic toggle switch. While there’s certainly nothing wrong with that, physical toggles are a bit dated at this point. A soft power switch that turns your gadget on and off at the tap of a finger is far more 21st century. You might think this kind of modern trickery is too difficult to implement on a DIY project, but as [Sasa Karanovic] shows, it’s actually a lot easier than you might think.

Now to be fair, that wasn’t actually his goal. All [Sasa] was trying to do was come up with a slick way to control the LED lighting in his 3D printer enclosure. Which, as you can see in the video below, he accomplished. But the hacked together circuit he used to do it could easily be adapted for other electronic projects. If you’re using a LM2596 DC-DC converter module to power your gadget, you can add a touch sensitive soft switch for literally pennies.

The trick is utilizing the enable pin on the LM2596. The common buck converter modules tie this pin to ground so the regulator is always enabled, but if you lift the pin off the PCB and connect it to the output of a TTP223 capacitive touch sensor, you can simply tap the pad to control the regulator. Power for the touch sensor itself is pulled from the input side of the regulator, so even when the power is cut off downstream, the sensor is still awake and can kick the chip back into gear when you need it.

If you’re not interested in touch control, you could try connecting the enable pin on the regulator to an ESP8266 and making a cheap Internet-controlled DC power supply. Continue reading “A Simple Soft Power Switch Using Common Modules”