USB + μC = Peril?

You hear about people finding USB drives and popping them into a computer to see what’s on them, only to end up loading some sort of malware onto their computer. It got me to thinking, given this notorious vulnerability, is it really a great idea to make electronics projects that plug into a computer’s USB port? Should I really contribute to the capitulation-by-ubiquity that USB has become?

A of couple years ago I was working on an innocuous project, a LED status light running off of USB. It ran off USB because I had more complicated hopes for it–some vague notion about some kind of notification thing and also it was cool to have access to 5 V right from the ‘puter. This was about the time that those little RGB LEDs connected to USB were all the rage, like blink(1), which raised $130,000 on Kickstarter. I just wanted to make a status light of some sort and had the parts, so I made it.

My version was a small rectangular PCB from OSHPark packing a Tiny85, with a 10 mm RGB LED providing pretty much all of the functionality — no spare pins broken out. Honestly, for the amount of code on it, even the Tiny85 was overpowered. I recall thinking at the time, could my creation be misused for evil? Could some wicked programmer include malware alongside my LED-lighting Arduino sketch?

It’s absurd, of course. My meager engineering skills ought not interest anyone. On the other hand, couldn’t some heartless poltroon, the hardware equivalent of a script kiddie, make my creation into a malware-spewing Typhoid Mary of a project? It has always been the realistic consequence of building anything–that it could be misused. I’d be thrilled to the point of giddiness if someone remade one of my projects into something cool, but I’d really hate for a USB light I designed to turn into some vector into someone’s computer. But how much of that is my responsibility?

If you think I’m the only one who thinks this, go to SparkFun or Adafruit and count all of the boards with microcontrollers and USB A male plugs. Even the tiny boards like the Huzzah and Gemma use USB cables, rather than plugging directly into the computer. Granted, they are microcontrollers that realistically would be connected to a project and it might not be possible to physically move them into position and plug them in. Also requiring a charging cable does not in any way make a microcontroller board work any differently than one plugged right into the computer. I’m left wondering if I’m spazzing out over nothing, and there’s nothing we can do about our tendency to treat any electronic gizmo with a shiny case as being safe to plug into the same computer we use to pay bills.

If there is no data transfer taking place, and I’m just getting power, wouldn’t it be enough to disable (or not connect) the data pins of the USB on the circuit board? Or maybe we really have no business connecting a data connection to a microcontroller if we’re not reflashing the chip with fresh code–think I’m paranoid? Maybe you should just get power from a wall wart and leave the USB cord in the drawer. It’s one thing to urge our friends and family to steer clear of mystery plugs, but as engineers and tinkerers, do we not owe the community the benefit of our knowledge?

Of course, Hackaday contains numerous examples of USB projects, including canary for USB ports, tips on protecting your ports with two microcontrollers, a guide to stopping rubber ducky attacks, and removing security issues from untrusted USB connections. Also, has anyone used the USB condom?

Friends, let me know your thoughts on the subject. Am I a freak to steer clear of USB-powered project like my dumb LED? Leave your comments and weigh in with your opinions.

Mini Tetris Game Packs A Tiny85

[dombeef] originally built pocketTETRIS as a Father’s Day gift for his Tetris-loving pops. However, having finished the project he’s decided to share it with the universe, and it’s looking rather sweet.

He made the game the smallest he could make, with size limitations imposed by a 0.96” OLED display, the coin-cell battery pack, and his desire for a durable 3D-printed case. It uses a ATtiny85 for the brains, mounted on a custom PCB that [dombeef] designed in KiCad. The Arduino code was modified from Andy Jackson’s ATtinyArcade code, giving it three-button capability instead of two. [dombeef] has details on the project page on Hackaday.io as well as 3D-design and PCB-design files on the project’s code repository on GitHub.

We’ve published a fair number of Tetris posts in the past, including skyscraper Tetris, playing Tetris on a soldering iron, and Tetris in 446 bytes. What’s the smallest Tetris you’ve seen?

Making Synths Out Of Audio Cassettes

8bit Mixtapes are simple Arduino-based sound and beat generators based on ATtiny 84s and 85s and designed fit inside old audio cassettes, or at least be about that size. Founded by [Dusjagr], [Ucok] and [Lyok], and including participants from around the globe, 8bit Mixtapes are small synthesizers that play one-line algorithmic symphonies, simple sound generators that work off of a single line of code.

