Hack a Day

Subscribe to Hack a Day feed Hack a Day
Fresh hacks every day
Updated: 2 min 25 sec ago

Ben Heck Can Program The Smallest Microcontroller

2 hours 41 min ago

Microcontrollers are small, no one is arguing that. On a silicon wafer the size of a grain of rice, you can connect a GPS tracker to the Internet. Put that in a package, and you can put the Internet of Things into something the size of a postage stamp. There’s one microcontroller that’s smaller than all the others. It’s the ATtiny10, and its brethren the ATtiny4, 5, and 9. It comes in an SOT-23-6 package, a size that’s more often seen in packages for single transistors. It’s not very capable, but it is very small. It’s also very weird, with a programming scheme that’s not found in other chips from the Atmel/Microchip motherbrain. Now, finally, we have a great tutorial on using the ATtiny10, and it comes from none other than [Ben Heck].

The key difference between the ATtiny10 and other AVRs is that the tiny10 doesn’t use the standard AVR ISP protocol for programming. Instead of six pins for power, ground, MISO, MOSI, SCK, and RST, this is a high-voltage programming scheme that needs 12 Volts. The normal AVR programmer can do it, but you need to build an adapter. That’s exactly what [Ben] did, using a single-sided perf board, a lot of solder, and some headers. It looks like a lot, but there’s really not much to this programmer board. There’s a transistor and an optocoupler. The only thing that could make this programmer better is an SOT-23 ZIF socket. This would allow bare tiny10s to be programmed without first soldering them to a breakout board, but ZIF sockets are expensive to begin with, and the prices on SOT-23 sockets are absurd.

Programming the device was a matter of loading Atmel Studio and going through the usual AVR rigamarole, but Ben was eventually able to connect a light sensor to the tiny10 and have it output a value over serial. This was all done on a device with only 32 Bytes of RAM. That’s impressive, and one of the cool things about the smallest microcontroller you can buy.

Hacking Hackaday.io from CircuitPython

5 hours 41 min ago

If you’ve ever engaged in social media, you’re familiar with the little thrill you receive when your post, tweet, or project gets a like. But, if logging in feels like too much overhead to obtain your dopamine reward, [pt’s] CircuitPython Hackaday portal may be just what you’re looking for. This project creates a stand-alone counter to display the number of “skulls” (aka likes) received by a project on hackaday.io, and of course, it’s currently counting its own.

The code is running on a SAMD51 (Cortex M4) microcontroller and serving up the skulls on 240×320 TFT display. For WiFi connectivity, the project uses an ESP-32 controlled through the usual AT command set. All the gory details of this interaction are abstracted away by a CircuitPython library, which is great because that code really isn’t something you want to write for every project. The program accesses the hackaday.io API to retrieve the number of skulls for the project, but could be easily modified to interface with any service that returned a JSON result.

We’ve been seeing a lot of CircuitPython code lately. Just in case you’re not familiar with it, CircuitPython is Adafruit’s version of Micropython, a python language targeted at embedded processors. While it sounds like something concocted purely to make old-school embedded-C programmers grumble, it’s actually powerful and convenient for embedded prototyping and development. Fueled by the speed of the latest inexpensive microcontrollers and a rapidly growing set of libraries that take the sting out of using integrated peripherals and common hacker-friendly parts, it offers a solid alternative to older embedded frameworks. There are lots of examples around if you want to get started, and we’re maintaining our own list of CircuitPython projects over on hackaday.io that you can check out.

You can see a video of the display after the break. It’s not a live stream, so you won’t see your like appear on the display, but rest assured, [pt] will!

We’ve seen [pt]’s work before. Including – you know – writing our first post ever.

Long-Range RFID With Feedback

8 hours 40 min ago

Not long ago, we published an article about researchers adding sensor data to passive RFID tags, and a comment from a reader turned our heads to a consumer/maker version which anyone can start using right away. If you’re catching up, passive RFID technology is behind the key fobs and stickers which don’t need power, just proximity to the reader’s antenna. This is a much “hackier” version that works with discrete signals instead of analog ones. It will not however require writing a new library and programming new tags from the ground up just for the user to get started, so there is that trade-off. Sparkfun offers a UHF reader which can simultaneously monitor 25 of the UHF tags shown in this paper.

To construct one of these enhanced tags, the antenna trace is broken and then routed through a switching device such as a glass-break sensor, temperature limit switch, doorbell, or light sensor. Whenever continuity is restored the tag will happily send back its pre-programmed data, and the reader will acknowledge that somewhere one of the tags is seeing some activity. Nothing says this could not be applied to inexpensive RFID readers should you just want a temperature warning for your gecko terrarium or light sensor to your greenhouse‘s sealed controller.

Thank you, [Mike Massen], for your tip on RFID Doing More Than ID.

Designing A Toilet Roll Holder

Thu, 01/17/2019 - 22:00

Everything needs to be designed, at one point or another. There are jobs for those who design kitchens, and stadiums, and interplanetary spacecraft. However, there are also jobs for those who design cutlery, hose fittings, and even toilet roll holders. [Eric Strebel] is here to share just such a story.

[Eric] covers the whole process from start to finish. In the beginning, a wide variety of concepts are drawn up and explored on paper. Various ideas are evaluated against each other and whittled down to a small handful. Then, cardboard models are created and the concepts further refined. This continues through several further phases until it gets down to the fun part of choosing colours and materials for the final product.

Watching the effects of cost and manufacturing process shape the finished item is instructive as to how the design process works in the real world. The toilet paper holder itself is an interesting unit, too – using adjustable magnetic detents to enable one-handed use, as well as including a cell phone holder.

