Syndicate content
Fresh hacks every day
ถูกปรับปรุง 2 hours 22 min ก่อน

Build a Fungus Foraging App with Machine Learning

2 hours 56 minก่อน

As the 2019 mushroom foraging season approaches it’s timely to combine my thirst for knowledge about low level machine learning (ML) with a popular pastime that we enjoy here where I live. Just for the record, I’m not an expert on ML, and I’m simply inviting readers to follow me back down some rabbit holes that I recently explored.

But mushrooms, I do know a little bit about, so firstly, a bit about health and safety:

  • The app created should be used with extreme caution and results always confirmed by a fungus expert.
  • Always test the fungus by initially only eating a very small piece and waiting for several hours to check there is no ill effect.
  • Always wear gloves  – It’s surprisingly easy to absorb toxins through fingers.

Since this is very much an introduction to ML, there won’t be too much terminology and the emphasis will be on having fun rather than going on a deep dive. The system that I stumbled upon is called XGBoost (XGB). One of the XGB demos is for binary classification, and the data was drawn from The Audubon Society Field Guide to North American Mushrooms. Binary means that the app spits out a probability of ‘yes’ or ‘no’ and in this case it tends to give about 95% probability that a common edible mushroom (Agaricus campestris) is actually edible. 

The app asks the user 22 questions about their specimen and collates the data inputted as a series of letters separated by commas. At the end of the questionnaire, this data line is written to a file called ‘fungusFile.data’ for further processing.

XGB can not accept letters as data so they have to be mapped into ‘classic LibSVM format’ which looks like this: ‘3:218’, for each letter. Next, this XGB friendly data is split into two parts for training a model and then subsequently testing that model.

Installing XGB is relatively easy compared to higher level deep learning systems and runs well on both Linux Ubuntu 16.04 and on a Raspberry Pi. I wrote the deployment app in bash so there should not be any additional software to install. Before getting any deeper into the ML side of things, I highly advise installing XGB, running the app, and having a bit of a play with it.

Training and testing is carried out by running bash runexp.sh in the terminal and it takes less than one second to process the 8124 lines of fungal data. At the end, bash spits out a set of statistics to represent the accuracy of the training and also attempts to ‘draw’ the decision tree that XGB has devised. If we have a quick look in directory ~/xgboost/demo/binary_classification, there should now be a 0002.model file in it ready for deployment with the questionnaire.

I was interested to explore the decision tree a bit further and look at the way XGB weighted different characteristics of the fungi. I eventually got some rough visualisations working on a Python based Jupyter Notebook script:








Obviously this app is not going to win any Kaggle competitions since the various parameters within the software need to be carefully tuned with the help of all the different software tools available. A good place to start is to tweak the maximum depth of the tree and the number or trees used. Depth = 4 and number = 4 seems to work well for this data. Other parameters include the feature importance type, for example: gain, weight, cover, total_gain or total_cover. These can be tuned using tools such as SHAP.

Finally, this app could easily be adapted to other questionnaire based systems such as diagnosing a particular disease, or deciding whether to buy a particular stock or share in the market place.

An even more basic introduction to ML goes into the baseline theory in a bit more detail – well worth a quick look.

Looking Around Corners With F-K Migration

พฤ, 08/22/2019 - 22:30

The concept behind non-line-of-sight (NLOS) imaging seems fairly easy to grasp: a laser bounces photons off a surface that illuminate objects that are within in sight of that surface, but not of the imaging equipment. The photons that are then reflected or refracted by the hidden object make their way back to the laser’s location, where they are captured and processed to form an image. Essentially this allows one to use any surface as a mirror to look around corners.

Main disadvantage with this method has been the low resolution and high susceptibility to noise. This led a team at Stanford University to experiment with ways to improve this. As detailed in an interview by Tech Briefs with graduate student [David Lindell], a major improvement came from an ultra-fast shutter solution that blocks out most of the photons that return from the wall that is being illuminated, preventing the photons reflected by the object from getting drowned out by this noise.

The key to getting the imaging quality desired, including with glossy and otherwise hard to image objects, was this f-k migration algorithm. As explained in the video that is embedded after the break, they took a look at what methods are used in the field of seismology, where vibrations are used to image what is inside the Earth’s crust, as well as synthetic aperture radar and similar. The resulting algorithm uses a sequence of Fourier transformation, spectrum resampling and interpolation, and the inverse Fourier transform to process the received data into a usable image.

This is not a new topic; we covered a simple implementation of this all the way back in 2011, as well as a project by UK researchers in 2015. This new research shows obvious improvements, making this kind of technology ever more viable for practical applications.

The obvious applications for this as noted by the researchers include things like LIDAR data processing and autonomous cars. More challenging are things like medical imaging, where one could image even that’s what’s normally being hidden by tissues or bones.

For those interested in learning more, the paper, data sets and more as presented at SIGGRAPH 2019 are available here.

Rocket Lab Sets Their Sights on Rapid Reusability By Snagging Rockets in Mid-Air with a Helicopter

พฤ, 08/22/2019 - 21:01

Not so very long ago, orbital rockets simply didn’t get reused. After their propellants were expended on the journey to orbit, they petered out and fell back down into the ocean where they were obliterated on impact. Rockets were disposable because, as far as anyone could tell, building another one was cheaper and easier than trying to reuse them. The Space Shuttle had proved that reuse of a spacecraft and its booster was possible, but the promised benefits of reduced cost and higher launch cadence never materialized. If anything, the Space Shuttle was often considered proof that reusability made more sense on paper than it did in the real-world.

Rocket Lab CEO Peter Beck with Electron rocket

But that was before SpaceX started routinely landing and reflying the first stage of their Falcon 9 booster. Nobody outside the company really knows how much money is being saved by reuse, but there’s no denying the turn-around time from landing to reflight is getting progressively shorter. Moreover, by performing up to three flights on the same booster, SpaceX is demonstrating a launch cadence that is simply unmatched in the industry.

