More Power For Raspberry Pi USB Ports

Since the Raspberry Pi 2 was released, everyone building RetroPi emulators has been graced with four USB ports. For those of us doing useful stuff with the Pi, those ports are a little anemic: you can’t plug in a webcam and a WiFi module at the same time without suffering CPU brownouts. The maximum current all USB peripherals can draw from the USB port is 600mA. By changing a value in the /boot/config.txt file, this current limit can be increased to 1.2A for all four ports.

The yellow line traces the signal from the GPIO to the USB power switch.

Because the USB current limit is set in software, there must be a few bits of hardware that do the actual work. Tucked away below the right hand of the GPIO header is the hardware that does exactly that. It’s an AP2253 current-limited power switch (PDF), and the current is adjustable by tying a resistor to pin 5 on the chip.

Pin 5 on the AP2253 is connected to two resistors. One resistor goes directly to a ground plane, while the other is switched through a FET. The gate of this FET goes to another resistor, and when a GPIO pin is high, these resistors are wired in parallel. This means the resistance is halved when the GPIO pin is high, doubling the current limiting circuit in the AP2253.

This setup provides a relatively easy mod to increase the current limiting of the USB ports so they can provide 4x500mA, meeting the USB spec. The AP2253 power switch’s current limiting can be set by a single resistor, anywhere from 10kΩ to 232kΩ. By removing R50 and R4, and replacing R50 with a 10kΩ resistor, the current limiting of the AP2253 switch will be set to its maximum, 2.1A. Divide that by four, and you have 500mA per port, just like every other computer on the planet.

There is a reason the Raspberry Pi foundation set the current limiting of the USB ports so low. The Pi was originally intended to run off of a micro USB phone charger. There aren’t many phone chargers out there that will supply more than 1A, and the CPU and related peripherals will take half of that. If you’re going to change the /boot/config.txt file, you’re going to need a beefy power supply. Increasing the current limiting of the USB ports to 2A will require an even bigger, beefier supply.

USB PIDs For All

The USB Implementers’ Forum doesn’t make things easy for anyone building a product with a USB port. To sell anything with USB and have it work like USB should, you need to buy a USB Vendor ID, a $5000 license that grants you exclusive use of 65,536 USB Product IDs. Very few companies will ever release 65,000 products, and there are a lot of unused PIDs sitting around out there.

Now, someone has finally done the sensible thing and put an unused USB VID to work. obtained the rights to a single VID – 0x1209 – and now they’re parceling off all the PIDs that remain to open source hardware projects.

This is not a project supported by the USB Implementers’ Forum, and is more of a legal game of chicken on the part of The only thing the USB-IF could do to stop this is revoke the original VID; useless, because they can’t reassign it to anyone else. The original owners of the VID, InterBiometrics, licensed their VID before transferring or sublicensing VIDs and PIDs was prohibited by the USB-IF.

You can get a PID by forking the repo, claiming a PID, and sending a pull request. Once that’s accepted, that PID is yours forever.

Solar Charge Controller Improves Efficiency of Solar Panels

The simplest and easiest way to charge a battery with a solar panel is to connect the panel directly to the battery. Assuming the panel has a diode to prevent energy from flowing through it from the battery when there’s no sunlight. This is fairly common but not very efficient. [Debasish Dutta] has built a charge controller that addresses the inefficiencies of such a system though, and was able to implement maximum power point tracking using an Arduino.

Maximum power point tracking (MPPT) is a method that uses PWM and a special DC-DC converter to match the impedance of the solar panel to the battery. This means that more energy can be harvested from the panel than would otherwise be available. The circuit is placed in between the panel and the battery and regulates the output voltage of the panel so it matches the voltage on the battery more closely. [Debasish] reports that an efficiency gain of 30-40% can be made with this particular design.

This device has a few bells and whistles as well, including the ability to log data over WiFi, an LCD display to report the status of the panel, battery, and controller, and can charge USB devices. This would be a great addition to any solar installation, especially if you’ve built one into your truck.

This is [Debasish]’s second entry to The Hackaday Prize. We covered his first one a few days ago. That means only one thing: start a project and start documenting it on

Killer USB Drive is Designed to Fry Laptops

[Dark Purple] recently heard a story about how someone stole a flash drive from a passenger on the subway. The thief plugged the flash drive into his computer and discovered that instead of containing any valuable data, it completely fried his computer. The fake flash drive apparently contained circuitry designed to break whatever computer it was plugged into. Since the concept sounded pretty amazing, [Dark Purple] set out to make his own computer-frying USB drive.