We’ve seen [Eric]’s work before – such as his primer on the value of cardboard in design. Video after the break.



This Computer Mouse Houses A Mouse Computer

Thu, 01/17/2019 - 19:00

Everyone has heard of a computer mouse before, but what about a mouse computer?

Granted, [Electronic Grenade]’s all-in-one computer in an oversized mouse-shaped case is almost without practical value. But that’s hardly the point, which was just to do something cool. Inspiration came from keyboards stuffed with a Raspberry Pi to make a mostly-all-in-one machine; this Rodent of Unusual Size is the next logical step. With a Pi Zero W and a LiPo battery alongside a mouse mechanism inside the 3D-printed case – alas, no real mouse currently on the market would house everything – the computer sports not only a tiny and nearly-usable LCD display, but also a slide-out Bluetooth keyboard. The ergonomics of a keyboard at right angles to the display gives us pause, but again, usability is not the point. And don’t expect much in the performance department – the rig barfs after a few seconds of playing Minecraft.

Still, for all its limitations, this mouse computer has a certain charm. We always enjoy “just because I can” projects, whether they be a Gameboy ukelele or a fire-breathing animatronic duck. Such projects are often valuable not for what they produce, but for pushing into areas where no one has gone before.

Thanks to [GregsStack] for the tip, [via golem.de].

Win Back Some Privacy With A Cone Of Silence For Your Smart Speaker

Thu, 01/17/2019 - 16:00

To quote the greatest philosopher of the 20th century: “The future ain’t what it used to be.” Take personal assistants such as Amazon Echo and Google Home. When first predicted by sci-fi writers, the idea of instant access to the sum total of human knowledge with a few utterances seemed like a no-brainer; who wouldn’t want that? But now that such things are a reality, having something listening to you all the time and potentially reporting everything it hears back to some faceless corporate monolith is unnerving, to say the least.

There’s a fix for that, though, with this cone of silence for your smart speaker. Dubbed “Project Alias” by [BjørnKarmann], the device consists of a Raspberry Pi with a couple of microphones and speakers inside a 3D-printed case. The Pi is programmed to emit white noise from its speakers directly into the microphones of the Echo or Home over which it sits, masking out the sounds in the room while simultaneously listening for a hot-word. It then mutes the white noise, plays a clip of either “Hey Google” or “Alexa” to wake the device up, and then business proceeds as usual. The bonus here is that the hot-word is customizable, so that in addition to winning back a measure of privacy, all the [Alexas] in your life can get their names back too. The video below shows people interacting with devices named [Doris], [Marvin], [Petey], and for some reason, [Milkshake].

We really like this idea, and the fact that no modifications are needed to the smart speaker is pretty slick, as is the fact that with a few simple changes to the code and the print files it can be used with any smart speaker. And some degree of privacy from the AI that we know is always listening through these things is no small comfort either.

Hackaday Superconference: Estefannie’s Daft Punk Helmet

Thu, 01/17/2019 - 14:31

There’s no single formula for success, but if we’ve learned anything over the years of covering cons, contests, and hackathons, it’s that, just like in geology, pressure can create diamonds. Give yourself an impossible deadline with high stakes, and chances are good that something interesting will result. That’s what Estefannie from the YouTube channel “Estefannie Explains It All” did when Bay Area Maker Faire was rolling around last year, and she stopped by the 2018 Hackaday Superconference to talk about the interactive Daft Punk helmet that came out of it.

It’s a rapid-fire tour of Estefannie’s remarkably polished replica of the helmet worn by Guy-Manuel de Homem-Christo, one half of the French electronic music duo Daft Punk. Her quick talk, video of which is below, gives an overview of its features, but we miss the interesting backstory. For that, the second video serves as a kickoff to a whirlwind month of hacking that literally started from nothing.

You’ll Learn it Along the Way

Before deciding to make the helmet, Estefannie had zero experience in the usual tools of the trade. With only 28 days to complete everything, she had to: convert her living room into a workshop; learn how to 3D print; print 58 separate helmet parts, including a mold for thermoforming the visor; teach herself how to thermoform after building the tools to do so; assemble and finish all the parts; and finally, install the electronics that are the hallmark of Daft Punk’s headgear.

The three videos in her series are worth watching to see what she put herself through. Estefannie’s learning curve was considerable, and there were times when nothing seemed to work. The thermoforming was particularly troublesome — first too much heat, then not enough, then not enough vacuum (pretty common hurdles from other thermoforming projects we’ve seen). But the finished visor was nearly perfect, even if it took two attempts to tint.

We have to say that at first, some of her wounds seemed self-inflicted, especially seeing the amount of work she put into the helmet’s finish. But she wanted it to be perfect, and the extra care in filling, sanding, priming, and painting the printed parts really paid off in the end. It was down to the wire when BAMF rolled around, with last minute assembly left to the morning of the Faire in the hotel room, but that always seems to be the way with these kinds of projects.

In the end, the helmet came out great, and we’re glad the run-up to the Superconference wasn’t nearly as stressful for Estefannie — or so we assume. And now that she has all these great new skills and tools, we’re looking forward to her next build.

Hack Your Gmail: A Quick Start for Google App Scripting

Thu, 01/17/2019 - 13:00

For many people, Gmail is synonymous with e-mail. Some people like having cloud access to everything and some people hate having any personal data in the cloud. However you feel about it, one thing that was nice about having desktop software is that you could hack it relatively easily. If you didn’t like how your desktop mail client worked, you had a lot of options: use a different program, write your own, hack the executable of your current program, or in the case of open source just fork it and make any changes you are smart enough to make.