So it should come as no surprise to find that other launch providers are feeling the pressure to develop their own reusability programs. The latest to announce their intent to recover and eventually refly their vehicle is Rocket Lab, despite CEO Peter Beck’s admission that he was originally against the idea. He’s certainly changed his tune. With data collected over the last several flights the company now believes they have a reusability plan that’s compatible with the unique limitations of their diminutive Electron launch vehicle.

According to Beck, the goal isn’t necessarily to save money. During his presentation at the Small Satellite Conference in Utah, he explained that what they’re really going after is an increase in flight frequency. Right now they can build and fly an Electron every month, and while they eventually hope to produce a rocket a week, even a single reuse per core would have a huge impact on their annual launch capability:

If we can get these systems up on orbit quickly and reliably and frequently, we can innovate a lot more and create a lot more opportunities. So launch frequency is really the main driver for why Electron is going reusable. In time, hopefully we can obviously reduce prices as well. But the fundamental reason we’re doing this is launch frequency. Even if I can get the stage back once, I’ve effectively doubled my production ratio.

But, there’s a catch. Electron is too small to support the addition of landing legs and doesn’t have the excess propellants to use its engines during descent. Put simply, the tiny rocket is incapable of landing itself. So Rocket Lab believes the only way to recover the Electron is by snatching it out of the air before it gets to the ground.

Lightweight Reusability

Reusability on SpaceX’s Falcon 9 comes at a considerable price. Between the additional hardware required and the propellants that need to be kept in reserve for the reentry and landing burns, the payload capacity of the rocket is reduced by as much as 40%. To accommodate this without compromising on the vehicle’s useful payload capacity, SpaceX has gradually been enlarging and upgrading the design. When it first flew in 2010, the Falcon 9 was 47.8 m (157 ft) tall and had a liftoff mass of 333,400 kg (735,000 lb); the version flying today has been stretched to 70 m (230 ft) in length, and tips the scales at 549,054 kg (1,210,457 lb).

For SpaceX, who have their eyes on the medium and heavy lift markets, this kind of vehicle expansion aligns well enough with their goals. But Rocket Lab isn’t looking to compete with vehicles of that scale. With a length of just 17 m (56 ft) and a maximum payload capacity of 225 kg (496 lb), their Electron rocket is of an entirely different class. The company is laser focused on providing bespoke launch capabilities for the so-called “smallsat” market. These smaller satellites would be considered the second or even third priority if they were launched on a larger rocket, but on Electron, they’re the primary mission.

Electron and Falcon 9 to Scale

Unfortunately, the reality of operating such a small rocket is that there’s precious little wiggle room for vehicle modifications. Every ounce of additional hardware they add to the rocket will reduce their already minuscule payload capacity. Even if the Electron could spare the propellants to perform a propulsive landing burn, the mass penalty for deployable landing legs would be unacceptable. If Rocket Lab can squeeze a bit more thrust out of their 3D printed Rutherford engines they’ll have some breathing room, but not much. Any modifications to the Electron for recovery purposes will therefore need to be exceptionally minimal.

This early in the program, Rocket Lab is reluctant to say what those modifications would entail. We can tell from the rendered video they’ve posted to their YouTube channel that the first phase will use a ballute decelerator to bring the Electron down to subsonic speeds, at which point a parafoil will be deployed to further slow the rocket. This is not entirely unlike SpaceX’s now defunct plans for recovering the second stage of the Falcon 9. But what we don’t see is what kind of thermal shielding will be required for Electron to survive the intense heat of reentry, or what method of stabilization and guidance it will use on its way back down; likely because Rocket Lab themselves don’t quite know yet.

Snagging a Falling Rocket

Even assuming Rocket Lab upgrades the Electron to the point it can survive reentry and deploy its deceleration devices, they still need to figure out a way to get it down on the ground in one piece. As shown in the rendered video, the plan right now is to snatch the Electron out of the air by flying a helicopter over the descending rocket and grappling it. This might sound like something out of a James Bond movie, but in reality it’s arguably the easiest aspect of Rocket Lab’s entire scheme.

In fact, it would appear that this part of the plan has already been completed. In 2017, Lockheed Martin (a strategic investor in Rocket Lab since 2015) partnered with a PDG Aviation Services to conduct a little-publicized mid-air helicopter recovery of a mock rocket stage, and the similarities are hard to ignore. The device used to snatch the leader cable behind the rocket’s parafoil shown in Rocket Lab’s rendering appears to be identical to the one seen in video of the Lockheed Martin test, which really makes the whole thing look like a low-key dress rehearsal.

One element of the recovery process that’s unclear after comparing both videos is how the Electron will safely be lowered to the ground. During the Lockheed Martin test the “rocket” was dropped rather unceremoniously on its faux engines, but that obviously won’t work with actual flight hardware. The fact that the official Rocket Lab video fades out before the Electron is actually brought back down to the waiting ship may mean the company still hasn’t sorted that part out yet. Though if you have the technical wherewithal to launch and recover an orbital rocket, figuring out how to softly lower it onto the deck of a ship shouldn’t pose much of a challenge.

Faster and Cheaper

The fundamental goal of any reusable launch system is for subsequent reflights to be more economical and less time consuming than simply building a new booster for each mission, and in such a demanding field, even relatively minor gains are generally considered a success. But ideally the less time and money spent between launches, the better. To that end, the unique nature of the Electron may make it particularly well suited for so-called “rapid reuse”: a concept wherein a rocket is reflown nearly as often as a commercial aircraft, needing only to be inspected and refueled before being sent on its next mission.

The Electron does away with the complex gas generator and turbine arrangement traditionally used in liquid rockets, and instead uses electrically-driven pumps for the fuel and oxidizer. Combined with its relatively simplistic 3D printed engines and how small the vehicle is, there’s simply not as much that needs to be checked out between flights. A smaller team can go over every inch of the Electron in a fraction of the time it would take a much larger crew to thoroughly examine the Falcon 9, for example.

