USB On-The-Go (OTG) is one of the fun aspects of the USB standard. There are feelings about the other aspects, but that one is alright. Regardless, [Francesco] realized one day that the £3 digital picture frames he purchased at a charity sale really didn’t care if the files on the thumb drive mysteriously changed all the time. It would just keep pulling and displaying the latest file at a blistering 0.2 frames per second. That’s right, the concept [Francesco] went after is to show changing data, even animations, with an update of one frame every five seconds!
His initial tests showed good for the concept — the Pi can easily emulate a mass storage device, feeding in data whenever the picture frame looks for it. In addition to the Pi Zero board he added an Ethernet shield, a voltage regulator, a camera, and even some infrared LEDS. We suppose there are dreams for the future.
He has been developing scripts for this rig by logging in through a VNC. A cron job runs his scripts at regular intervals, grabbing useful data and making it available as an image. For example, one script opens up the weather in Epiphany (a web browser), takes a screenshot, and saves that screenshot to the mass storage being emulated using USB OTG. The digital picture frame blissfully updates, unaware of its strange appendages. Now the real limiting factor is how much you can accomplish with your mad Bash skills.
The Raspberry Pi Zero – and the not-perpetually-out-of-stock Raspberry Pi A+ – only have one USB port, but behind that port is a lot of functionality. This is an OTG USB port, and just like the USB port on your smartphone, this little plug can become any kind of USB device. Transforming the Pi into a USB gadget allows it to be a serial connection, MIDI device, audio source or sink, or a USB mass storage device.
[Francesco] was especially interested in the USB mass storage capability of the Raspberry Pi Zero and built a small project to show off its capabilities. He turned a Pi Zero into the controller for a digital picture frame, constantly displaying all the image files on a small screen.
The build started with [Andrew Mulholland]’s guide for Pi Zero OTG modes, with just a few modifications. When the Pi is plugged into a PC, it automatically becomes a 100 Megabyte USB storage device. You don’t need that much space on a digital picture frame, anyway.
While setting up a digital picture frame is easy enough, there’s still a tremendous amount of untapped potential in using the Pi Zero as a USB gadget. With enough buttons, switches, and sensors, the Pi can become a wearable MIDI device, or with the Pi camera module, an IP webcam. Neat stuff, and we can’t wait to see what the community comes up with next.
Microchip just published their USB-MSD Programmer firmware. This open source project allows a board to enumerate as a USB Mass Storage device. Programming is as simple as copying a .hex file to the “drive”.
This code is what’s running on the $10 Xpress board that they released last month which includes a PIC18F25K50 to serve as a PICkit On Board (PKOB) programmer for the actual target micro; a PIC16F18855. In its stock version, the XPRESS-Loader firmware programs any PIC16F188xx chips that have a row size of 32 words. But it should be possible to tweak this package to program any chips that use the 8-bit LVP-ICSP protocol.
Now, this may seem like small potatoes at first look: it requires two microcontrollers on your board and is capable of programming just a small subset of the vast PIC inventory. But in our minds it’s the USB-MSD that is killer since it doesn’t require any software or drivers on the computer side of things. That’s a big invitation for all kinds of hacks. But there should be even more on the way from the Xpress team before too long.
It turns out the microcontroller [Voja Antonic] chose to use on the Hackaday | Belgrade badge is the 25k50. Since hearing about the Xpress board we’ve been talking to some of the PIC engineers and they are exploring a loader that will program onto the same chip. This means device upgrades without special hardware or drivers – perfect for badge hacking at a conference. This can be done with a precompiled hex, one created on MPLAB X, MPLAB Xpress, or others. We’ll keep you updated if we hear more on that part of the project.
This is a device which [Limpkin] has been developing at his day job. It’s a high-speed testing interface for use with Physics experiments. We find it interesting because it uses an ARM microcontroller to implement CDC and MSD over USB.
The design is in two parts to make it work in a rack-mount situation. That big white connector allows cards to be swapped out. You can see the board on the right has a USB-A connector. When plugged in this enumerates as a control device (CDC) and a mass storage device (MSD) using fat32 as a file system.
The platform is being developed with open hardware and open source software in mind. If you’re working on a project that uses either of these USB functionalities this makes a swell reference. The ARM Cortex-M3 chip that he’s using is an AT91SAM3U but it should not be too hard to port the code for other similarly-capable ARM processors.
[Andrzej Surowiec] liked the functionality of the mass storage bootloader available on some NXP LPC development boards. His latest project was to write a mass storage bootloader for the Stellaris Launchpad. It allows you to flash your compiled firmware to the chip simply by mounting the board as a USB storage device and copying over the binary file. The chip has plenty of flash memory (the bootloader itself takes up 16 KB of the available 256 KB), and the board is already set up for use as USB hardware.
There is a precompiled binary available at the linked page above or you can get the source code from his github repository. We think this project is a good stepping off point for others. For instance, it should be relatively easy to use [Andzej’s] work as the base for implementing filesystem-based I/O control like we saw in the phatIO project.
Just snap off the corners and this business card can be used as a mass storage device. Well sort of. The tab left over has four traces on the back to make it USB compatible. The PIC 24FJ64GB002 microcontroller on the card registers as a storage device and launches [Ramiro’s] resume and a cover letter loaded as an HTML file. He’s made it as useful as possible by including access to the SPI and I2C bus connections but he’s also included some firmware to act as a data logger or an oscilloscope. At about 5 euros a piece you won’t be distributing these willy-nilly but it’s not too much more than handing out breakout boards with your name all over them.