The project has been going on for a number of years, with several different iterations released over the years–the most recent is the Mixtape NEO, released about a month ago that features audio bootloading and a row of NeoPixel LEDs. It’s well documented and fully open source, with a code repository and wiki. The arty PCBs look great as well!

8bit Mixtapes are a natural project for electronics students to tackle. An ATtiny85 with two pots and two buttons? Pretty simple, and the musical payoff makes it a cinch for one-day workshops. The code simplicity makes it easy to modify the software as well.

Quirky synths are Hackaday’s bag, including one we published previously that controls a hexagonal matrix of LEDs.

Continue reading “Making Synths Out Of Audio Cassettes”

Smart pen

The Smart Pen

“Ugh. You mean I have to press down on the pen’s button to open it? Gross.” In this day-and-age when we can swipe on our phones and do voice recognition, there seems no reason we should have to press a button. How antiquated. So [Marek Baczynski] modernized his pen for swiping and voice control. It’s also sure to get all the kids back to working on their penmanship.

Seriously though, not all hacks have to be serious. [Marek] and [Ghlargh] added a servo to activate the button, and then [Marek] added Bluetooth to control the servo. After writing a phone app, he was able to swipe down to open it and down again to close it. Then, after some prompting from Redditers he added voice control from his laptop. We think he could have done a more professional job with the way he attached the pen to the laptop, perhaps he could have 3D printed something instead of just using tape, or maybe made something using CNC or a laser cutter. An important hack such as this deserves as much. Now he need only say “Computer. Open pen.” and the tedious task is taken care of. Seeing is believing so check it out in the video below.

Continue reading “The Smart Pen”

Ambitious ATtiny85 Board Tests A Beginner’s Skills

[Chris O’Riley] has been playing around with Arduinos for around a year, and decided he wanted a breadboardable ATtiny85 in order to prototype using the actual controller that would be used in the final project. He wants to use it to interface with a Bosch BMP280 pressure sensor, but for now it stands alone.

It’s a simple board with the Tiny85, 3.3 V and 5 V regulators, a power LED, as well as the usual resistors and caps [Ed: not resistor sand caps]. The double-sided PCB [Chris] milled himself — he’s an illustrator and photographer by day, so it’s no surprise the board turned out gorgeous. He designed the board in Illustrator after taking a stab at Eagle, then ran it through his CNC to mill the circuits using a .017 inch end mill as well as drilling the vias. He add solder paste using the tip of a knife, but after messing around with an iron, he ended up investing in a hot air rework station.

We love our Tiny85s here on Hackaday. Check out the ATtiny85 gaming console, the NTSC-generating ATTiny85, and making DIY I2C devices with the chip.

Single Part Boost Converter Challenge (Completed)

[Josh] posed an interesting challenge. Create a boost converter that can light a blue LED using a nearly dead battery and one part. Well, we were skeptical until we saw he wasn’t counting an ATtiny processor as a part. You can see a video of the challenge, below.

The challenge has already been solved, so if you view the link, you might want to avoid the comments until you’ve had time to think about your own solution. We’ll confess, the first one we thought of was probably not workable for reasons [Josh] explains. The final answer neatly fits the criteria of a hack.

Continue reading “Single Part Boost Converter Challenge (Completed)”

Copper Foil Makes Music–With A Little Help

Craft stores are often the source of odd inspiration. In the stained glass section, we’ve seen the copper foil, and even used it to prototype some RF circuits on the tops of shoeboxes. However, we could never get a good method for connecting ICs to the relatively thick foil. [Bryan Cera] did it though. His paperSynth uses some paper and cardboard for a substrate, copper foil, and an ATtiny CPU to make music. You can see the device in operation in the video, below.

The copper foil is sticky and it isn’t conductive on the back, so anywhere the foil is supposed to touch, you need a blob of solder. We wouldn’t trust the insulation by itself to cross wires, but with a bit of insulating material between–a piece of paper or electrical tape, for example–you could probably cross with impunity. For an RF circuit, you might even make low-value capacitors like that.

Continue reading “Copper Foil Makes Music–With A Little Help”