SpaceX has so far demonstrated a turnaround time of a little over two months from landing to reflight, but Rocket Lab may be poised to reduce that time to a few weeks. Considering both companies have stated an ultimate goal of reflight within days of recovery, they’ve got their work cut out for them. But even if they never quite hit that lofty goal, it seems clear the days of crashing used rockets into the ocean are coming to a close.

Returning Digital Watches To the Analog Age: Enter The Charliewatch

พฤ, 08/22/2019 - 18:00

The Charliewatch by [Trammell Hudson] is one of those projects which is beautiful in both design and simplicity. After seeing [Travis Goodspeed]’s GoodWatch21 digital watch project based around a Texas Instruments MSP430-based SoC, [Trammell] decided that it’d be neat if it was more analog. This is accomplished using the CC430F5137IRGZR (a simpler member of the MSP430 family) and a whole bunch of 0603 SMD LEDs which are driven using Charlieplexing.

This time-honored method of using very few I/O pins to control many LEDs makes it possible to control 72 LEDs without dedicating 72 pins. The density makes animations look stunning and the digital nature melts away leaving a distinct analog charm.

A traditional sapphire crystal was sourced from a watchmaker for around 14€ as was the watch band itself. The rest is original work, with multiple iterations of the 3D printed case settling in on a perfect fit of the crystal, PCB, and CR2032 coin cell stackup. The watch band itself hold the components securely in the housing, and timekeeping is handled by a 32.768 kHz clock crystal and the microcontroller’s RTC peripheral.

The LEDs can be seen in both daylight and darkness. The nature of Charlieplexing means that only a few of the LEDs are ever illuminated at the same time, which does wonders for battery life. [Trammell] tells us that it can run for around six months before the coin cell needs replacing.

It’s completely open source, with project files available on the project’s Github page. We hope to see an army of these watches making appearances at all upcoming electronics-oriented events. Just make sure you lay off the caffeine as the process of hand-placing all those LEDs looks daunting.

Electric Dump Truck Produces More Energy Than it Uses

พฤ, 08/22/2019 - 15:00

Electric vehicles are everywhere now. It’s more than just Leafs, Teslas, and a wide variety of electric bikes. It’s also trains, busses, and in this case, gigantic dump trucks. This truck in particular is being put to work at a mine in Switzerland, and as a consequence of having an electric drivetrain is actually able to produce more power than it consumes. (Google Translate from Portugese)

This isn’t some impossible perpetual motion machine, either. The dump truck drives up a mountain with no load, and carries double the weight back down the mountain after getting loaded up with lime and marl to deliver to a cement plant. Since electric vehicles can recover energy through regenerative braking, rather than wasting that energy as heat in a traditional braking system, the extra weight on the way down actually delivers more energy to the batteries than the truck used on the way up the mountain.

The article claims that this is the largest electric vehicle in the world at 110 tons, and although we were not able to find anything larger except the occasional electric train, this is still an impressive feat of engineering that shows that electric vehicles have a lot more utility than novelties or simple passenger vehicles.

Thanks to [Frisco] for the tip!

A Cheap And Cheerful Geiger Counter Build

พฤ, 08/22/2019 - 12:00

Hackers often have broad interests across the sciences, of which nuclear topics are no exception. The Geiger counter remains a popular build, and could be a handy tool to have in a time of rising tensions between nuclear powers. [Leonora Tindall] had tinkered with basic units, but wanted a better idea of actual radiation levels in her area. Thus began the build!

The project began by leveraging the Geiger counter kit from the Mighty Ohm. [Leonora] had built one of these successfully, but wished for a visual readout to supplement the foreboding ticking noises from the device. This was achieved by installing a Metro Mini microcontroller along with a 4-character, 14-segment alphanumeric display. This, along with the cardboard enclosure, makes the build look like a prop from an 80s hacker movie. Very fitting for the Cold War-era technology at work.

By using a pre-built kit and upgrading it with display hardware, [Leonora] now has readings at a glance without having to reinvent the wheel and design her own board from scratch. Of course, if you’re thinking of taking on a more complex build, you might consider a scintillation detector instead.

Largest Chip Ever Holds 1.2 Trillion Transistors

พฤ, 08/22/2019 - 09:00

We get it, press releases are full of hyperbole. Cerebras recently announced they’ve built the largest chip ever. The chip has 400,000 cores and contains 1.2 trillion transistors on a die over 46,000 square mm in area. That’s roughly the same as a square about 8.5 inches on each side. But honestly, the WSE — Wafer Scale Engine — is just most of a wafer not cut up. Typically a wafer will have lots of copies of a device on it and it gets split into pieces.

According to the company, the WSE is 56 times larger than the largest GPU on the market. The chip boasts 18 gigabytes of storage spread around the massive die. The problem isn’t making such a beast — although a normal wafer is allowed to have a certain number of bad spots. The real problems come through things such as interconnections and thermal management.

The white paper is detailed while still managing to be a bit fuzzy. In addition to somehow solving the interconnect, packaging and thermal problems with using a whole wafer, the architecture of the cores is supposed to be amenable to sparse matrices and the specific types of algorithms necessary for deep learning.

There’s no word as yet on cost or specific availability, but we were hoping at least for an emulator. However, it is certainly big and if it lives up to its promise could drive new deep learning applications. We’ve seen neural network coprocessors before. We even had our own deep dive into them.

Automatic Rewinder Makes Kite Retrieval A Breeze

พฤ, 08/22/2019 - 06:00

So you’ve built a fine kite, taken it to the beach, and let it ride the wind aloft on a spool of line. Eventually it has to come down, and the process of reeling all that line that was so easily paid out is likely a bigger chore than you care to face. What to do?

If you’re like [Matt Bilsky], the answer is simple: build a motorized kite reel to bring it back in painlessly. Of course what’s simple in conception is often difficult to execute, and as the second video below shows, [Matt] went through an extensive design and prototype phase before starting to create parts. Basic questions had to be answered, such as how much torque would be needed to reel in the kite, and what were the dimensions of a standard kite string reel. With that information and a cardboard prototype in hand, the guts of a cordless drill joined a bunch of 3D-printed parts to form the running gear. We really liked the research that went into the self-reversing screw used to evenly wind the string across the spool; who knew that someone could do a doctoral dissertation on yarn-winding? Check out the “Reeler-Inner” in action in the first, much shorter video below.