Google provides a lot of features with all of its products, but however you slice it, all the code runs on their servers out of your reach. Sort of. If you know JavaScript, you can use Google Apps Script to add features to many Google products including Gmail. If you’ve used Office scripting, the idea is the same, although obviously the implementation is very different.

With scripting you can make sophisticated filters that would be very hard to do otherwise. For example,  monitor for suspicious messages like those with more than 4 attachments, or that appear to come from a contact between the hours of 2AM and 5AM.

For our example today, I’m going to show you something that is easy but also highly useful.

A Useful Example

How many e-mails do you get telling you about sales? If you are like me, plenty. Do you delete them all? Or can you go back in your mail and tell me what Harbor Freight had on sale in January 2003? I’ve often wished there was a well-known mail header that allowed mails to delete themselves because, honestly, at least half the mail I get is only good to some future date. Invitations, package tracking, sales, notifications about content that is new but on the web.

I started with a mostly manual process. I created a lot of filters that would mark incoming messages that I knew were in this category using a label “keep14”. Then — if I remembered — every two weeks or so I would search for the tag using the “older_than” predicate to find all the old messages with that label. The search string would be:

label:keep14 older_than:14d

Then you can delete the results all in one swoop. Assuming you remember to do it.

Perfect for Automation: Scripting and Triggering in Gmail

Google Script can easily do this. However, there are a few gotchas. The most obvious one is also the easiest one. If you think about it, having a script you have to run every two weeks is no better than doing it manually. Luckily, Google Script provides triggers that can run a script on different events and one of them, unsurprisingly, is time.

So with that detail out of the way, how do we make our keep14 script work?

  1. Go to Google Scripts dashboard and log in
  2. Create a new project (press New Script in the top left and change the untitled name up at the top)
  3. Paste the following:
// Things you might like to change var LABEL="keep14"; // needs to match the one below in autodelete! var DELAY=21; // give them 1 week grace period (21 days) function Install() { ScriptApp.newTrigger("autodelete") .timeBased().everyDays(1).create(); GmailApp.createLabel(LABEL); } function Uninstall() { var triggers = ScriptApp.getScriptTriggers(); var item; for each (item in triggers) { ScriptApp.deleteTrigger(item); } } function autodelete() { var threads; var item; var search = "label:" + LABEL + " older_than:" + DELAY +"d" var n=0; do { // Gmail will only do some at a time so let's do only a few // It is not clear how this works when you delete some of the first 500 threads=GmailApp.search(search,n,500); n=n+500; for each (item in threads) { // Logger.log("Delete %s", item.getFirstMessageSubject()); item.moveToTrash(); } // end for each } while (threads!=null && threads.length>0); } // end function

To understand this, you need to know the object model exposed by Google, of course. There’s documentation, although it sometimes leaves something to be desired, like most documentation. For now, skip to the bottom of the code and focus on the autodelete function.

In the Code

Look a the very top of the code. Those first two lines are just there to allow you to easily customize the label and delay time (in days; I decided to give it a week’s grace period).

The first real part of the algorithm inside autodelete is to build the search string just like we’d issue manually. If you knew you would not process a lot of mail, you could make this very simple by calling GmailApp.search to get an object that represents all the matching messages. The problem is, the script will choke if the search returns more than 500 items.

That might seem unrealistic, but if you go through and mark a message you have been getting once a day for years, it could easily be a lot more. To combat that, I do the search in a loop and restrict it to 500 items per pass. The documentation is a bit sparse about how good it is at remembering the query when it doesn’t start at zero. It is possible that deleting some messages in the first set of results will cause messages that started in the second set to be skipped because on the second call, they would be in the first set. I didn’t run tests to tell and the documentation is unclear. However, after a few times, it should get all the messages and once the script is running regularly (and you don’t add more messages from the past), you probably won’t process more than 500 at a time anyway.

You can assume that the results are all old enough to delete or they wouldn’t come back from the search. So a simple for each loop enumerates each message and a moveToTrash call deletes it.

Getting More Complex

There’s not very much to see in that example. Of course, you can do things that are as complicated as you like assuming the data and features you want are exposed through the object model. For example, you might want to skip deleting the e-mail if you’ve replied to it. You can change labels as activity occurs in a thread, or develop more nuanced “nudge” behavior than what Gmail has currently implemented. We’d love to hear what possible uses you can think of in the comments below.

You can also script most of Google’s other major applications, too. And keeping track of what you’ve automate d is fairly straightforward. If you go to the script dashboard, you’ll see a selection on the left side of the screen that says “My Triggers” that will show you what will run and when. The My Executions entry will show you when your scripts ran and what happened. Scripts can time out and there’s some limit on how much CPU time you can consume every day.

Is it as good as writing your own application or modifying their source code? No, of course not. But it is also a lot simpler. Because the script is on their server, the debugging is a little bare, but it does work and it is better a better way if you’ve been banging your head against the keyboard as you perform repetitive tasks to keep on top of that out-of-control inbox.

You’ll Never See the End of This Project

Thu, 01/17/2019 - 11:30

…theoretically, anyway. When [Quinn] lucked into a bunch of 5 mm red LEDs and a tube of 74LS164 shift registers, a project sprang to mind: “The Forever Number,” a pseudo-random number generator with a period longer than the age of the universe. Of course, the components used will fail long before the sequence repeats, but who cares, this thing looks awesome!

Check out the gorgeous wire-wrapping job!

The core of the project is a 242-bit linear-feedback shift register (LFSR) constructed from (31) 74LS164’s. An XOR gate and inverter computes the next bit of the sequence by XNOR’ing two feedback bits taken from taps on the register, and this bit is then fed into bit zero. Depending on which feedback taps are chosen, the output sequence will repeat after some number of clock cycles, with special sets of feedback taps giving maximal lengths of 2N – 1, where N is the register length. We’ll just note here that 2242 is a BIG number.

