Using Lookup Tables To Make The Impossible Possible

Embarrassing confession time: I never learned my multiplication tables in grade school. Sure, I had the easy tables like the twos and the fives down, but if asked what 4 x 7 or 8 x 6 was, I’d draw a blank. As you can imagine, that made me a less than stellar math student, and I was especially handicapped on time-limited tests with lots of long multiplication problems. The standard algorithm is much faster when you’ve committed those tables to memory, as I discovered to my great woe.

I was reminded of this painful memory as I watched Charles Lohr’s 2019 Supercon talk on the usefulness and flexibility of lookup tables, or LUTs, and their ability to ease or even completely avoid computationally intensive operations. Of course most LUT implementations address problems somewhat more complex than multiplication tables, but they don’t have to. As Charles points out, even the tables of sines and logarithms that used to populate page after page in reference books have been ported to silicon, where looking up the correct answer based on user input is far easier than deriving the answer computationally.

Yes, this is a Minecraft server all thanks to LUTs.

One of the most interesting examples of how LUTs can achieve the seemingly impossible lies in an old project where Charles attempted to build a Minecraft server on an ATMega168. Sending chunks (the data representations of a portion of the game world) to clients is the essential job of a Minecraft server, and on normal machines that involves using data compression. Rather than trying to implement zlib on an 8-bit microcontroller, he turned to a LUT that just feeds the raw bytes to the client, without the server having the slightest idea what any of it means. A similar technique is used by some power inverters, which synthesize sine wave output by feeding one full cycle of values to a DAC from a byte array. It’s brute force, but it works.

Another fascinating and unexpected realization is that LUTs don’t necessarily have to be software. Some can be implemented in completely mechanical systems. Charles used the example of cams on a shaft; in a car’s engine, these represent the code needed to open and close valves at the right time for each cylinder. More complicated examples are the cams and gears once found in fire control computers for naval guns, or the programming cards used for Jacquard looms. He even tips his hat to the Wintergatan marble machine, with its large programming drum and pegs acting as a hardware LUT.

I found Charles’ talk wide-ranging and fascinating. Originally I thought it would be an FPGA-heavy talk, but he didn’t actually get to the FPGA-specific stuff until the very end. That worked out fine, though — just hearing about all the cool problems a LUT can solve was worth the price of admission.

And for the curious, yes, I did eventually end up memorizing the multiplication tables. Oddly, it only clicked for me after I started playing with numbers and seeing their relationships using my first calculator, which ironically enough probably used LUTs to calculate results.

Continue reading “Using Lookup Tables To Make The Impossible Possible”

Engineering Your Way To Better Sourdough (and Other Fermented Goods)

Trent Fehl is an engineer who has worked for such illustrious outfits as SpaceX and Waymo. When he got into baking, he brought those engineering skills home to solve a classic problem in the kitchen: keeping a sourdough starter within the ideal, somewhat oppressive range of acceptable temperatures needed for successful fermentation.

A sourdough starter is a wad of wild yeasts that you make yourself using flour, water, and patience. It’s good for a lot more than just sourdough bread — you can scoop some out of the jar and use it to make pancakes, waffles, pretzels, and a host of other bread-y delights. A starter is a living thing, a container full of fermentation that eats flour and has specific temperature needs. Opinions differ a bit, but the acceptable temperature range for active growth is about 60 F to 82 F. Too cold, and the starter will go dormant, though it can be revived with a little love. But if the starter gets too hot, all the yeasts and bacteria will die.

While there are of course commercial products out there that attempt to solve this problem of temperature control, most of them seem to be aimed at people who live in some wonderland that never gets warmer than 80F. Most of these devices can’t cool, they only provide heat. But what if you live in a place with seasons where the climate ranges from hot and humid to cold and dry?

The answer lies within Chamber, a temperature-regulated haven Trent created that lets these wild yeasts grow and thrive. It uses a Peltier unit to heat and cool the box as needed to keep the mixture fermenting at 26°C /78.8°F.

Thanks to the Peltier unit, Trent can change the temperature inside the chamber simply by alternating the direction of current flow through the Peltier. He’s doing this with an H-bridge module driven by a Raspberry Pi Zero. When it starts to get too warm in the chamber, the fan on the outside wall vents the heat away. A second fan inside the chamber pulls warm air in when it gets too cold.

Trent says that Chamber performs really well, and he’s recorded temperatures as low as 60F and as high as 82F. He mostly uses it for sourdough, but it could work for other temperature-sensitive food sciences like pickling, growing mushrooms, or making yogurt. We think it could be ideal for fermenting kombucha, too.

Chamber works well enough that Trent has put further development on the back burner while he makes use of it. He does have several ideas for improvements, so if you want to help, check out his website and Github repo.

Continue reading “Engineering Your Way To Better Sourdough (and Other Fermented Goods)”

The Hacker History Of Music Technologies

Music throughout history has been inspired and changed by hackers and makers, and never moreso than in the 20th century. Helen Leigh is one such hacker, who brought a talk to Supercon to give us a crash course in the history of recording, electronics and music, and what the maker movement is doing in the music world today.

The tape recorder was an invention that kicked off a golden period of exploration in sound. Beginning in World War II, the Nazi propaganda machine cut and spliced recorded materials and disseminated them across broadcasting stations in Europe. To the astonishment of the Allies, certain German officials appeared to be making broadcasts from different studios at the same time, due to the high quality of the recording hardware. After the war, this technology was discovered by a group of Parisian recording artists who began to experiment with an art that became known as musique concrète, using tape hardware in weird and wonderful ways to create new sounds heretofore unheard in nature.