With some extra power left from the original drill battery, [Matt] feature-crept a bit with the USB charger port and voltmeter, but who can blame him? Personally, we’d have included a counter to keep track of how much line is fed out; something like this printer filament counter might work, as long as you can keep the sand out of it.

Russian Robot To Visit Space Station

พฤ, 08/22/2019 - 03:01

The Russians were the first to send a dog into space, the first to send a man, and the first to send a woman. However, NASA sent the first humanoid robot to the International Space Station. The Russians, though, want to send FEDOR and proclaim that while Robonaut flew as cargo, a FEDOR model — Skybot F-850 — will fly the upcoming MS-14 supply mission as crew.

Defining the term robot can be tricky, with some thinking a proper robot needs to be autonomous and others seeing robotics under human control as enough. The Russian FEDOR robot is — we think — primarily a telepresence device, but it remains an impressive technical achievement. The press release claims that it can balance itself and do other autonomous actions, but it appears that to do anything tricky probably requires an operator. You can see the robot in ground tests at about the one minute mark in the video below.

The robot uses batteries from an Orlan spacesuit and will work in avatar mode — that is, requiring a human operator — during the initial flight. It is easy to see how using a remote control robot outside the station while the operator remains inside the station isn’t a bad idea.

The FEDOR robots were built for Earthbound rescue operations. However, there’s been a lot of interest in using it as a robotic astronaut. The Skybot F-850 has its own Twitter feed, too.

If you want to tour the ISS, you can from your PC or with some VR goggles. If outer space isn’t your thing, maybe you’d prefer the bottom of the ocean.

The Badgies: Clever, Crazy, and Creative Ideas in Electronic Design

พฤ, 08/22/2019 - 00:01

Engineering creativity comes to life when you have to design around a set of constraints. We can do just about anything with enough time, talent, and treasure, but what can you do when shackled with limitations? Some of the most creative electronic manufacturing tricks spring to life when designing conference badges, as the ability to built multiples, to come in under budget, and most importantly to have the production finished in time are all in play.

This happens at conferences throughout the year and all over the globe, but the highest concentration I’ve seen for these unique pieces of art is at DEF CON every year. I loved seeing dozens of interesting projects this year, and have picked a handful of the coolest features on a badge to show off in this article. I still love all the rest, and have a badge supercut article on the way, but until then let’s take a look at an RC car badge, a different kind of blinky bling, and a few other flourishes of brilliance.

Oh No They Didn’t: Car Hacking Village Badge

Far and away the craziest badge at DEF CON 27 was the Car Hacking Village badge. It’s a functional car that you can connect to via Bluetooth and drive around to the delight of the child in each of us.

It’s a toy car, so what? The difference here is the economy of scale. If you’re going to ship 10,000 of them it’s no problem to build an injection molded enclosure and house the electronics to control it wirelessly. But this project set the production run for just 350 SUV-shaped badges. At this scale, injection molding is prohibitively expensive, nonetheless they forged ahead.

The enclosure itself is laser-cut and laser-etched acrylic that fits together to house everything. There is a DC motor to drive the rear wheels using a worm gear. You can just catch a glimpse of this in the video below. Steering for the front two wheels is taken care of by a very small hobby servo that uses an acrylic lever.

Feats of mechanical design aside, the electronics themselves are really clever. There is a main PCB carrying the huge NXP processor at the front of the vehicle, and another for battery management near the back. The two are connected by a pair of long, narrow PCBs mounted at 90 degrees to the other boards which carry the RGB LEDs that illuminate the badge. Where the boards meet at right angles, pads on each line up so that the circuit boards can be soldered together, carrying the signals necessary for everything to work. There is a spare tire on the back (also acrylic) that doubles as a rotary encoder with a button next to it. This is the user input, with feedback shown on the OLED screen that makes up the windshield.


There seem to be pain points everywhere in what must have been a grueling assembly process. I’m told that hand assembly ended up netting about 4 hours per badge! Thus is the legacy of #Badgelife, and I’d say it paid off that they started this the day after DC26 as the hardware was ready on time, to the delight of everyone who laid eyes on them.

Doing More With Less: Space Force

At first glance you may wonder why I’ve included the Space Force badge in the Badgies this year. It does what a badge should — hangs around your neck, blinking and acting as a name tag. But there are so many brilliant details that had this design turning heads in a major way. That’s not surprising as badges from the Whiskey Pirate Crew have a legacy going back several years.

The face of this badge has one purpose: to look stunning. [True] went to great lengths to ensure there were no traces on the top layer; it only took one jumper wire, and this is just a two layer board! The backlit letters are FR4 without copper or solder mask and use normal LEDs mounted backwards. I soldered this one and it’s tricky to bridge the ~3mm gap between pad and part. I managed to fry at least four of them in the process.

The OLED module mounting method is really neat. The 4-pin header was removed and those traces soldered directly to the pads on the badge. On the other side, a mis-used right-angle surface mount header is acting as a mechanical fastener. The hole cut in the badge fits the glass screen perfectly as a bezel. Look closely and you’ll see there is also an IR transceiver mounted in a board cut out. There are also three capacitive touch pads on the front, mostly invisible to the eye.

Turn the badge upside-down (a natural gesture if you’re wearing it around your neck) and the accelerometer detects it, putting it into WiFi AP mode via the ESP32 so that you can customize the name on your badge. I’m a big fan of the Lithium 18650 which can be recharged with the badge, but also removed an used in another project. Contrast this to pouch batteries which never see another use.

Let There Be Light… And Depth: SecKC Badge

Here’s proof that you don’t need multi-colored LEDs to achieve the ultimate in bling effects. This SecKC DC27 badge does it with a combination of green LEDs and negative space. The group produced a total of 150 badges after having reached a presale of around 90. Each badge contains 645 (!) LEDs. Yield was an issue with every badge having one or two that needed rework (placed backwards, etc) and about 50% needing more attention than that.

