GRAYnomad Nature Photography :: The QUUB


NOTE: This is an initial landing page for an upcoming QUUB web site. Both this page and the QUUB itself are a work in progress.

QUUB is an open-source, micro controller system based on a core processor, addressable daughter boards which in turn can have addressable daughter boards, and remote IO modules. It is a general-purpose embedded microprocessor system, the form factor is based on a main MCU board and multiple stacked IO boards called "stackables" and smaller solder-on boards called "dockables".

This concept of up to 15 addressable stacked boards and 64 addressable smaller boards makes for a very versatile system that can be configured for just about any imaginable application.

The target audience for the QUUB is more the serious hobbbyist and low-end BMAC (Building Monitoring and Control) applications, it's way overkill for a beginner's flashing-LED project, although that can can be done as well.

The QUUB system has the following features.

  • The core processor board is an Raspberry Pi Pico module, this is a dual core 32-bit Cortex M0+ processor running at 133MHz.
  • Medium size form factor, nominally 100 x 125mm (4 x 5 inches).
  • A unique method of attaching a front panel and other IO panels.
  • Up to 15 addressable daughter boards (stackables) can be stacked above or below the core processor.
  • Up to 16 addressable devices on each stackable.
  • Up to 4 addressable docking boards (dockables) on each Stackable.
    • Each dockable has access to UART, I2C, SPI, ADC, DIO, PWM, and various control signals.
    • Allowance for dual dockables for functions than need more real estate.
    • Each dockable can be shut down to conserve power.
  • Each stackable and each dockable has a ID EEPROM that defines its IO capabilities for the MCU.
  • Up to 256 vectored interrupts from these stackable modules.
  • Four docks on the MCU board for IO expansion, up to another 60 docks on a fully-loaded system with 15 stackables.
  • 36+3+3-way "stackplane" using stackable headers.
  • The stackplane has provision for all power signals, I2C, SPI, 2x UART, 2x analogue in, 8 digital IO, four user-defined signals, and addressing of daughter boards.
  • All 15 daughter boards can be addressed and can therefore share the same system IO lines.
  • Two front-panel accessible pushbuttons that are used for reset and a user input.
  • One switched power signal that can be used by the MCU to shut down peripherals such as a GPS or wireless transmitter.
  • MCU control of the 3V3 power supply to the system.
  • Watchdog hardware and provision for system fault detection.
  • Six mounting holes suitable for an M3 bolt or similar-sized screw.
  • One-digit 7-segment LED display for a heartbeat or error code display.
  • Provision for a .91" OLED display for debuging.

If you need a system with over 20 analogue inputs, or maybe 30 serial ports, or more than 200 digital IO connections, no problems, QUUB can do that and more.

Stackplane (backplane for the QUUB stack)
The stackplane consists of three headers of 36, 3 and 3 connections. With the vast array of I2C and SPI peripheral IO chips now available it makes sense for larger and more complex applications to have a backplane with just a few signals that communicate with slave devices using one of these popular serial interfaces.

There are four user-defined signals on the stackplane, these signals pass up the entire stack and can be used by any stackable for whatever purposes. One example would be a power supply stackable sitting at the bottom of the stack that needs an ON/OFF switch and a power indicator LED at the top of the stack. Another might be to allow high-current devices to get power from a power-supply stackable via the stackplane.

12 of the stackplane signals are for addressing and controling of stackables. If these features are not required a subset of the 36-way header can be used.

Reduced stackplane
The standard stackplane has 36 signals on the rear header, however not all applications will require the full stackplane functionality, so the most important signals are grouped at each end of the header making it easy to implement a reduced subset of the stackplane by simply using two smaller headers.

Front and rear panels
Provision is made to solder PCBs at right angles to the main PCB on the front and rear.The rear panel has access to all the stackplane signals, except some of the power signals.

The front panel is essentially a 5th dock, albeit with a reduced interface. It has the SPI, I2C, select and control signals, and all power. It can be used to implement a user interface either soldered directly to the MCU board or remotely via a 16-way ribbon cable.

