Hackaday Prize Entry: HID Dial

Microsoft has introduced a few interesting bits of hardware recently, and the most drool worthy by far is the Microsoft Surface Dial. What is this magical input device that will revolutionize creative work on a computer? Basically, it’s a Griffin PowerMate — a rotary encoder and button — an interface that really hasn’t changed in a decade and a half.

[K.C. Lee] figures a device this simple would make for a great Hackaday Prize entry, so he built a USB HID multimedia dial. It’s a rotary encoder and a button. This one lights up, though, making this a gamer USB HID multimedia dial.

The electronics for this build are based around the STM8S003, an extraordinarily cheap microcontroller that will work well enough in this application. The mechanical part of this build is a little more interesting; [K.C.] says not everyone has access to fancy CNC or 3D printing equipment, so he built this model out of bits of plastic, metal, and superglue. This enclosure is literally an old superglue bottle cap, an empty dental floss spool, and bits of metal. It works, and took less time to build than it would take to design in a CAD program.

Right now, [K.C.] is working through some USB issues with the STM8 microcontroller. Once those issues are behind him, he’ll have a very cool and very useful input device sitting on his desk. It might look like parts waiting for the recycling bin, but it will be at least as useful as the fancy Microsoft version.

Canary for USB Ports

If you’re a paranoid system admin, [errbufferoverfl] has your back with software that keeps track of whenever someone plugs in or disconnects an USB-based device from a workstation.

Christened USB Canary, [errbufferoverfl’s] tool is written in Python. However, even though Python is cross-platform, USB Canary only works on Linux currently. But, fret not: [errbufferoverfl] is already working on Windows and Mac versions.

Primarily, USB Canary watches USB connectors for any activity and logs anything it sees. Moreover, when a USB device is plugged in or unplugged, USB Canary can alert the owner of the workstation via an SMS message courtesy of the Twilio API, post a message in a Slack channel or even make a noise to alert a nearby sysadmin. Additionally, USB Canary can be configured to only run when the workstation is locked (if you’re not completely paranoid).

[errbufferoverfl’s] USB Canary was born out of dissatisfaction with current workstation monitoring tools. You see, most tools only notify users after someone has logged on. [errbufferoverfl] points out that there are means to automate attacks without logging in, and we can think of many unsavory things that can be done when logged out.

While USB Canary won’t protect you from -220V , it might at least warn of a BadUSB attack. But, for the really paranoid, why not try GoodUSB?

[via bleepingcomputer]

Use a Mini PCI-e 3G Card with USB Instead

Back the late 2000s, when netbooks were the latest craze, some models would come with an inbuilt 3G modem for Internet access. At the time, proper mobile Internet was a hip cool thing too — miles ahead of the false prophet known as WAP. These modems would often slot into a Mini PCI-e slot in the netbook motherboard. [delokaver] figured out how to use these 3G cards over USB instead.

It’s actually a fairly straightforward hack. The Mini PCI-e standard has a couple of pins dedicated to USB data lines, which the modem in question uses for communicating with the host computer. Unfortunately it’s not quite as simple as just soldering on a four-wire USB cable. The modem relies on the 3.3V power from the Mini PCI-e slot instead of the 5V from USB. No problem, just get a low-dropout 3.3V regulator and run that off the USB port. Then, it’s a simple enough matter of figuring out which pins are used to talk to the SIM card, and soldering them up to a SIM adapter, or directly to the card itself if you’re so inclined. The guide covers a single model of 3G modem but it’s likely the vast majority of these use a very similar setup, so don’t be afraid to have a go yourself.

Overall Mini PCI-e is a fairly unloved interface, but we’ve seen the reverse of this hack before, a Mini PCI-e to USB adapter used to add a 12-axis sensor to a laptop.

[Thanks to Itay for the tip!]

The Best Pi Emulation Console You Can Build

By far the most popular use for a Raspberry Pi is an emulation console. For an educational device, that’s fine – someone needs to teach kids how to plug a USB cable into a device and follow RetroPi tutorials on the Internet. These emulation consoles usually have one significant drawback: they’re ugly, with wires spilling everywhere. Instead of downloading a 3D printed Pi enclosure shaped like a Super Nintendo, [depthperfection] designed his own. It looks great, and doesn’t have a donglepocalypse hanging out the back.

The biggest factor in building an enclosure for a Pi Zero is how to add a few USB ports. There’s only one USB port on the Pi Zero, although if you’re exceptionally skilled, you can solder a hub onto the test points on the bottom of the board. This stackable USB hub solves the problem with the help of pogo pins for the power and USB pair. It’s only $17 USD, too.

With the USB and power sorted, [depthperfection] set out to design an enclosure. This was modeled in Fusion360, with proper vent holes, screw bosses, and cutouts for all the ports. It’s designed to be 3D printable, and with a little ABS smoothing, this enclosure looks great.