What makes this badge look so amazing is the use of a second board mounted on top of three connectors. Here you can see the larger LED with that silhouette-shaped board removed. This does two things: gives your eye some depth which adds a lot more interest than you might think, and provides a place between the boards to hide the battery. These badges are driven by an ATmega328 programmed via the Arduino IDE, and uses an EEPROM to store animation patterns.

Careful Where You Touch It: Frankenstein Badge

Nixie Tubes, they become rarer by the day, they’re fragile, and you need high voltage to light them up. But they look spectacular so why not build a badge around them! The Frankenbadge is the creation of Dr.n0psl3d who took the concept of a Nixie tube clock and brought it to life.

The high voltage bits on the back are somewhat safely sealed inside of a 3D-printed case, or covered by copious amounts of hot glue, complete with a warning on the silk screen to stay out. The serial number technique for the badge is a fun one. Three 7-segment digits have been printed in white on the silk screen; just paint the segments you don’t need black.

Surprisingly, this was n0psl3d’s first Nixie build and he chose to go with IN-12B tubes. He brought enough parts for 50 badges to the con, but this is a DIY badge and assembly is up to you. My only concern on this one is that the tube might fall out. Dropping ice cream out of your cone makes for a sad day, but dropping a Nixie out of your badge is sure to ruin your Hacker Summer Camp.

We Don’t Need to Build a Badge: DC503

Badge building is hard, especially one with a lot of something, like including enough buttons for a full keyboard. (We order something like 20,000 momentary switches for last year’s Supercon badge, also see the SecKC badge yields mentioned above.) This ups the complexity and every bump along the way raises the threat that you won’t have the production run finished in time for the con. The DC503 group side-stepped all of the manufacturing challenges this year by simply purchasing a consumer good and making it their own.

We’ve featured the SMART Response XE a couple of times over the past year on Hackaday. Originally retailing at $100 for use by every student in classrooms, you can grab one of these on the secondary market for a handful of bones. It uses an ATmega186rf and communicates on the 802.54 MHz band. The team repurposed the badges to act as one big chat room. What I like most is that they were able to drill through a part of the case that is normally hidden by the battery cover to get at the pads used to reflash the microcontroller.

More to Come

Last year I spent all of my time at DEF CON trying to find every badge maker for an inside look at what they’d been up to. Although I made it to more of the talks this year, I still managed to find 50 or so original creations. The Badgies is just of small set whose creative take on the art form caught my eye. But the rest are equally worth a look. Stay tuned to Hackaday for rest in an upcoming article!

Hello: A Mini Badge For CCCamp

พุธ, 08/21/2019 - 22:30

Badgelife culture is our community’s very own art form, with a plethora of designs coming forth featuring stunning artwork, impressive hardware, and clever software tricks. But sometimes a badge doesn’t need a brace of LEDs or a meme-inspired appearance to be a success, it just needs to be very good at what it does.

A perfect example is [Gavan Fantom]’s Hello mini badge. The hardware is fairly straightforward, it’s just a small square PCB sporting a LPC1115 microcontroller, 8Mb Flash chip, piezo speaker, and an OLED display. Its functionality is pretty simple as well, in that it exists to display text, images, or short animations. But the badge hides a very well-executed firmware that provides a serial terminal and zmodem file upload capability as well as an on-device interface via a small joystick. Power comes from a 500 mAh lithium-polymer cell, for which the badge integrates the usual charger and power management hardware.

There’s a variety of possibilities for the badge, but we’d guess that most owners will simply use it to display their name with perhaps a little animation. A bit of nifty processing of some video could perhaps get something approaching watchable video on it though, opening up the entertaining possibility of displaying demos or other video content.

[Gavan] will have some of the Hello badges at the upcoming CCCamp hacker camp in Germany if you’re interested, and should be easy enough to find in the EMF village.

Fantastic Micrometeorites And Where To Find Them

พุธ, 08/21/2019 - 21:01

Space is very much the final frontier for humanity, at least as far as our current understanding of the universe takes us. Only a handful of countries and corporations on Earth have the hardware to readily get there, and even fewer are capable of reaching orbit. For these reasons, working in this field can seem out of reach for many. Nevertheless, there’s plenty about the great expanse beyond our atmosphere that can be studied by the dedicated citizen scientist. With the right equipment and know-how, it’s even possible to capture and study micrometeorites yourself!

While you don’t see a meteor shower every day, micrometeorites are actually astoundingly common. They’re just hard to find!

For those new to the field, the terms used can be confusing. Meteoroids are small metallic or rocky objects found in outer space, up to around 1 meter in size. When these burn up upon entering the atmosphere, they are referred to as a meteor, or colloquially known as a shooting star. If part of the object survives long enough to hit the ground, this is referred to as a meteorite, and as you’d expect the smaller ones are called micrometeorites, being on the scale of 2mm or less.

Stardust Proves Hard To Find

Being tiny and having fallen from space, micrometeorites present certain challenges to those who wish to find and identify them. In spite of this, they can be found by using the right techniques and a heck of a lot of hard work.

Micrometeorites photographed under the microscope. Credit: Jon Larsen

For a long time, micrometeorites were largely ignored by science due to the perceived difficulty in trying to find them. As Verge Science reports, Jon Larsen took this as a challenge. With an estimated 60-100 metric tons falling to Earth every day, Jon simply refused to believe that nothing could be done. Instead, he took a reverse approach at the problem, becoming an expert on all manner of tiny terrestrial particles. Beginning by collecting particles with a magnet, he would painstakingly sort and identify them. By first identifying all the particles of terrestrial origin, it then became easier to focus on whatever was left over to determine whether or not he had found a micrometeorite.

Jon’s work led to much greater interest in micrometeorites worldwide. Now, A project is underway in Berlin to enlist the services of the citizenry to help find these tiny visitors from outer space (Google Translate link). The methodology used is similar to Jon’s experiments but on a grander scale.