The output of the LFSR is displayed on a 22×11 array of LEDs, with the resulting patterns reminiscent of retro supercomputers both real and fictional, such as the WOPR from the movie “War Games,” or the CM2 from Thinking Machines.

The clock for this massive shift register comes from – wait for it – a 555 timer. A potentiometer allows adjustment of the clock frequency from 0.5 to 20 Hz, and some extra gates from the XOR and inverter ICs serve as clock distribution buffers.

We especially love the construction on this one. Each connection is meticulously wire-wrapped point-to-point on the back of the board, a relic originally intended for an Intel SBC 80/10 system. This type of board comes with integrated DIP sockets on the front and wire-wrap pins on the back, making connections very convenient. That’s right, not a drop of solder was used on the board.

You can see 11 seconds of the pattern in the video after the break. We’re glad [Quinn] didn’t film the entire sequence, which would have taken some 22,410,541,156,499,040,202,730,815,585,272,939,064,275,544, 100,401,052,233,911,798,596 years (assuming a 5 Hz clock and using taps on bits 241 and 171 ).

Another LED/LFSR hack we featured used the pseudo-random stream to simulate a flickering candle.

Sharpest Color CRT Display is Monochrome Plus a Trick

Thu, 01/17/2019 - 10:01

I recently came across the most peculiar way to make a color CRT monitor. More than a few oscilloscopes have found their way on to my bench over the years, but I was particularly struck with a find from eBay. A quick look at the display reveals something a little alien. The sharpness is fantastic: each pixel is a perfect, uniform-colored little dot, a feat unequaled even by today’s best LCDs. The designers seem to have chosen a somewhat odd set of pastels for the UI though, and if you move your head just right, you can catch flashes of pure red, green, and blue. It turns out, this Tektronix TDS-754D sports a very peculiar display technology called NuColor — an evolutionary dead-end that was once touted as a superior alternative to traditional color CRTs.

Join me for a look inside to figure out what’s different from those old, heavy TVs that have gone the way of the dodo.

High-End Tools, High-End Hardware

Electrical engineers depend on their oscilloscopes to see what’s happening inside a circuit. If you’ve ever tried debugging without one, you know what a difficult and frustrating experience it can be. Consequently, users expect these devices to provide accurate representations of electrical waveforms: to be an extension of their eyes. If asked to name the most important part of a scope, what would you say? The attenuator or amplifier? The timebase?  The ADCs? The probes? In today’s screens-everywhere world, probably not many would say the display. But, for a generation of engineers brought up on analog scopes, the display was of paramount importance. Hence, the designers wanted the display to be as sharp as possible: any fuzziness should be due to the signal (like my bandwidth-limited wrencher), not the instrument.

Testing out the Tektronix TDS-754D, you can see the labels, grid lines, and even the Hackaday waveform are spectacularly sharp (click image to embiggen)

Analog oscilloscopes were very sharp, and they were monochrome. This was in keeping with their original function: to plot voltage (y) vs time (t), or in some cases, voltage (y) vs voltage (x). Color doesn’t add much to such a display, although many scopes also had a z-input to modulate the trace intensity. And while dual-beam scopes existed (for displaying separate channels simultaneously), keeping three beams synchronized as they swept across the display to create a real-time color trace would have added a great deal of complexity and cost for little return.

When digital storage scopes arrived, and the display evolved from a simple graph to a full user interface, color took on new importance. Different colors could be used to disambiguate traces, visually link them to automated measurements, and distinguish text and UI elements. Later, with the advent of digital phosphor oscilloscopes (DPOs), which did a fancy digital simulation of a real-time analog scope, color could be used to reveal subtle features of the waveforms themselves. So, it made sense to add color displays.

But, if you were building high-end oscilloscopes in the early 1990s, your choices for color displays were limited: color CRTs and LCDs, and each presented problems in oscilloscope use.

Color CRT Issues

The traditional way to display color images on a CRT was to use three electron beams striking an array of primary color phosphor dots (or in some systems, stripes). Several technologies were developed over the years, but they all share a common mechanism: a perforated mask of some kind is interposed between the cluster of electron guns and the screen, producing pinhole images of the three beams, hopefully with each one hitting the intended phosphor dots. In reality, this didn’t always happen, so blurriness and impure colors were common display artifacts. The use of separate color dots also meant a loss of spatial resolution: the smallest possible pixel was a cluster of red, green, and blue points.

Shadow-mask color CRT system.

Focusing a single electron beam into a tight dot is not a problem; scanning electron microscopes can have beam widths less than a 1 nm, although admittedly, they scan over a much smaller area relative to their size. The true difficulty is in keeping three beams aligned with each other and with the phosphor mosaic. As a result, monochrome CRTs suffered fewer image quality issues.

Not only was color CRT display quality problematic, but the devices themselves were bulky, heavy, and sensitive to vibration and shock, which could knock them out of alignment. Although some oscilloscopes were made with traditional color CRTs, the technology was far from ideal.

Why Not LCD? NuColor display (left) renders pixels of any color as uniform dots (enlarged below). In contrast, even modern LCDs (right) use red, green, and blue sub-pixels which cause color fringing at the pixel level (also enlarged).

Some competing oscilloscopes at the time were the first to use LCD screens. But, color LCD screens from that era were a far cry from the excellent displays we enjoy today. They suffered from low contrast, poor color quality, and had abysmal viewing angles. These were the early twisted nematic (TN) displays, primitive compared to today’s version, as in-plane-switching (IPS) displays were still a few years off. Even today’s LCDs haven’t managed to fix one of the original problems: each display pixel is still composed of primary color sub-pixels. Although this can occasionally be used to advantage, for instance in sub-pixel anti-aliasing for rendering text, it can also impart a blurriness to individual pixels.

