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 up to 247 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 170 x 125mm (~6.7 x 4.9 inches).
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 (assuming the
standard form factor is adhered to, up to 16 if the stackable is larger).
Each dockable has access to UART, I2C, SPI, ADC, DIO, and various control signals.
Allowance for dual dockables for functions than need more real estate.
Each dockable can be individually reset or shutdown.
Each stackable and each dockable has a (optional) ID EEPROM that defines its
IO capabilities for the MCU.
Up to 256 vectored interrupts from these stackable modules.
Six docks on the MCU board for IO expansion, up to another 60 docks on a fully-loaded
system with 15 stackables.
A seventh "remote" dockable on the main PCB, typically for a user
interface panel.
40-way "stackplane" using stackable headers.
The stackplane has provision for all power signals, I2C, SPI, 2x UART, 2x analogue
in, 8 digital IO, and addressing of daughter boards.
All 15 daughter boards can be addressed and can therefore share the same system
IO lines.
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 a general-purpose display or debugging.
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
The stackplane (backplane for a QUUB stack) consists of a single 40-way header.
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 two 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.
12 of the stackplane signals are for addressing and controlling of stackables.
If these features are not required a subset of the 40-way header can be used.
"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.
Bases
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 form factor 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.
Addressing
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.
There are four address signals but only 15 stackables can be addressed. Why
is that Despite there being four address 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 five of the sub
addresses, one for each dock and one for the EEPROM. But all 15 undefined sub
addresses are open to be used as appropriate to the design.
EEPROM
An on-board EEPROM on the main PCB can be used to store non-volatile and other
configuration data.
Temperature sensor
There is an on-board temperature sensor.
Fault
There is a FAULT signal on the system that instantly shuts down the 3V3 power
to most of the stackplane and much of the circuitry on the main PCB. All dockables
can assert this signal as can any stackable.
Once asserted the MCU and certain core features are still powered and can
still operate.
Faults that can assert this signal are...
Over temperature
Too high a current drawn from the 3V3 power.
Any of the seven dockables on the main PCB.
Watchdog timeout.
Any stackable.
All these fault sources can be masked under program control.
Sensing
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.
Debugging
The QUUB board has many provisions to help with debugging code. There is a dedicated
18-pin header on the edge of the PCB that can be used to connect a debugging
device (yet to be designed) or just a 'scope or logic analyser.
A debugging board will be designed to allow access to the SWD and other signals.
Also this board will provide for a Pi debug probe or another Pico for full in-circuit
debugging while providing easy connection of test equipment to a header with
labeled signals.
These signals are provided on the debug connector.
D0-3
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.
RX0/TX0 and I2C1
These two serial comms methods can be used for any user IO to display data.
FAULT
The debugger has it's own fault signal that can be used to generate a fault
condition.
SPI
The system SPI signals are available on the debug connector, there is also a
dedicated select signal so any hardware connected via the debugger can coexist
with any system SPI devices.
RST
The system reset signal is available on the debugging connector.
OLED 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.
SWD and RX0/TX0
The MCU's debugging signals (SWDCLK and SWDIO) are brought out to test points
for easy connection to an ICE debugger such as another Pi Pico to be
used as an ICE or a Raspberry Pi debug probe.
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) and SPI (even faster) should cover all debugging needs.
LED display
There is a single-digit 7-segment 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 IO
There are several built-in user IO options, these are provided for just a few
features like pushbuttons and control.
User pushbuttons. Two tactile pushbuttons are provided on the front edge of
the PCB, provision is made to connect remote switches.
User LEDs. There are two LEDs mounted next to eh user pushbuttons, these are
under program control independently of the buttons. Provision is also made to
connect remote LEDs.
Isolated output. There is a solid-state relay under program control that can
switch 2A at 40V.
Isolated input. This input can handle up to 12V, it can be configured to use
a remote contact as an input or a remote voltage.
Buzzer. There is an on-board buzzer provided but also provision for a remote
device powered by 12V, for example a alert light or horn.
RESET input
Similar to the USER input a RESET input tactile pushbutton is provided on the
front edge of the PCB with optional provision to mount a remote switch.
Watchdog timer
A hardware watchdog timer is incorporated in the design. This timer needs to
be toggled every 1.6 seconds or it will reset the CPU.
When developing this can be a pain however so there is provision to physically
disconnect the WD reset signal.
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.
Mechanical
For many applications the stackplane header 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 stackplane header this should be robust enough
for most applications.
Dockables
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 130x125mm 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.
QUUBnet
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
QUUBlink shares the I2C signals with the PiicoDEV/STEMMA-QT/QWIIC connector
(see below), both share a buffered line driver.
However QUUBlink also has an ALERT signal (al la the more industrial I2C
bus called SMBus) and provision for a 12V power signal for remote modules that
need more power and/or voltage. Also both the 12V and the 3V3 power can be independently
shut down under program control.
QUUBlink uses standard 10-way IDC ribbon cable and headers. If the extra signals
(12V and ALERT) are not required it can be reduced to 8- or even 6-way.
PiicoDEV/STEMMA-QT/QWIIC
These industry standard connection schemes are supported with a single 4-way
JST header. The SDA0 and SCL0 signals are common to both connectors but the
3V3 is not able to be switched on this connector.
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.