The team placed large tarps on the roofs of university buildings and an Ikea outlet. Dust was allowed to settle on the tarps and over time, 100 kilograms of material was collected. This was sifted to extract only particles under 0.8mm, as in the team’s experience most micrometeorites come in under this size range. This also helps to exclude larger particles from other sources, such as dirt and local air pollution. A magnet is then used to select ferromagnetic particles, and these are then washed and prepared for inspection under the microscope. At the end of sorting, only 15 grams was left over from the initial 100 kilograms collected.

The process of identifying potential micrometeorites is a painstaking one, undertaken with a steady hand and a careful eye on the microscope.

At this point, the citizen scientists come in. There currently is no quick solution to the identification of micrometeorites versus terrestrial dust particles; it simply involves grueling and laborious work by humans to inspect and sort the finds. The participants are trained on what to look for, based on previous finds — primarily not-quite-round, darker objects. Once likely candidates are identified, they are sent off for final geochemical analysis to verify their origin.

Having begun in July, the project aims to eventually display some of the finds in the Museum für Naturkunde Berlin. This promises to be its own challenge, due to the size of the objects in question, but it should make for compelling viewing for anyone wishing to see freshly collected stardust in person.

Taking It DIY: Let the Rain Collect Micrometeorites for You! Wayne found several likely-looking metallic particles on his own roof. Further analysis can help determine if they’re truly extraterrestrial in origin.

Naturally, there’s more than one way to go about collecting micrometeorites. While some projects work by placing collection tarps on large roofs, Wayne Schmidt has a nifty method, placing powerful magnets in the downpipe of his rain gutters. As rain washes collected dust off the roof, magnetic particles stick to the magnets as they pass by, allowing them to be easily collected and put under the microscope. Without university-grade equipment, it’s difficult to 100% classify each particle as a micrometeorite or not, but it’s likely a fair few of the handful Wayne has collected are extraterrestrial in origin.

Rich Lund took a very similar tack, mounting neodymium magnets in a ziplock bag, and placing it in a downpipe. After a rainstorm, the collected matter was scattered on a piece of white paper, and several small metallic spheroid objects are visible. While further analysis is likely needed to prove their definitive origin, it goes to show that it doesn’t take a lot of effort to start investigating this at home.

Images taken of micrometeorite finds with scanning electron equipment.

Papers have even been written on the collection of micrometeorites, long thought impractical due to the presence of heavy particulate pollution and human activity kicking up dirt and dust. For those interested in seeing micrometeorites explored with real hardware, the electron microscope images are a real treat. This kind of muscle is what’s needed to verify finds to a scientifically valid level.

It goes to show that this is a fun way to start looking for space rocks that can be done practically anywhere. Obviously, it doesn’t hurt to make friends with your local university’s geology department if you want to get a definitive answer on your finds, but a microscope and a few magnets is all you need to start hunting. Cast your eyes to the skies, and good luck!

Launching a Custom Kerbal Panel

พุธ, 08/21/2019 - 18:00

[Matthew Peverill] is a busy PhD student who loves to make time for a little Kerbal Space Program. He was tired of using such pedestrian controls as a keyboard and mouse for such important work, and wanted something a little more like they have down in Houston.

For this project, he’s focusing on the inputs more than anything else. The intent is not to play solely from this control panel, but to strike a balance between fun inputs and accurate control without screwing up favorite game play modes. It’s based on an Arduino Due, and uses some custom I²C multiplexer boards to wrangle all the various inputs.

We love the look of this panel, especially the appropriately Futura-fonted labels and all the toggle switches. Matthew took inspiration and guidance for this project from a couple of sources, so he’s definitely following in the Hackaday spirit of standing on the shoulders of giants. He’s moved through two prototypes and is working out the bugs before making the next one. The final version will be made of backlit transparent acrylic, and you know we can’t wait to see that.

What, you don’t have access to a laser cutter? Just build a control panel into an old Heathkit trainer or something.

Sushi Roll Helps Inspect Your CPU Internals

พุธ, 08/21/2019 - 15:00

[Gamozolabs’] post about Sushi Roll — a research kernel for monitoring Intel CPU internals — is pretty long. While we were disappointed at the end that the kernel’s source is not exactly available due to “sensitive features”, we were so impressed with the description of the modern x86 architecture and some of the work done with Sushi Roll, that we just had to post it. If the post gets you wanting to actually try some of this, you can check out another [Gamozolabs] creation, Orange Slice.

While you probably know that a modern Intel CPU bears little resemblance to the old 8086 processor it emulates, it is surprising, sometimes, to realize just how far it has gone. The very first thing the CPU does is to break your instruction up into microoperations. The execution engine uses some sophisticated techniques for register renaming and scheduling that allow you to run instructions out of order and to run more than one instruction per clock cycle.

The purpose of Sushi Roll is to reduce uncertainty in timing so that measurements can reveal short microoperation durations. The kernel does not use locking, nor does it use interrupts, timers, threads, or processes. This allows code to run without a lot of extraneous things affecting timing like cache evictions or interrupts. Combined with the Intel performance monitoring registers allows you to make some very specific measurements.

Like we said, we were sorry you can’t get the kernel source to do your own measurements. However, the work is impressive and the background information is still a good read, too.

A lot of this internal trivia seemed unimportant until it became the subject of security exploits. We just can’t get enough of CPU internals.

Rocket Jacket Looks Sharp For CCCamp 2019

พุธ, 08/21/2019 - 12:00

Making your own clothing can be fun, but it’s even better if you can throw some LEDs into the mix and give a new meaning to the term “glow up”. [arturo182] did just that with this custom rocket jacket for CCCamp2019.

We’re getting kind of a stained-glass vibe here.

To create the jacket, a 3D printed frame was created in the shape of CCCamp’s rocket logo. This was then filled with hot glue to act as a diffuser, and fitted with WS2818B LEDs. A Digispark is used as the microcontroller, with its compactness serving well for the wearable application. The assembly is then sewn into the back of a hoodie, with cardboard used on the inside as a backer to help keep things flat and support the weight of the hardware.

