Posts Tagged ‘USB’


Desktop disaster of the day


Here’s a shot of my desk from yesterday:

The red boards on the right are SparkFun FT232RL adapters.  Bottom right is a Teensy++.  The two long boards are my ATxmega256A3 adapter boards.  The red and blue square boards are SparkFun nrf24l01+ radio boards.  Hanging mid-air is my ATxmega32A4 + nrf24l01+ board, with its debug lines soldered to jumpers that hold it midair.  Below the protoboard is a nrf24l01+ board designed to mount to a Teensy, for USB bridging.  Just above the USB key on the left is an edge view of SparkFun’s nrf24LU1 board that’s intended to supercede the Teensy-based unit. The little round board at the bottom is a compass-based servo board for a borehole geophone.  To the left above the red Sharpie is the latest version of my ACAM GP2 development board, used for ~50ps resolution time-of-flight measurements.  Its predecessor is the square board just above the protoboard.  On the extreme left edge you can see the round 2-board stackup of the 3rd revision of my main project, and the little Bluetooth debug adapter just below that.  Misc cables, programmers, hubs, tools, etc. are scattered everywhere else.

And that’s just that part of my desk.  The next 3 or 4 feet left contains my soldering environment, with iron and toaster, hand tools, and piles of parts everywhere…..

Mental excercise: tiny acceleration logger


When watching shows like Mythbusters, Prototype This, and Smash Lab, you regularly see them using accelerometers in order to test the shock characteristics of a given event.  The problem is that these loggers are invariably big (roughly 6″ cube by volume) and fraught with problems such as “triggered, hurry up before we run out of log space!”.  Given the current crop of really tiny accelerometer chips (such as the Freescale MMA4755 mentioned on dorkbotpdx, for $2 quantity 1), microcontrollers, flash memory and batteries, it seems almost criminal that they aren’t using something radically smaller and smarter.

So just for fun, I decided to toss some parts together and see if they would actually fit on an incredibly tiny package.  The design is not complete, as it is missing any charging capability and more importantly a Bluetooth uplink module, but it’s a good start:

I call it “rev -1″ because of the missing features, but it’s a good start.  However, it’s a whopping 1.125″ x 0.5”, sized to match a tiny LiPoly cell from Sparkfun.  It’s got an ATmega48 core, MMA4755 accelerometer capable of up to +-8G, and an 8Mbit dataflash capable of roughly 15 minutes of continuous recording at the maximum 250Hz sampling rate.  A tact switch is used to turn it on etc, and an LED just under that for status.

The next steps would be to add the Bluetooth module (e.g. this one also from Sparkfun), some kind of charging circuit, and possibly a USB-A connector to make it into a “USB key” for both data extraction and recharging.  I’d drop the huge battery connector in favor of soldering it on, and put the Bluetooth (and maybe some other parts) on the opposite side of the board, but I still think it’d fit.  I’d want to find a solid power-management chip designed to handle USB input and LiPoly charging that’s also insanely tiny, but these days the manufacturers are so keyed in on making multifunction chips in stupidly-small packages that it’s probably going to be harder to find one big enough to do on the group-order design rules.

Total retail price on this module would likely be in the $75-100 apiece, but the combination of size and potential feature set should be hard to beat.


DMX-512 module in development


In response to a question on answers.hackaday (this one) about an open-source DMX-512 platform, I figured I’d post something about what I’ve got under development as part of a larger project.  The long-term goal is to develop a wall-mounted control panel (e.g. in the standard light-switch box) for lighting scenes.  A number of these would be installed at key places in our church sanctuary, allowing the DMX-controlled lights to be operated without having to trudge upstairs and find the light board.

The module in question would be the brains of such a beast, having a microcontroller and the necessary DMX interfacing.  An ATXmega would form the core, given that it’s the most versatile MCU I’ve used so far.  DMX interfacing uses a pair of MAX13430’s, which are dual-voltage transceivers allowing me to run the DMX ports at the proper 5V yet interface cleanly to the ATXmega running at 3.3V.  A soft-USB port is present for configuration, though that depends on either porting or rewriting the AVR-USB stack to run at 32MHz, or just running the whole module at say 20MHz (the max current speed for AVR-USB).

The module takes the physical form of a 40-pin 600mil DIP, for which sockets are easily available anywhere and everywhere.  All the pins not used by the DMX interfaces are brought out on pins for use by whatever you want to drop this thing into.  DMX and power connections are made via screw terminals, which could be routed to standard 5-pin DMX connectors on whatever chassis you have.

This module is still under development, as in I was modifying and cleaning up the PCB just a few minutes ago.  The DIP power pins are yet to be routed, and there’s more cleanup to be done.  However, I’m waiting to turn the actual boards until I get my baseline Xmega adapters populated and can start developing some of the software so I know I’m not smoking something.  I expect to turn these boards in 2-3mo, and shortly make them available for purchase.