The Tektronix NuColor Display

Instead of using either of the these existing technologies, the engineers at Tektronix decided to leverage their extensive experience with monochrome CRTs to create a superior display. They started with a traditional monochrome CRT with a white phosphor, then added an ingenious system of switchable colored filters to create a field-sequential color display. In this system, instead of the primary color components being distributed in space, pointillist style, they are distributed in time, with successive frames showing red, green, and blue components of an image. To the eye, the result is the same: primary color components for each pixel get blended into a perception of different colors. The marketing department over at Tektronix dubbed the technology “NuColor.”

NuColor display slowed by high-speed video reveals individual color frames being drawn at 180 Hz.

The biggest advantage to this system over color CRTs, and even modern LCDs, is immediately apparent: each pixel remains the same tiny, single dot as rendered by the monochrome CRT, but now appearing in your choice of color. Tektronix used a 180 Hz frame rate on these displays, so the full RGB display was refreshed every 60 Hz. The downside is an occasional glimpse of the individual color frames if you look away from the display quickly. This effect can also be captured with a high-speed camera.

Compared to color LCDs of the day, the other key advantages were brightness and contrast. The NuColor display had an enormous dynamic range driven by the monochrome CRT at its heart, putting the very poor contrast of contemporary LCDs to shame.

Polarized Filters for Each Color

To make this new display, Tektronix placed an electronically-controlled color shutter system in front of the CRT face. These color shutters were created using a type of liquid crystal technology, but instead of switching individual pixels, they switched the entire display at once, like today’s active 3D shutter glasses or auto-darkening welding helmets. In these LCD applications, light is passed through a neutral polarizing filter, creating polarized light. This light then traverses a liquid crystal cell which can rotate the polarization of light passing through, depending on applied voltage. Finally, the light exits through a front neutral polarizing filter. Depending on the amount of rotation that the liquid crystal cell applies, a varying amount of light is transmitted through the front polarizer.

Frame sequential color CRT system from US Pat. 4,635,051.

In the NuColor display, instead of using neutral polarizing filters, Tektronix used color-selective polarizers. For instance, the first polarizer in their full-color system passed all three red, green, and blue colors of vertically polarized light, while allowing only green in the horizontal polarization. By combining three such polarizers, each with a different single-axis color, they were able to create a system that could selectively pass red, green, blue, or white light. Like DLP projectors which use a red/green/blue/white color wheel to produce brighter images than red/green/blue alone, these displays could have offered an expanded dynamic range, although this technique appears not to have been used on oscilloscopes.

Tektronix was granted at least 10 US patents on this technology. These ranged from a system that could display only red and green primaries (US Pat. 4,582,396), to one that could display three de-saturated primaries resulting in an all-pastel colored output (US Pat.4,674,841), to a full-color display with an expanded color gamut (US Pat. 4,635,051). In the patents and subsequent media coverage from the early 1990s, they touted the advantages of the new display technology in better resolution, lower power consumption, and smaller size and weight. They also estimated it would add only 2.5% to the cost of an oscilloscope, as opposed to 12.5% for a traditional color CRT.

Steady March of Display Technology

Of course, today’s devices don’t use field-sequential color CRTs. The technology behind the NuColor display just couldn’t compete with the size and weight advantages of LCDs. Once LCD quality evolved far enough, these displays came to dominate the digital oscilloscope market just as they did nearly every other screen. Although, with OLEDs on target to outpace LCDs in smartphones this year, that may be changing.

Obviously, the NuColor displays are not being produced any longer, so some enterprising types have started providing LCD replacements for the aging CRTs in these scopes. Luckily, these scopes also sport an analog VGA output port for an external monitor.

By the way, should you happen to find yourself in possession of a 500MHz TDS-754D like this one, note that it’s field-upgradeable to a 1 GHz TDS-784D by changing a few resistors and removing a few capacitors. If you dig through the thread on the eevblog,  you can figure out how. It works, although it’s nowhere near as easy as software-only upgrades like we covered for the Rigol DS1022C, Rigol DS1052ERigol DS1054Z, and Rigol MSO5000.

One last note. I used the osmo-fl2k code we featured back in April to render our favorite logo on the scope: originally an RF hack that turns certain cheap USB-to-VGA dongles into SDR transmitters, it also comes in pretty handy around the lab as a $5 3-channel arbitrary waveform generator.

A Compiler in Plain Text Also Plays Music

Thu, 01/17/2019 - 07:00

As a layperson reading about some branches of mathematics, it often seems like mathematicians are just people who really like to create and solve puzzles. And, knowing that computer science shares a lot of its fundamentals with mathematics, we can assume that most computer scientists are also puzzle-solvers as well. This latest project from [tom7] shows off his puzzle creating and solving skills with a readable file which is also a paper, which is also a compiler for C programs, which can also play music.

[tom7] started off with the instruction set for the Intel 8086 processor. Of the instructions available, he wanted to use only instructions which are also readable in a text file. This limits him dramatically in what this file will be able to execute, but also sets up the puzzle. He walks through each of the hurdles he found by only using instructions that also code to text, including limited memory space, no obvious way of exiting the program once it was complete, not being able to jump backward in the program (i.e. looping), and a flurry of other issues that come up once the instruction set is limited in this way.

The result is a sort of C compiler which might not be the most efficient way of executing programs, but it sure is the most effective way of showing off [tom7]’s PhD in computer science. As a bonus, the file can also play an antiquated type of sound file due to one of the available instructions being a call for the processor to interact with I/O. If you want to learn a little bit more about compilers, you can check out a primer we have for investigating some of their features.