Hot glue works great as a diffuser in this application, and animation is easy thanks to the addressable LEDs used in the construction. It’s a great way to get a neon-like look, and we fully expect to see more of these glowy wearables in future!

Dirty Tricks For 6502 Programming

พุธ, 08/21/2019 - 09:00

We know the 6502 isn’t exactly the CPU of choice for today’s high-performance software, but with the little CPU having appeared in so many classic computers — the Apple, the KIM-1, The Commodores, to name a few — we have a real soft spot for it. [Janne] has a post detailing the eight best entries in the Commodore 64 coding competition. The goal was to draw an X on the screen using the smallest program possible. [Janne] got 56 bytes, but two entrants clocked in at 34 bytes.

In addition to the results, [Janne] also exposes the tricks people used to get these tiny programs done. Just looking at the solution in C and then 6502 assembly is instructive. Naturally, one trick is to use the existing ROM code to do tasks such as clearing the screen. But that’s just the starting point.

Some of the efficiencies are good practice on any CPU. For example, converting multiplication in a loop into a running total is always a good idea unless you have hardware multiplication that is as cheap as an addition. Some of the tricks are a bit more specific. For example, it was more efficient to draw the figure at the bottom of the screen and scroll than it was to draw each part at a specific X and Y position.

You might think some of these tricks aren’t really dirty, but then you’ll see self-modifying code. A legitimate hack, but always messy. There are also some special tricks used to get the C64 to load the machine code without going through BASIC first.

You might think 34 bytes would be the smallest possible program. You’d be wrong. After the contest, everyone had a look at all the entries and several people were able to come in even smaller — in one case, 29 bytes.

We wished we could find the PRG files so you could run them on an emulated C64. But we were too lazy to build them up from source. If you don’t have a C64, you could always pull out an FPGA. You can even build a new one — seriously.

Get Ready For Games Night With 3D Catan

พุธ, 08/21/2019 - 06:00

Settlers of Catan is a staple for boardgaming aficionados. Some fans like to express themselves by building a custom set of their own, and [Maclsk] is no different. Enter 3D Catan!

The models for the various pieces were designed in Blender, a great open source 3D modelling program. They were then printed on an Anycubic i3 Mega, taking about 80 hours and using 700 grams of PLA filament. With 116 game pieces, there was plenty of filing and sanding to do.

With this completed, it was then time for paint. [Maclsk] shows off a strong understanding of model painting fundamentals, from dry brushing to using PVA glue to give water elements a glossy sheen. If you’re new to the techniques, sit down with your local Warhammer players – they’ll be more than able to point you in the right direction.

Overall, it’s a great build that really pops on the gaming table. We’ve seen other die-hard Catan fans come out with their own builds, too. Video after the break.

A Range-Extended Electric Van

พุธ, 08/21/2019 - 03:00

The only thing limiting the range on any electric vehicle isn’t really battery technology, but cost. Customers don’t want to pay more money for an electric car or van that does essentially the same thing as one with an internal combustion engine. This in turn limits the amount of batteries manufacturers put in their cars. However, with enough money, and thus enough batteries, electric cars can get whatever range you want as [Muxsan] shows with his Nissan e-NV200 that gets over 400 miles on a single charge.

The Nissan e-NV200 is a battery electric vehicle (also available as a badge-engineered Chevrolet van in North America) with a drivetrain from the Nissan Leaf. This means that all of the components from the Leaf basically plug-and-play in this van. [Muxsan] took an extra 45 kWh of batteries and was able to splice them in to the existing battery pack, essentially tripling the capacity of the original 24 kWh pack. Some work was needed to the CAN bus as well, and the car’s firmware needed to be upgraded to reflect the new battery pack, but a relatively simple modification otherwise, all things considered.

While watching the video [Muxsan] also notes how much empty space there is all around the van, and Nissan could have easily upgraded the battery pack at any time to allow for more range. It also took the car 10 hours on a 6 kW charger to charge completely, but that’s not unreasonable for 430 miles of range. If your high voltage DC chops are up to snuff, it’s not impossible to find old Leaf batteries for other projects, too.

Lithophanes Ditch the Monochrome with a Color Layer

พุธ, 08/21/2019 - 01:30

3D printed lithophanes are great, if a bit monochromatic. [Thomas Brooks] (with help from [Jason Preuss]) changed all that with a tool for creating color lithophanes but there’s a catch: you’ll need a printer capable of creating multi-color prints to do it.

A video (embedded below) begins with an intro but walks through the entire process starting around the 1:26 mark. The lithophane is printed as a single piece and looks like most other 3D printed lithophanes from the front, but the back is different. The back (which is the bottom printed layer) is made of up multiple STL files, one for each color, and together creates something that acts as a color filter. When lit from behind, light passes through everything and results in an image that pops with color in ways that lithophanes normally do not.

The demo print was created with a printer equipped with a Palette 2, an aftermarket device that splices together filament from different spools to create multicolored prints, but we think a Prusa printer with an MMU (multi material upgrade) should also do the trick.

[Thomas] already has a lot of ideas on how to improve the process, but these early results are promising. Need a gift? Lithophanes plus LED strips make great lamps, and adding a cheap clock movement adds that little extra something.

Circuit VR: Advanced Falstad Logic with Geniac

พุธ, 08/21/2019 - 00:00

I find that if I’m trying to make a point with a student or a colleague about a circuit, sometimes the Falstad online simulator is worth a few thousand words. You can draw the circuit, play with the values, and even see the current flow in an intuitive way as well as make traditional measurements. The simulator not only handles analog but also digital circuits. At first glance, though, the digital functions appear limited, but if you dig deeper, there is a custom logic block that can really help. I dug into this — and into how switches work in the simulator — the other day in response to a Hackaday post. If you use Falstad, read on!

Childhood Memories

When I was a kid, I saw a computer advertised in the Layfayette catalog. It was the Geniac — the subject of a recent post about a recreation of the computer. My parents shelled out the $20 and I was excited. After all, the thing could play tic tac toe, compose music, and do other feats of wonder.