Logic Helper under development


I’ve struggled with juggling all sorts of tools for development for years, ranging from serial adapters to chip programmers to logic analyzers.  So, I decided to do something about it, but I haven’t gotten far enough yet to use it.

FT4232 Logic HelperThis board is built around the FT4232 from FTDI, which has a total of 32 I/Os in 4 groups of 8.  Each group has a serial port, and the first two have MPSSE (Multi-Protocol Synchronous Serial Engine) blocks capable of doing SPI, I2C, JTAG, and others.  All 32 I/Os are routed through 4-bit voltage-level translators, and then grouped to a set of 8 RJ-45 jacks.  Of each of the 4 chip ports, the A jack has pins 1-4 and 7,8, while the B jack has pins 5-8 and 3,4.  The other two pins are GND and VCCIO for that bank.

Pre-made cables could be designed for common interfaces, such as AVR-ISP or JTAG, or include extra components if needed for protocols such as I2C (the FTDI chips require DI/DO be tied together externally, for instance).

I have a software framework underway that will interface with this board and allow you to stack all sorts of modules together to accomplish what you’re after.  An example would be an AVR ISP module that exposes a custom API.  Underneath it would need to talk to 4 pins (MISO,MOSI,SCK,RST), and would use a standard connection API to be attached to a module underneath that provides those resources.  If you hook it to dumb bitbang pins, the ISP code will hammer out the protocol the hard way.  However, if you hook it up to pins that are aware that they can be controlled by an SPI module of some kind, the ISP code would make use of the SPI interface and give you radically faster programming speeds.  This way you can shuffle your use of the RJ-45 ports to best match your requirements for particular ports and acceleration needs.

I plan on developing a very similar board based on an ATxmega128A1 that will have the same 8 connectors in roughly the same arrangement, but add another 4 connectors for A/D and D/A outputs, and possibly add an LPC memory bus on a different connector.  The memory bus would also have an FT2232 for interface to the host computer.  The remaining port may connect with another microcontroller (maybe via backpack?) that could do all sorts of interesting things with the VCCIO pins, e.g. making them inputs or outputs, suppling particular voltages, etc.  The sum of these enhancements would mean an extremely fast device capable of running things like AVR-ISP, AVR-PDI, JTAG, 1-wire, and other protocols with microcontroller assist.  A serialization format between modules would allow compatible modules to be shoved “down” into the hardware.

I also have a tiny version based on the FT232R, which can provide both RS-232 and 12-bit I/O (only 10 with RS-232 active).  Unlike the FT4232, there is no sync-serial engine, so everything would have to be done via bitbang…

FT232R Logic Helper

I have the two boards shown actually fab’d, but I haven’t put the parts on them yet.  The software is much more theoretical at this point ;-(


Isolated USB cable, hub


The next design I’m showing off is a tiny little board (1.4″ x 0.45″) that houses both an ADuM4160 USB 2.0 low/full-speed isolator, and an ADuM5000 100mW power isolator.  The two together form the core of a fully-isolated USB cable, which means you can safely connect your externally-powered device to your computer without any worries about where the relative ground potentials are.  This is critical for my main contract, because each board takes power from further and further down a main power bus, which means that even after the regulators do their thing, the ground potential on each subsequent node on the wire is different from the previous.

The ADuM4160 requires power on both sides of the transformer isolation barrier to run its encode/decode circuitry, which is why the ADuM5000 is required to provide power.  The upstream port of a USB device does not provide any power to the cable, so there’s no power for the device side of the isolator without the ADuM5000.  However, the 100mW limit means you really can’t run most bus-powered devices off the isolator.  OTOH, why would you be putting a ground isolator on a bus-powered device anyway…?

Isolated USB cableThe other design is a 7-port USB hub based on the same concept.  The upper-left port is the upstream, the remainder are downstream.  All 8 ports are fully isolated for both USB and power.  The 100mW limit of the upstream ADuM5000 should be sufficient to drive the 7 downstream ADuM4160/ADuM5000 pairs as well as the TUSB2077A hub chip, but not provide any power at all to even the lowest-power of devices…

Isolated USB hub

I haven’t had luck yet getting the cable isolator to work, due to a combination of problems not the least of which was the lack of proper silkscreen in the parts library footprint I stole.  It helps if the ADuM5000 isn’t backwards, eh?  I haven’t gotten back to trying to finish that because the memories of spending a week bashing my head bloody against the problem are still too painful.  I’ll get to it soon though, because I will need a quantity of them very shortly.  The hub is still sitting on my desk as a bare PCB, since I don’t really want to start sticking some $70 of parts on the board until I know the smaller version works…

Once they are confirmed working, I plan to offer them for sale somehow.  I know there’s interest, because only a few days after posting to the DorkbotPDX list about them, I got an email from someone entirely unrelated to dorkbotpdx about wanting to buy some. Go Google!