Hackaday Prize Entry: Smart USB Hub And IoT Power Meter

[Aleksejs Mirnijs] needed a tool to accurately measure the power consumption of his Raspberry Pi and Arduino projects, which is an important parameter for dimensioning adequate power supplies and battery packs. Since most SBC projects require a USB hub anyway, he designed a smart, WiFi-enabled 4-port USB hub that is also a power meter – his entry for this year’s Hackaday Prize.

[Aleksejs’s] design is based on the FE1.1s 4-port USB 2.0 hub controller, with two additional ports for charging. Each port features an LT6106 current sensor and a power MOSFET to individually switch devices on and off as required. An Atmega32L monitors the bus voltage and current draw, switches the ports and talks to an ESP8266 module for WiFi connectivity. The supercharged hub also features a display, which lets you read the measured current and power consumption at a glance.

Unlike most cheap hubs out there, [Aleksejs’s] hub has a properly designed power path. If an external power supply is present, an onboard buck converter actively regulates the bus voltage while a power path controller safely disconnects the host’s power line. Although the first prototype is are already up and running, this project is still under heavy development. We’re curious to see the announced updates, which include a 2.2″ touchscreen and a 3D-printable enclosure.

YAPZH! (Yet Another Pi Zero Hub)

You’d think just about all the permutations of adding a hub to the Raspberry Pi Zero were done. But you’d be wrong. [Daniel’s] approach is to put the Zero inside the existing case for the hub. The LogiLink hub used is in a nice metal case with mounting flanges on the side. It looks robust and not much like a typical consumer hub. This hack would serve well where the Zero and hub might take a few wacks.

Wiring between Zero and Hub
Wiring between Zero and Hub

It took some fiddling with the hub components but he made it work. The easy part was wiring the the power and USB test points on the Zero to the hub.

More challenging were the mechanical aspects to physically fit the Zero into the case. Four LEDs were removed since their only purpose was indicating if a cables were plugged into the hub. There are four electrolytic capacitors standing upright that occupied the space needed by the Pi. [Daniel] repositioned them to lie horizontally to provide room for the Zero.

With the Zero able to fit inside the case the next steps are to create mounting holes in the USB board and cut holes in the case to access the HDMI and USB ports and the SD card holder. Some finicky work with a Dremel provided the holes and the cutouts. Fortunately, the mounting holes on the Zero aligned with some open spaces on the USB board. If they don’t, some glue and standoffs might be sufficient.

The only aspect [Daniel] left for you to hack is access to the GPIO port. That would require another cutout to bring out a ribbon cable for controlling your world. After such a nicely detailed writeup with a plethora of pictures, he had to leave something for other hackers to do.

Overengineering A USB Hub

hub

Like many of us, I’m sure, [Nick] doesn’t like digging around behind his computer case for a spare USB port and ended up buying a small USB hub for his desk. The hub worked perfectly, but then [Nick] realized an Ethernet port would be a nice addition. And a DC power supply. Then feature creep set in.

What [Nick] ended up building is a monstrosity of a desk hub with two 24V,  5V, 3.3V 50 Watt DC outputs on banana plugs, a five-port USB hub, four-port Ethernet switch, three mains sockets, 32 digital I/Os, UART, SPI, and I2C ports, a 24×4 LCD or displaying DC current usage and serial input, cooling fans, and a buzzer just or kicks.

The case is constructed out of 6mm laser cut acrylic, and the electronics are admittedly a bit messy. That said, this box does seem very useful and even plays the theme from Mario Brothers, as seen in  the video below.

Continue reading “Overengineering A USB Hub”

Software-Controlled Per-Port Power Switching For USB Hubs

[Befi] wanted to add a second stage backup disk to his ODROID embedded-board server, which typically draws ~1.5W at idle. After adding the disk, he saw power consumption increase by 2W when the new disk wasn’t spinning. He thought about using one of those USB hubs with the adorable little rocker switches for each port and replacing them with transistors, but that was going to be messy. After some poking around in the USB standard, he found that most support per-port power switching (PPPS), and set about to hack a USB hub to enable software-controlled per-port switching.

[Befi]’s NEC hub uses a uPD720112 chip which supports PPPS according to the datasheet. After tying the configuration pin labeled GANG_B to +3.3V, the hub declared itself PPPS-compatible. Of course, the manufacturer saved a penny or two by omitting the  individual switches, so [Befi] added an open-drain NMOS to each port. He is using this program to switch the port on and off and made the switching transparent with autofs. [Befi]’s current script has the bus ID and device ID of the hub hard-coded, but he intends to update it to find them automatically. This hack saves him 10W on average, which is about €30 ($40) per year.

If your hub is under powered, you could try adding an external power supply.

Pimp My Keyboard: Automatic Lift Kit And More

Cherry-keyboard-with-lifts

Wondering what the heck a lift kit is? You know those low-riding cars that bounce? That’s the idea with this hack. [Justblair] added automatic height adjustment to his Cherry G80, and hid a few other extras while he was at it. Since there’s a fair amount of room inside the case of this model he was able to hide everything and keep just a single cord to run it all.

Certainly what catches your eye is the keyboard’s ability to rise to a typing height automatically. This is accomplished with a few servo motors and some 3D printed replacement feet. There were some hiccups along the way with under-powered servos, but bulking up to some HXT 900 9G models provide more power than is currently necessary. The automatic feature is thanks to a capacitive sensor built with a wire that loops the perimeter of the keyboard.

Of course to monitor the sensor and drive the servos you need some kind of brain. For that [Justblair] went with an ATmega32U4 breakout board. Since he had to patch into USB for power anyway he added a USB hub and routed one of the ports out the left side of the keyboard as a convenient way to connect other peripherals. There was even room to include an RFID reader which he uses to unlock his sessions (similar to the desk install from earlier this year). There’s still a lot of potential left in that hardware. To make future improvements easier the hack includes an IDC socket as an auxiliary port.

[Justblair] did a great job of sharing his work. His post links to a Github repo for the code and a Thingiverse project for the 3D printed legs. And it wouldn’t be complete without the demo video which is found below.

Continue reading “Pimp My Keyboard: Automatic Lift Kit And More”

I/O Extender Board And Case For A Cheap WiFi Router

This 3d printed case houses the already small [TP-Link TL-WR703N] but also makes room for a custom expansion board. The expansion board is designed to make the device more hacker friendly, and who doesn’t need a nice case to hold it?

Since the router board already has a USB port (intended for use with USB 3G modems) the add-on acts as a USB hub. The stock USB connector is replaced by a pin header which mates with a DIL socket on the underside of the expansion board. Through the use of an FTDI chip the expander offers three USB ports and a 2×10 pin header to break out the GPIO pins from the router’s processor. Only two USB ports are visible in the image above. That’s because the third is recessed, and an opening has not been added to the enclosure. This struck us as odd until we read that the port is meant to be used with a low-profile thumb drive, essentially adding internal storage for the device.

[Thanks buZz]