While any electrical port on a computer is a great entry point for potentially hazardous signals, USB is pretty well protected. If you short power and ground together, the port simply shuts off. Pass through a few kV of static electricity and TVS diodes safely shunt the power. Feed in an RF signal and the inline filtering beads dissipate most of the energy.

To get around or break through these protections, [Dark Purple]’s design uses an inverting DC-DC converter. The converter takes power from the USB port to charge a capacitor bank up to -110VDC. After the caps are charged, the converter shuts down and a transistor shunts the capacitor voltage to the data pins of the port. Once the caps are discharged, the supply fires back up and the cycle repeats until the computer is fried (typically as long as bus voltage is present). The combination of high voltage and high current is enough to defeat the small TVS diodes on the bus lines and successfully fry some sensitive components—and often the CPU. USB is typically integrated with the CPU in most modern laptops, which makes this attack very effective.

Thanks for the tip, [Pinner].

Arduino Synth Guitar Really Rocks

[Gr4yhound] has been rocking out on his recently completed synth guitar. The guitar was built mostly from scratch using an Arduino, some harvested drum pads, and some ribbon potentiometers. The video below shows that not only does it sound good, but [Gr4yhound] obviously knows how to play it.

The physical portion of the build consists of two main components. The body of the guitar is made from a chunk of pine that was routed out by [Gr4yhound’s] own home-made CNC. Three circles were routed out to make room for the harvested Yamaha drum pads, some wiring, and a joystick shield. The other main component is the guitar neck. This was actually a Squire Affinity Strat neck with the frets removed.

For the electronics, [Gr4yhound] has released a series of schematics on Imgur. Three SoftPot membrane potentiometers were added to the neck to simulate strings. This setup allows [Gr4yhound] to adjust the finger position after the note has already been started. This results in a sliding sound that you can’t easily emulate on a keyboard. The three drum pads act as touch sensors for each of the three strings. [Gr4yhound] is able to play each string simultaneously, forming harmonies.

The joystick shield allows [Gr4yhound] to add additional effects to the overall sound. In one of his demo videos you can see him using the joystick to add an effect. An Arduino Micro acts as the primary controller and transmits the musical notes as MIDI commands. [Gr4yhound] is using a commercial MIDI to USB converter in order to play the music on a computer. The converter also allows him to power the Arduino via USB, eliminating the need for batteries.

Continue reading “Arduino Synth Guitar Really Rocks”

Semi-Auto PCB Drill Press Makes Drilling Semi-Painless

DIY PCBs are the fastest and cheapest way to iteratively prototype circuits, and there’s a lot of great tricks to get the copper layer just the way you want it. But if you’re using through-hole parts, you eventually have to suffer the tedium of drilling a potentially large number of precisely aligned holes. Until now. [Acidbourbon] has built up a very nice semi-automatic PCB drill machine.

Semi-automatic? The CNC machine (with PC-side software) parses the drill file that most PCB design software spits out, and moves an X-Y table under your drill press to just the right spots. The user manually drills the hole and hits enter, and the table scoots off to the next drilling location. All of this is tied together with a simple calibration procedure that figures out where you’ve got the board using two reference drill locations; you initially jog the platform to two reference drill holes, and you’re set.

The CNC conversion of a relatively cheap X-Y table is nicely documented, and the on-board touchscreen and USB interface seem to make driving the machine around painless. Or at least a lot less painful than aligning up and drilling all the holes the old-fashioned way. Everything is open-source, so head on over and check it out.  (And while you’re there, don’t miss [Acidbourbon]’s tips and tricks for making PCBs using the toner transfer method.)

Seeing this machine in action, we can’t wait for the fully automatic version.

Continue reading “Semi-Auto PCB Drill Press Makes Drilling Semi-Painless”

Self-Charging Jacket Eliminates Forgetfulness

Certain parts of the Northern Hemisphere are very, very cold right now. For those of us living in these colder climates, [Aaron] has a simple yet effective hack for keeping your hands warm when you go out for a walk in the brisk cold. He’s wired his jacket up for USB charging so he can make sure his hand warmers are always working.

[Aaron] bought a set of handwarmers that conveniently charge over USB, but he always forgot to actually plug them in once he got home, ensuring that they were always dead. To make his forgetfulness a non-issue, he built the USB charger for the handwarmers into his jacket, but he didn’t just run a wire out of the pocket. The USB charging circuit runs through the coat hanger, using some conductive cloth and steel thread in the inside of the jacket’s shoulders. From there, the cloth makes contact with the metal arms of the hanger and runs out of the hanger to the wall outlet.

This is a great cold-weather hack that might help any forgetful people on the north side of the planet keep warm. You could even use this method to charge batteries used in other wearable electronics. This project is a great reminder that sometimes the best hacks are the simple ones that no one’s thought of yet!