For software, [depthperfection] turned to Recallbox, a retrogaming platform that also doubles as a media player. It’s simpler than a RetroPi installation, but for playing Super Mario 3, you don’t really need many configuration options. This is a great project that just works and looks good doing it. The world — and the Raspberry Pi community — needs more projects like this, and we’re glad [depthperfection] sent this one in.

Good USB – Protecting Your Ports With Two Microcontrollers

If you’ve ever needed an example of why you should not plug random USB peripherals into your computer, you need only look at BadUSB. The BadUSB attack relies on the fact that the microcontroller inside every USB device is a black box. If you plug a USB thumb drive into your computer, the microcontroller could quickly set up an additional network interface, forward all your traffic to the attacker’s server, and still keep serving up all those files and documents on the drive. Do you want a thumb drive that attaches a virus to every file? Bad USB can do that.

Until now, there is no cure or fix for a device using an implementation of BadUSB. [Robert Fisk] just came up with the first prophylactic USB device, designed to keep BadUSB off your computer. He’s calling it USG, and it’s basically a hardware firewall for USB devices.

The basic design of the system goes something like this: take an ARM microcontroller with a USB host port, take another microcontroller with a USB device port, and have these devices talk to each other over SPI. The command protocol between these two microcontrollers is very simple, and thus decreases the attack surface.

[Robert] is building USG dongles, but in the spirit of Open Hardware and verifiable hardware, he’s also released a design based on two dev boards wired together. This DIY version is basically two STM32F4 dev boards smashed together with bodge wires. The total cost – less solder and a JTAG programmer – is about $50 USD. No, it doesn’t look as pretty as [Robert]’s commercial version of USG, but it does the same job of keeping your computer safe from BadUSB devices.

Old Thermometer Gets New Eyes

As much as we’d like to have the right tools for the right job all of the time, sometimes our parts drawers have other things in mind. After all, what’s better than buying a new tool than building one yourself from things you had lying around? That’s at least what [Saulius] must have been thinking when he needed a thermometer with a digital output, but only had a dumb, but feature-rich, thermometer on hand.

Luckily, [Saulius] had a webcam lying around as well as an old thermometer, and since the thermometer had a LCD display it was relatively straightforward to get the camera to recognize the digits in the thermometer’s display. This isn’t any old thermometer, either. It’s a four-channel thermometer with good resolution and a number of other useful features (with an obvious lack of communications abilities), so it’s not something that he could just overlook.

Once the camera was mounted to an arm and pointed at the thermometer’s screen, an algorithm running on a computer detects polygons and reports its information into a CSV file. This process is made simpler by the fact that LCD screens like this are very predictable. From there, the data is imported into LibreOffice and various charts and graphs can be made.

Although perhaps not the most elegant of hacks, sometimes you have to work with the supplies that are on hand at the time. Sometimes the tools you need are too expensive, politically dangerous, or too impractical to obtain. To that end [Saulius]’s hack is a great example of what hacks are possible with the right mindset.

60 Watt USB Soldering Iron Does it with Type-C

Some time back we ran a post on those cheap USB soldering irons which appeared to be surprisingly capable considering they were really under powered, literally. But USB Type-C is slated to change that. Although it has been around for a while, we are only now beginning to see USB-C capable devices and chargers gain traction. USB-C chargers featuring the USB-PD option (for power delivery) can act as high power sources allowing fast charging of laptops, phones and other devices capable of negotiating the higher currents and voltages it is capable of sourcing. [Julien Goodwin] shows us how he built a USB-C powered soldering iron that doesn’t suck.

He is able to drive a regular Hakko iron at 20 V and 3 Amps, providing it with 60 W of input power from a USB-C charger. The Hakko is rated for 24 V operating voltage, so it is running about 16% lower power voltage. But even so, 60 W is plenty for most cases. The USB-C specification allows up to 5 A of current output in special cases, so there’s almost 100 W available when using this capability.

It all started while he was trying to consolidate his power brick collection for his various computers in order to reduce the many types and configurations of plugs. Looking around, he stumbled on the USB-PD protocol. After doing his homework, he decided to build a USB Type-C charger board with the PD feature based on the TI TPS65986 chip – a very capable USB Type-C and USB PD Controller and Power Switch. The TI chip is a BGA package, so he had to outsource board assembly, and with day job work constantly getting in the way, it took a fair bit of time before he could finally test it. Luckily, none of the magic smoke escaped from the board and it worked flawlessly the first time around. Here is his deck of slides about USB-C & USB-PD [PDF] that he presented at linux.conf.au 2017 Open Hardware Miniconf early this year. It provides a nice insight to this standard, including a look at the schematic for his driver board.

Being such a versatile system, we are likely to see USB-C being used in more devices in the future. Which means we ought to see high power USB Soldering Irons appearing soon. But at the moment, there is a bit of a “power” struggle between USB-C and Qualcomm’s competing “Quick Charge” (QC) technology. It’s a bit like VHS and Betamax, and this time we are hoping the better technology wins.