The problem is, no one that I asked — including an electrical engineer from the power company my Dad worked for — could figure it out. Keep in mind, I was probably 9 years old and back then very few people — even power engineers — were very computer savvy.

By the time I was a teenager, I realized the whole thing was a bunch of rotary switches you could configure as logic gates. By that time, though, the Geniac was long gone, a victim of Mom’s spring cleaning. A few years ago, I bought a mostly complete one on eBay but it needs lightbulbs that I haven’t replaced yet, but it is on my long list of things to do to get it working.

The Virtue of Shame

However, the Hackaday post shamed me into action. All these years and I haven’t built any of the circuits in the manual. I decided that I wanted to do that and since the post had a picture of the binary to decimal decoder, I thought maybe I could simulate it.

The key to understanding the diagrams in the Geniac manual is that you are building a multiway switch. So the binary 8s digit switch in the lower left of the diagram is a two-position switch. The binary 4s digit is DPDT switch. If you point at 0, the contacts at 7:00 and 1:00 connect. If you point at 1:00, the contacts at 5:00 and 11:00 short because of the brass staples in the upper disk. The decimal switch, on the other hand, is a single pole, but has 16 positions.

In operation, you dial in the binary number you want to convert and then turn the decimal switch until the light bulb turns on. This is a simple switch tree so that each binary number grounds one terminal of the decimal switch and since the lightbulb connects to the common, it lights up when you make that connection.


There were two problems I had to tackle. First is making multipole switches in the simulator. There’s a way to do it, but also there’s a thing or two to keep in mind. The second issue was that I wanted to add a fancy display but a 16:1 decoder isn’t available. That’s how I got started with the custom logic block.

The switches are pretty easy to figure out. Under Passive Components on the menu there is an SPDT switch you can insert or you can use the uppercase S shortcut key. Of course, you don’t want a SPDT switch, but you have to start there. Once you place one on the screen, you can right click it and select Edit.

There are two fields in the resulting dialog box of interest. The number of throws is pretty obvious. For the decimal switch you can set that to 16. The switch group is the key to making multiple poles. Switch group 0 is special and means the switch is independent. However, if you set the group number to something else, all switches in that group will operate together. There’s no direct indication of that on the screen, though, like there would be in a real schematic.

Well, that’s not exactly true. Any switch that has more than one pole will show up as DP when you hover the mouse over it. So three switches in the same group with 16 throws will all show up as DP16T even though that’s not technically correct.

A Small Gotcha

The other thing I found by accident is that if you add a pole to a switch, you should make sure that the switch is in its default position and in the same orientation as the other switches in the same group. If you have the 16 position switch set to position 5, for example, and create a new switch set on position 0 then the switches will maintain that separation. That is, moving the first switch to position 6 will set the second switch to position 1. There might be times that’s a feature, but in general, it isn’t what you want. The real problem arises when you have the switches facing opposite each other. Then moving one switch up a position will move the other one down. Again, probably not what you want.

The switch has a way to set some sliders, but those sliders control the number of throws and the switch group for the switch so that’s not very useful. Probably the easiest thing to do is duplicate the existing switch to make a new pole.

Custom Logic

Armed with a way to make big switches like Geniac, it was pretty easy to set the switches up for the decimal converter. However, I wasn’t happy with it because the switches are hard to read. Falstad isn’t really made for 16 throw switches.

I wanted to take a second pole for the decimal switch and use that to drive a 7 segment display to indicate the position of the decimal switch. In order to do that, you need a 16 line to 4 line encoder but Falstad doesn’t have one that I could find.

You could build it out of logic gates, of course, but that would be tedious at best. But I noticed the block named custom logic (under Digital Chips) and that was the answer I was looking for.

When you place the block, you get a little box with a few inputs and an output. Right click and hit edit and you’ll see a box that lets you name a model to use for the function. Pressing Edit Model lets you change the function for blocks that use that model.

There are three defining fields in the dialog box. The first is the inputs separated by commas. You can use one or two character names. Another box contains comma-separated outputs using the same one or two characters. The box will redraw to fit the number of ports. There’s also an info text that shows up when you float your cursor over the box. The port names can also have a slash in front (like /Q) to indicate negative logic if you like.

However, the final field is the one you want. You can define your custom function using a simple syntax. Let’s take a simple example first. Suppose you wanted to build a block that was an AND gate with two inputs A and B. The output is C. The definition would be:

00=0 01=0 10=0 11=1

That’s it. In addition to 1 and 0 you can use + or – for a positive or negative transition. You can use pattern letters and you can use ? for a don’t care. For example, suppose you have a block that copies the first input (A) to the output if the Enable pin is true. If the Enable pin is false, you want to output a zero:

?1=A ?0=0

Or you could write:

00=0 01=1 11=1

The input string can be longer than the number of inputs. In that case, the simulator reads the outputs. This lets you build state. For example, the manual shows an SR latch with inputs S and R might have outputs Q and /Q:

??00=10 10??=10 01??=01 ??AB=AB

The first line handles the reset condition so that /Q is always equal to the inverse of Q. It appears that in the definition you can name the outputs anything you want on the left and then use them on the right even if the port names are different (e.g., in this case, Q is A and /Q is B). That line could just as well read ??XY=XY. In the definition, you can’t use two characters including the slash.

The Final Product

Now it is easy to create the decoder:

0000000000000001=0000 0000000000000010=0001 0000000000000100=0010 0000000000001000=0011 0000000000010000=0100 0000000000100000=0101 0000000001000000=0110 0000000010000000=0111 0000000100000000=1000 0000001000000000=1001 0000010000000000=1010 0000100000000000=1011 0001000000000000=1100 0010000000000000=1101 0100000000000000=1110 1000000000000000=1111 ????????????????=0000

The rest is just a lot of wiring. Although the snake of switch connections isn’t as aesthetic as the Geniac disks, it serves the same purpose. It would be a lot of work, but you could probably do all the other Geniac programs in the same way by noting how many throws and poles each disk switch has.

There are actually better ways than the Geniac to do computing with switches. And if you want to do more conventional logic simulation with Falstad, try building flip flops.