Getting Around The Raspi’s USB Host Current Limit

For being such a revolutionary device, there are still a few problems with the Raspberry Pi. For one, the USB host ports are only able to source 140 mA per port, while the USB ports on your desktop, laptop, and even tablet are able to send a full 500 mA per port.

The official ‘fix’ for this problem is to use a powered USB port for any device that requires more than 140 mA,  something that didn’t sit well with [Manis]. He came up with an easy fix , though, that only requires a few bits of wire and a soldering iron.

The USB ports on the Raspi are current limited to 140 mA by a pair of polyfuses. [Manis] bridged these fuses, effectively taking them out of the circuit with a short length of wire. This allowed him to use a USB hard drive (powered by USB, of course) with the Raspi.

There’s one small problem with sending that much current through the Raspi’s USB port. Sometimes, when the high-power USB device is powered on, the voltage will sag, resetting the SoC and rebooting the system. [Manis] did his homework and discovered USB 2.0-spec ports should use a 120 μF, low-ESR capacitor to prevent this. The Raspi comes stock with a 47 μF cap used for this purpose. Replacing this cap (C32) might be a good idea if you’re planning on using high-power devices with your Raspi.

Teensy Board Used As An AM Radio Transmitter

[Angus McInnes] has been working on AM radio transmission techniques. He tried out a method of using a VGA port for the task but found the vertical blanking was audible. His latest experiments use a Teensy microcontroller board as an AM transmitter.

This is not a standalone solution, but rather a hardware extension for his laptop. This is because the microprocessor doesn’t have enough cycles to do much more than read bytes over USB and push their bits out one of the I/O pins.

To get a steady stream of data he’s using isochronous mode to push a steady data stream via the USB connection. Bulk transfer is another option but [Angus] found that it caused some jitter in the audio. Each byte is fed to the AVR SPI hardware once every eight clock cycles. His transmission can be picked up from across the room, but that’s the limit since the AVR doesn’t put out that strong of a signal. But it should be a rather trivial exercise to build a simple amplifier.

PIC-based USB Conversion For An NES Controller

[Andres] wrote in to share his USB for NES controller project (translated). It enumerates as a USB keyboard and is easily mapped on most emulators. Over the weekend we looked in on an AVR programmer used for this purpose. [Andres] went a different direction, using a PIC microcontroller and eventually incorporating his circuit into the body of the controller.

The prototype circuit can be seen above. [Andres] uses a breakout board for the PIC 18F4550 to test the circuit. The chip has native USB support, and reading the button states from the controller’s shift register is a snap. You can see him using this test rig to play Super Mario Bros. on an emulator in the video after the break.

The second iteration of the project moves from breadboard to a soldered circuit. A 18F2550 is used as it comes in a rather small DIP package. If the legs are flattened there’s room inside the controller case for it, along with a few capacitors and a crystal. The original controller cord is removed to make way for a USB cable.

Continue reading “PIC-based USB Conversion For An NES Controller”

Learning The Ins And Outs Of USB With A Simple Dev Board

We can’t count the number of projects we’ve seen on Hackaday with a USB port.  Unfortunately, most of these builds – from RepRap controllers to wireless data loggers – don’t use the full capabilities offered to them with USB. [Ben] came up with a very cool USB breakout board that allows you to explore the USB protocol with just a single inexpensive ATtiny.

Instead of relying on an FTDI chip or otherwise sending serial data down a USB pipe, [Ben]’s project is meant to be the hardware compliment to his book on programming USB devices. His hardware board is exceedingly simple, just an ATtiny 2313, a USB port, and a handful of other components, but allows [Ben] to receive data on eight pins on a breadboard and send them over USB to a computer.

[Ben] had sent in his USB figure eight controller, a board that displays the numbers 0 through 9 according to what data is received via USB, a while ago. It’s a truly useless build aside from learning how USB works, but an excellent tool if you’d like to program your own USB device.

USB Business Card Packs An ARM Processor

Over on the Hackaday forums, [Brian] introduced himself by showing off his new business card. Given his expertise is creating unique circuit boards, we can’t imagine a better way to show off his skills than an ARM-powered business card.

[Brian] posted a more detailed write-up on his blog that covers his development process. He decided to use a 48-pin LPC1343 ARM Cortex M3 as a USB Mass Storage Class device. All the heavy lifting for instantiating a USB storage device is handled by the microcontroller, so all [Brian] had to do was wire up a Flash memory chip and access it over an SPI interface.

The finished business card functions just like a USB thumb drive with a whopping 1 Megabyte of storage. That’s not a lot of storage, but it has more than enough room for [Brian]’s resume, a link to his website, and the full source code for his card.

PIC 18F4550 Dev Board

[Natsfr] was looking for a single-sided PCB to host a PIC 18F4550. Not finding one he designed his own in Kicad and is sharing (translated) the spoils of his labor.

This chip has USB capabilities which is why we see it used in a ton of projects. Almost all of them (including this USB input device post) use a very large DIP package. [Natsfr] went a different route, designing for the TQFP package to keep the drilling ot a minimum. The layout includes a crystal and USB-mini port, but it also breaks out the I/O pins on the chip. The red box above shows the quick fix he used on the VCC line as the board trace was shorting on the USB jack housing.

He didn’t drill out the holes for most of the breakout pins on this prototype. There’s just one header populated for programming the PIC chip. But he does have some plans for the first board. He’s going to use [Texan’s] AVR programming firmware for PIC to turn it into a USB AVR ISP programmer.

Automatic Speaker Control Via TV

[Jon] wanted his speakers to come on and off along with his TV. The speaker heats up if left on so he didn’t want to do that. But killing the power also resets the volume level (this is an old set of PC speakers and the remote is wired, not IR) so using one of those switched power strips was out as well. He thought a bit about trying to use the power LED on the TV to build his own circuit when it dawned on him. It’s possible to monitor the USB port on the TV and use it to switch on the speakers.

The circuit above uses a couple of opto-isolators to protect both the television and the speakers. The 5V line from the USB port on the back of the TV is monitored by an XNOR gate (which helps to filter out some of the toggling at power-on). When that gate latches it activates a 555 timer which in turn fires up the speakers. Presumable this happens when power is cut as well, but we’ll let you work through the circuit logic yourself.