Continue reading “The Hacker History Of Music Technologies”

Hackaday Belgrade: Call For Proposals

Join Hackaday in Belgrade, Serbia on May 9th, 2020 for the Hackaday Belgrade conference! The biennial hardware conference is just seventeen weeks from now. Early Bird tickets will go on sale shortly, but beginning right now you can hack your way into the conference by submitting a talk proposal. Accepted speakers receive free admission, plus everyone who submits a quality talk proposal will be given priority when tickets go on sale.

Yes, I’m talking to you. Hackaday strives to include first-time speakers in the slate of presenters at our conferences. We’re looking for unique, cutting-edge, whimsical, crazy, formidable, or world-changing topics revolving around hardware creation. From learning new tools or techniques to fabrication adventures, from code-wrangling that firmware project to pulling off an art installation, and from forgotten hardware history to the impossible made possible on your own workbench, we need to hear your stories!

That project for which you went into the deep weeds and worked your way back out again? Everyone at a Hackaday conference wants to hear about it and in the greatest detail possible. After all, we’re your fellow hackers. In fact, you should probably bring the hardware along for the ride.

We Need You

None of this happens in a vacuum. This is the third Hackaday Belgrade conference, which have now settled into a tick-tock cadence of even-numbered years. The first two both sold out, this one will as well, and the result is always an action-packed, nearly 24-hour marathon sprint of talks, workshops, and hardware hacking. But the only reason this works is because amazing people just like you make it a priority in their life to be there.

Badge hacking at 2018 Hackaday Belgrade

So take the plunge, put together your talk proposal and submit it before March 2nd. But don’t stop there, pester your friends and your heros to do the same. Block out May 9th on your schedule (roughly 9 am-2 am) and take the day before off of work. While you’re at it, convince your boss and coworkers to come along with you. See you in Belgrade!

You Could Be A Manufacturing Engineer If You Could Only Find The Time

Let’s be honest, Ruth Grace Wong can’t teach you how to be a manufacturing engineer in the span of a twenty minute talk. But no-one can. This is about picking up the skills for a new career without following the traditional education path, and that takes some serious time. But Grace pulled it off, and her talk at the 2019 Hackaday Superconference shares what she learned about reinventing your career path without completely disrupting your life to do so.

Ruth got on this crazy ride when she realized that being a maker made her happy and she wanted to do a lot more of it. See wanted to be “making stuff at scale” which is the definition of manufacturing. She took the hacker approach, by leveraging her personal projects to pull back the veil of the manufacturing world. She did a few crowd funding campaigns that exposed her to the difficulties of producing more than one of something. And along the way used revenue from those projects to get training and to seek mentorships.

Continue reading “You Could Be A Manufacturing Engineer If You Could Only Find The Time”

36C3: Build Your Own Quantum Computer At Home

In any normal situation, if you’d read an article that about building your own quantum computer, a fully understandable and natural reaction would be to call it clickbaity poppycock. But an event like the Chaos Communication Congress is anything but a normal situation, and you never know who will show up and what background they will come from. A case in point: security veteran [Yann Allain] who is in fact building his own quantum computer in his garage.

Starting with an introduction to quantum computing itself, and what makes it so powerful also in the context of security, [Yann] continues to tell about his journey of building a quantum computer on his own. His goal was to build a stable computer he could “easily” create by himself in his garage, which will work at room temperature, using trapped ion technology. After a few iterations, he eventually created a prototype with KiCad that he cut into an empty ceramic chip carrier with a hobbyist CNC router, which will survive when placed in a vacuum chamber. While he is still working on a DIY laser system, he feels confident to be on the right track, and his estimate is that his prototype will achieve 10-15 qubits with a single ion trap, aiming to chain several ion traps later on.

As quantum computing is often depicted as cryptography’s doomsday device, it’s of course of concern that someone might just build one in their garage, but in order to improve future cryptographic systems, it also requires to fully understand — also on a practical level — quantum computing itself. Whether you want to replicate one yourself, at a rough cost of “below 15k Euro so far” is of course a different story, but who knows, maybe [Yann] might become the Josef Prusa of quantum computers one day.

Continue reading “36C3: Build Your Own Quantum Computer At Home”

36C3: SIM Card Technology From A To Z

SIM cards are all around us, and with the continuing growth of the Internet of Things, spawning technologies like NB-IoT, this might as well be very literal soon. But what do we really know about them, their internal structure, and their communication protocols? And by extension, their security? To shine some light on these questions, open source and mobile device titan [LaForge] gave an introductory talk about SIM card technologies at the 36C3 in Leipzig, Germany.

Starting with a brief history lesson on the early days of cellular networks based on the German C-Netz, and the origin of the SIM card itself, [LaForge] goes through the main specification and technology parts of each following generation from 2G to 5G. Covering the physical basics, I/O interfaces, communication protocols, and the file system located on the SIM card, you’ll get the answer to “what on Earth is PIN2 for?” along the way.

Of course, a talk like this, on a CCC event, wouldn’t be complete without a deep and critical look at the security side as well. Considering how over-the-air updates on both software and — thanks to mostly running Java nowadays — feature side are more and more common, there certainly is something to look at.

Continue reading “36C3: SIM Card Technology From A To Z”