"Remoting" a dockable
Using a simple adapter board dockables can be connected to the MCU board via a 26-way ribbon cable rather than being soldered directly to the board. The dockable therefore can be mechanically placed remotely from the main board, for example as a user interface on the face of an enclosure or as IO on the side of an enclosure.

To make this even more useful small PCBs can be soldered directly to — and perpendicular to — the dockable, such PCBs can be used to mechanically fix the dockable at right angles to the enclosure side to facilitate user IO, such as an SD card socket or a serial interface.

A base is not normally required as the MCU board has no components on the solder side of the board. However the MCU may not be the lowest stackable and the one that is may have through-hole components. In this case a base board may be required to isolate the electronics from whatever the stack is mounted to.

Another reason to have a base board is to accommodate large components, for example a board that has four relays and a 100A shunt, these may not fit on the standard stackable PCB size but can easily be accommodated on a much larger board. In this case the stack essentially plugs onto this base board.

And yet another might be to accommodate a DIN rail connector for more industrial applications.

One difference between the QUUB and other systems is that you can address the plugged-in modules (stackables), this means that you can for example have up to 15 identical modules and there are no pin-clashing issues. Or you can use modules from different sources and not have to worry about them using the same pins.

If there are four address signals why only 15 modules? Despite there being four addess signals address #0 is reserved for a virtual stackable on the MCU board.

Sub addressing
There are four sub address signals, therefore each stackplane address can host up to 16 sub functions. Typically one of these sub addresses is reserved to read the onboard configuration EEPROM, but the other 15 are free to use as appropriate for the board's application.

A stackable that hosts four dockables will probably only use four of the sub addresses, one for each dock. But all 15 undefined sub addresses are open to be used as appropriate to the design.

The MCU can also sense if there are no, one, or multiple stackables at each address. Therefore if two or more stackables are plugged in with the same address the MCU will not try to access that address and will throw an error.

"Vectored" interrupts
The QUUB stackplane allows all stackable and dockable modules to interrupt the host processor so when an event happens you can deal with it very quickly. The interrupt to the MCU is a genuine interrupt, however if there are more than one possible interrupt source on a system the MCU implements a protocol that reads both the stackable's address and any sub address from the stackplane and uses that data to index via a jump table to a handler routine.

This protocol is very fast and allows for up to 256 interrupt vectors on a stack.

Stackplane digital IO signals D0-3 can be dedicated for debugging.

This is a system I've used for years that allows the running code to "talk" to a logic analyser or scope with very little intrusion into the real-time running of the program. These signals can also be used to bit bang data to a small multi-digit LED display, thus providing a more versatile (and much faster with lower overhead) debugging tool than the on-board LED display.

The main PCB has allowance for a .91" OLED display to be connected in a manner that protrudes from the stack and as such is still readable even when other boards are plugged on top of the MCU.

The MCU's debugging signals (SWDCLK and SWDIO) are brought out to test points for easy connection to an ICE debugger.

A breakout board will be designed to allow access to the SWD and other signals. Also the breakout board will provide for a Pi debug probe or even another Pico for full in-circuit debugging while providing easy connection of test equipment to a header with labeled signals.

The combination of 7-seg LED (fast but limited), OLED (slow but detailed), debug probe (intrusive but very detailed) and GPIO pins (fast and non intrusive but limited information) should cover all debugging needs.

OLED display
A 4-way header is provided that matches the pinout of a common .91" I2C OLED display. This allows the easy connection of such a display for debugging with the display poking out from the side, clear of any stacked daughter boards.

LED display
There is a single-digit LED display mounted on the PCB. This can be used for error display, general debugging, or to run a marching ants pattern or other heartbeat indicator. This display has two decimal points, one of them is used as a heartbeat indicator, the other is under program control.

USER input
A tactile pushbutton is provided on the front edge of the PCB such that its actuator can protrude through any front panel and therefore be used with or without any front panel.