Thanks to [Greg] for the tip!

PostmarketOS Turns 600 Days Old

Thu, 01/17/2019 - 04:00

PostmarketOS began work on a real Linux distribution for Android phones just over 600 days ago. They recently blogged about the state of the project and ensured us that the project is definitely not dead.

PostmarketOS’ overarching goal remains a 10 year life-cycle for smartphones. We previously covered the project on Hackaday to give an introduction. Today, we’ll concern ourselves with the progress the PostmarketOS team has made.

The team admits that they’re stuck in the proof-of-concept phase, and need to break out of it. This has required foundational changes to the operating system to enable development across a wide variety of devices and processor architectures. There’s now a binary package repository powered by builds.sr.ht which will allow users to install packages for their specific device.

Other updates include fixing support for the Nexus 5 and Raspberry Pi Zero, creating support for open source hardware devices including the Pine A64-LTS and Purism Librem 5. PostmarketOS now boots on a total of 112 different devices.

We’re excited to see the PostmarketOS project making progress. With the widespread move to mobile devices, users lose control over their computing devices. PostmarketOS gives us the ability to run code that we can read and modify on these devices. It’s no small feat though. Supporting the wide variety of custom hardware in mobile devices requires a lot of effort.

While it may be a while before PostmarketOS is your daily driver, the project is well suited to building task-specific devices that require connectivity, a touch screen, and a battery. We bet a lot of Hackaday readers have a junk drawer phone that could become a project with the help of PostmarketOS.

Breakfast Bot Does Eggs To Perfection

Thu, 01/17/2019 - 01:00

Breakfast is a meal fraught with paradoxes. It’s important to start the day with a hearty meal full of energy and nutrition, but it’s also difficult to cook when you’re still bleary-eyed and half asleep. As with many problems in life, automation is the answer. [James Bruton] has the rig that will boil your egg and get your day off to a good start.

The basic apparatus uses a thermostatically controlled hotplate to heat a pot of water. [James] then employs an encoder-controlled linear actuator from a previous project to raise and lower a mesh colander into the pot, carrying the egg. An Arduino is used to measure the water temperature, only beginning the cooking process once the temperature is over 90 degrees Celsius. At this point, a 6-minute timer starts, with the egg being removed from the water and dumped out by a servo-controlled twist mechanism.

Future work will include servo control of the hotplate’s knob and building a chute to catch the egg to further reduce the need for human intervention. While there’s some danger in having an automated hotplate on in the house, this could be synchronized with an RTC to ensure your boiled egg is ready on time, every day.

Breakfast machines are a grand tradition around these parts, and we’ve seen a few in our time. Video after the break.

[Thanks to Baldpower for the tip!]


RSA Encryption Cracked Easily (Sometimes)

Wed, 01/16/2019 - 22:00

A large chunk of the global economy now rests on public key cryptography. We generally agree that with long enough keys, it is infeasible to crack things encoded that way. Until such time as it isn’t, that is. Researchers published a paper a few years ago where they cracked a large number of keys in a very short amount of time. It doesn’t work on any key, as you’ll see in a bit, but here’s the interesting part: they used an undescribed algorithm to crack the codes in a very short amount of time on a single-core computer. This piqued [William Kuszmaul’s] interest and he found some follow up papers that revealed the algorithms in question. You can read his analysis, and decide for yourself how badly this compromises common algorithms.

The basis for public key cryptography is that you multiply two large prime numbers to form a product and post it publicly. Because it is computationally difficult to find prime factors of large numbers, this is reasonably secure because it is difficult to find those prime numbers that are selected randomly.

However, the random selection leads to an unusual attack. Public keys, by their very nature, are available all over the Internet. Most of them were generated with the same algorithm and random number generation isn’t actually totally random. That means some keys share prime factors and finding a common factor between two numbers isn’t nearly as difficult.

In fact, that’s the heart of the problem. Factoring a 232-digit number took about 1,500 years of computing time. But finding common factors between two numbers is much easier. However, the original research paper mentioned they found common factors for 36 trillion pairs of keys in a matter of hours. That was faster than [William] expected.

Before you get too alarmed, the researches looked at 6.2 million keys and were able to crack fewer than 13,000. Not exactly a gaping security hole, unless you are one of the 13,000, of course. However, the entire post highlights two things: first, speeding up algorithms is usually more efficient than making faster computersm, and second, you never know when your carefully crafted encryption is going to be rendered worthless by a better algorithm.

It is widely thought that quantum computing will significantly change what you’ll have to do to be secure. We’ve seen before where an implementation of an algorithm is a weak point.

The Embroidered Computer

Wed, 01/16/2019 - 19:00

By now we’ve all seen ways to manufacture your own PCBs. There are board shops who will do small orders for one-off projects, or you can try something like the toner transfer method if you want to get really adventurous. One thing we haven’t seen is a circuit board that’s stitched together, but that’s exactly what a group of people at a Vienna arts exhibition have done.

The circuit is stitched together on a sheet of fabric using traditional gold embroidery methods for the threads, which function as the circuit’s wires. The relays are made out of magnetic beads, and the entire circuit functions as a fully programmable, although relatively rudimentary, computer. Logic operations are possible, and a functional schematic of the circuit is also provided. Visitors to the expo can program the circuit and see it in operation in real-time.

While this circuit gives new meaning to the term “wearables”, it wasn’t intended to be worn although we can’t see why something like this couldn’t be made into a functional piece of clothing. The main goal was to explore some historic techniques of this type of embroidery, and explore the relationship we have with the technology that’s all around us. To that end, there have been plenty of other pieces of functional technology used as art recently as well, but of course this isn’t the first textile computing element to grace these pages.

Thanks to [Thinkerer] for the tip!


This Monowheel Is Bright Orange, And We Want One

Wed, 01/16/2019 - 16:00

Monowheels are a singular form of transport. Like electric scooters and the Segway, they are remarkably impractical for getting from point A to point B, are expensive to build or buy, and make you look faintly silly as you ride them down the street. However, we’d be hard pressed to find a member of the Hackaday team that wouldn’t at least want a go on one for half an hour. [MakeItExtreme] felt the same way, and built one of their own.

The build starts with a tube bender, used to form 40mm tubing into a continuous circle to form the main wheel. Teflon is then turned to produce several rollers that interface the main wheel to the inner frame. Several small motorbike tyres were cut apart to create the tread to provide some decent grip. Power comes courtesy of a 110cc four stroke engine, allowing this thing to go just fast enough to get the rider seriously injured in the event of an accident. The team reports stability is poor at low speed, but remarkably good once above 30 km/h.

The team did a great job, and we particularly enjoy the bright orange paint scheme and fetching decals that really finish it off well. The monowheel concept is remarkably similar to the diwheel, which we’ve seen applied to old Fords with somewhat terrifying results. Video after the break.

Brush With The Power Of 3D Printing

Wed, 01/16/2019 - 14:30

When it comes to 3D printing, functional prints are still few and far between. Sure, you can print a mount for anything, a Raspberry Pi case, but there are few prints out there that are truly useful, and even fewer that are useful while taking advantage of the specific capabilities of a 3D printer.

The Bouldering Brush from Turbo SunShine turns this observation on its head. It’s a useful device for getting the grime, sand, and sweat out of handholds while rock climbing, and it’s entirely 3D printed using manufacturing techniques only 3D printers can do.

If you’re thinking you’ve seen something like this technique before, you’re correct. The Hairy Lion from [_primoz_] on Thingiverse used a fine mesh of bridging to create small fibers of filament emanating from the mane of a lion. While it’s not a gender-neutral print, this is one of the first objects to make it to Thingiverse that truly showcased the sculptural element of many thin fibers of 3D printed filament. With this Bouldering Brush, these fibers become much more useful and even functional. It’s still a great technique, and if you can get your printer set up correctly and the settings correct, this is an awesome print that will easily demonstrate the capabilities of your printer.

Like the Hairy Lion, the Bouldering Brush is two handles that are mostly solid, and fine filaments of extruded plastic connecting these handles. Take the completed print off the bed , cut down the middle of the bristles, and you have a functional, completely 3D printed brush. Just don’t brush your teeth with it.

Plastics: Acrylic

Wed, 01/16/2019 - 13:01

If anything ends up on the beds of hobbyist-grade laser cutters more often than birch plywood, it’s probably sheets of acrylic. There’s something strangely satisfying about watching a laser beam trace over a sheet of the crystal-clear stuff, vaporizing a hairs-breadth line while it goes, and (hopefully) leaving a flame-polished cut in its wake.

Acrylic, more properly known as poly(methyl methacrylate) or PMMA, is a wonder material that helped win a war before being developed for peacetime use. It has some interesting chemistry and properties that position it well for use in the home shop as everything from simple enclosures to laser-cut parts like gears and sprockets.

Free Radicals

Like many of the polymers that the world is built on, PMMA was first commercialized in the early 20th century. The plastic’s root go back much further, though. Acrylic acids, including methacrylic acid, were first synthesized in the mid-19th century. Methyl methacrylate (MMA), the monomer from which PMMA is built, was first synthesized later in that century, and the first successful polymerization was carried out in 1874.

The key to polymerizing methyl methacrylate is the double bond between the two carbons. That bond is part of a functional group called a vinyl group, where the name for other plastics like polyvinyl chloride comes from. In the case of PMMA, the MMA monomers react together in the presence of an initiator compound, like benzoyl peroxide – yes, that benzoyl peroxide. The initiator’s job is to provide lots of free radicals, or unpaired electrons. The free radicals greedily sop up the extra electron in the double bond, reducing it to a single bond and linking an MMA monomer to the initiator. But the resulting molecule is itself a free radical, which can reduce the double bond of nearby MMA monomers, resulting in another free radical. Eventually, the chain reaction runs out of steam, but not before long chains of PMMA are created.

Free-radical polymerization of MMA into PMMA. The ring structure is the initiator, which reduces the carbon-carbon double bond in MMA monomer. That creates another free radical, which reduces another MMA, and so on. The chain reaction eventual terminates, leaving long strands of PMMA. Battle of the Plastics

It would be more than 50 years after the initial polymerization reaction was discovered before PMMA was turned into a commercial product. In the early 1930s, British and German chemists were working independently on PMMA. The British team of Hill and Crawford, working for Imperial Chemical Industries, perfected a method for producing an “acrylic glass” which the company would later market as Perspex. Perspex was lighter, stronger and clearer than regular glass, and as a thermoplastic was able to be pressure or vacuum formed into complex shapes. It was eagerly adopted by civilian aircraft manufacturers to save weight and make their planes more aerodynamic. Military aircraft designers would also take advantage of the properties of Perspex in the run-up to World War II.

Acrylic glass bubble canopy on a Supermarine Spitfire. Source: The Spitfire Site

On the German side, chemist Otto Rohm, co-founder of industrial giant Rohm & Haas, took a different approach to his process. He saw the value of a composite of regular glass and PMMA, with a layer of the polymer laminated between two sheets of glass. He thought that if he could run the polymerization reaction between two sheets of glass, the PMMA would glue the whole sandwich together into a solid sheet. Sadly, he couldn’t make it work – the glass always peeled away from the PMMA. But it left him with perfect sheets of acrylic glass, with all the same properties of Perspex. He dubbed his product Plexiglas, and it would find just as many civilian and military applications as Perspex.