RESET input
Similar to the USER input a RESET input tactile pushbutton is provided on the front edge of the PCB such that its actuator can be used with or without a front panel. However the RESET actuator does not protrude through the front panel, is it flush with the panel to reduce the chance of accidental actuation.

Watchdog timer
An external hardware watchdog timer is incorporated in the design. This timer needs to be toggled every 1.6 seconds or it will reset the CPU. The timer also handles a reset pushbutton in such a way that on booting the CPU can tell if the pushbutton or the watchdog caused the reset.

Location of MCU in the stack
The MCU board can be located at any level of the stack, this eases access for some debugging but also allows the placing of, for example, a power supply board at the bottom of the stack. Another reason to have the MCU in a location other that the bottom is when a large IO expansion base board (say with relays, shunts, and/or other large components) is being used.

For most applications the three stackplane headers will be enough to mechanically secure the circuit boards together. However in applications with a lot of movement and/or vibration this will not be enough so the following provision has been made.

  • There are six mounting holes located on the PCB. These can be used for 16mm male/female standoffs that will mechanically hold the stack together. Typically the lowest board on the stack will use four of these holes to mount to the wall or enclosure. All other stackables will use the remaining two holes for standoffs and with the addition of the headers this should be robust enough for most applications.

PCB layout
The following 3D render shows the current component layout on the PCB. The design is slowly solidifying but no tracks have been laid yet so changes can still be easily made.

As you can see there are four cutouts onto which small PCBs can be soldered. These cutouts are called "docks" and the boards that solder on to them are called "dockables".

This image shows the MCU board with four such dockables installed, these being...

  • An RTC and backup battery.
  • A power supply module.
  • A serial module with two RS485 drivers and a dual RJ45 socket.
  • An SD memory card socket.

This is one example of a system that may, for example, be a data logger with a serial network connection to other QUUBs, but any combination of modules is allowed and of course another 60 modules of various types can be added using 15 more stackable boards each with four dockables. Or stackables can be designed that don't use the dockable system, for example a power relay stackable that uses the entire PCB real estate for the relays and a small amount of control logic.

Dockables are small PCBs (32x42mm) and while with today's technology that's plenty for most applications there will be times when a larger version is required. So the dual dockable has been specified. At 32x94mm this module is just a tad over twice the size of a standard dockable. And of course you can design a full-sized stackable with no docks at all so the entire 100x125mm is available for custom circuitry (minus the stack-interface hardware). Or for that matter a board with just one or two docks and the rest used for custom hardware.

Here we see an example of a dual dockable in place on dock #0 and #1.

This makes for a very versatile system with just about any combination of IO achievable.

QUUBnet will be a RS485-based network that allows up to 16 QUUB stacks to communicate. It will be a simple peer-to-peer publish/subscribe model that has none of the timing issues often found with multi-drop networks. Any node can transmit at any time, if you have something to say just blurt it out on a serial port, if anybody is interested they'll action the data.

QUUBlink is essentially the same as the existing PiicoDEV/STEMMA-QT/QWIIC I2C systems with the addition of buffered line drivers and an ALERT signal, al la the more industrial I2C bus called SMBus.

Design files
These will all be be made available soon, meanwhile here is the current draft schematic.


However I use an old version of Altium Designer so it's unlikely that my files will be directly usable by anyone else interested in developing for this system. That said I have been experimenting with Kicad and it does a good job of importing my PCB design files and really that's all that should be needed to get the physical design, once you have that just use your existing Kicad experience to design your own circuit.

The other main package used in the hobbyist world is Eagle, at this point I have no idea if that can import Altium files or not.

The QUUB needs you
Do you know how to write embedded code, set up tool chains, or design hardware? Or maybe just have ideas to improve the project.

Get in touch if you're interested in contributing to this project or just chatting about it. I can't pay anything but can send you a few PCBs when they are ready and am happy to collaborate on any design ideas.