Having proved itself in the crucible of war, PMMA was poised to take advantage of the post-war boom in consumer products. Acrylics found their way into everything from kitchen utensils to car dashboards, and as aqueous suspensions, PMMA revolutionized the coatings industry by essentially allowing a durable plastic coating to be painted onto a surface. PMMA was also found to be largely biocompatible and became a popular main bone cement for orthopedic prostheses, such as artificial hips and knees.

Cut It, Bend It, Glue It

For the home gamer, PMMA offers a lot of flexibility in designing and building projects. While PMMA filament for 3D-printers is not unknown, it doesn’t have nearly the followings that PLA and ABS have. PMMA mostly shows up as stock for laser cutters and engravers. Given its optical clarity, it may seem odd that a laser can cut PMMA, but the polymer actually absorbs the infrared wavelengths emitted by CO2 lasers quite strongly, enough to burn right through it. There are many online guides to laser cutting acrylic, but the general rule is to get rid of the vaporized PMMA as rapidly as possible, preferably through a downdraft table. Not only is the gas released toxic as hell – think formaldehyde, carbon monoxide, and the original monomer, MMA – it’s also flammable. Leaving it around to burn will only cause problems. Some laser cutters also use a gas assist, gently blowing the vapors away with a gentle stream of nitrogen or compressed air, to help get an optically clear, flame-polished cut.

PMMA’s susceptibility to organic solvents may be a weak point for some applications, but it makes for easy assembly of acrylic parts. Solvent welding with acetone, dichloromethane (DCM), or trichloromethane (chloroform) is a quick and easy way to bond acrylic pieces together. The solvent, which is often mixed with a small amount of MMA, flows into joints by capillary action and dissolves the two pieces together, forming one solid piece of plastic.

[Featured image: Trotec Laser, Inc.]

New Contest: 3D Printed Gears, Pulleys, and Cams

Wed, 01/16/2019 - 12:01

One of the killer apps of 3D printers is the ability to make custom gears, transmissions, and mechanisms. But there’s a learning curve. If you haven’t 3D printed your own gearbox or automaton, here’s a great reason to take the plunge. This morning Hackaday launched the 3D Printed Gears, Pulleys, and Cams contest, a challenge to make stuff move using 3D-printed mechanisms.

Adding movement to a project brings it to life. Often times we see projects where moving parts are connected directly to a server or other motor, but you can do a lot more interesting things by adding some mechanical advantage between the source of the work, and the moving parts. We don’t care if it’s motorized or hand  cranked, water powered or driven by the wind, we just want to see what neat things you can accomplish by 3D printing some gears, pulleys, or cams!

No mechanism is too small — if you have never printed gears before and manage to get just two meshing with each other, we want to see it! (And of course no gear is literally too small either — who can print the smallest gearbox as their entry?) Automatons, toys, drive trains, string plotters, useless machines, clockworks, and baubles are all fair game. We want to be inspired by the story of how you design your entry, and what it took to get from filament to functional prototype.

Prizes and How to Enter

Head over to Hackaday.io and publish a project page that shows off your gears, pulleys, and/or cams — enter using the “Submit Project To:” dropdown on the left sidebar of your project page.

There are no strict requirements for what information you share but here’s some advice on wooing the judges: We want to see what you went through during the project. Show off your planning, the method you used to fabricate it, share design files/drawings/schematics if you can. Tell the story like you would if standing around the workshop with your best friend.

  • Three Exceptional Entries will each win a $275 cash prize
  • Seven Runners-up will each win a $100 Tindie gift certificate

Full contest rules are available on the contest page.

What Kind of Mechanism Should I Print?

Mechanical advantage is used everywhere. Once you start looking you won’t be able to stop seeing examples of it. You could change the gear ratio in a consumer item, animate the inanimate by building an automaton, or build your own machine tool. Those examples are shown here, but there are more on the contest page, along with some recommended design tools to get you started.

Do you have a favorite software for designing gears, pulleys, or cams? We’d love to hear your recommendations in the comments below. Warm up your creativity and get designing!

The Printed Solution To A Handful Of Resistors

Wed, 01/16/2019 - 11:30

Resistors are an odd bunch. Why would you have 1.0 Ω resistors, then a 1.1 Ω resistor, but there’s no resistors in between 4.7 Ω and 5.6 Ω? This is a question that has been asked for decades, but the answer is actually quite simple. Resistors are manufactured according to their tolerance, not their value. By putting twenty four steps on a logarithmic scale, you get values that, when you take into account the tolerance of each resistor, covers all possible values. Need a 5.0 Ω resistor? Take a meter to some 4.7 Ω and 5.6 Ω resistors. You’ll find one eventually.

As with all resistor collections, the real problem is storage. With SMD resistors you can stack your reels in stolen milk crates, but for through hole resistors, you’ll need some bins. [FerriteGiant] over on Thingiverse did just that. It’s a 3D printable enclosure that takes all of your E24 series resistors.

The design of this resistor storage solution is a bit like those old wooden cases full of index cards at that building where you can rent books for free. Or, if you like, a handy plastic small parts bin from Horror Fraught. The difference here is that these small cases are designed for the standard length of through-hole resistors, and each of the bins will hold a small 3D printed plaque telling you the value in each bin.

While this is a print that will take a lot of time — [FerriteGiant] spent 100 hours printing everything and used two kilograms of filament — it’s not like through-hole resistors are going away anytime soon. This is a project that you can build and have for the rest of your life, safely securing all your resistors in a fantastic box for all time.