The QUUB system has the following features.
- The core processor board is a 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 shut down to conserve power.
- Each dockable can be individually reset.
- Each stackable and each dockable has an (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, 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.
- Three front-panel accessible pushbuttons that are used for reset and a user input.
- 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 or general display.
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.
Stackables
Stackables are simply daugther boards that interface with the QUUB stackplane.
They are specified to be 125x125mm in size with up to four dockables, but any design and size is allowed as long as the stackplane interface is adhered to.
Dockables
Dockables are small PCBs (32x42mm) that solder directly onto a stackable. With today's technology that size is plenty for most IO needs however 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.
A QUUB stack can have up to 66 dockables, all individually addressable, this makes for a very versatile system with just about any combination of IO achievable.
"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
A base is not normally required, however one reason to have a base board is to accommodate large components, for example a board that has four power 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.
Yet another reason 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 (both stackables and dockables), 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.
- A stackable that hosts four dockables will probably only use four of the sub addresses, one for each dock. But all 16 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 connected to one of the I2C busses.
Fault
There is a FAULT signal on the system that instantly shuts down the 3V3 power to 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 remain 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 selected 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.
The signals provided on the debug connector are...
- 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 — The main PCB has allowance for a .91" OLED display to be connected in a location 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) and serial port #0 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), GPIO pins (fast and non intrusive but limited information) and SPI (even faster) should cover all debugging needs.
OLED display
As mentioned in the debugging section above a 4-way header is provided that matches the pinout of a commonly available .91" I2C OLED display. This allows the easy connection of such a display for debugging or general display use
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 IO
There are several built-in user IO options, these are provided for just a few features like pushbuttons and control.
- User pushbutton — Two tactile pushbuttons are provided on the front edge of the PCB, provision is made to connect remote switches in parallel with these buttons.
- User LEDs — There are two LEDs mounted next to the 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 up to 2A at 40V.
- Isolated input — This input can handle up to 12V, it can be configured to use a remote voltage-free 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 pushbuttons a RESET input tactile pushbutton is provided on the front edge of the PCB. Provision is made to add a remote switch or contact in parallel with this button.
Watchdog timer
A hardware watchdog timer is incorporated in the design. This timer needs to be toggled by the running program approximately every second or it will reset the CPU.
When developing code 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 most applications with just 1-2 stackables the stackplane header will be enough to mechanically secure the circuit boards together. However in applications with a lot of stackables and/or lots 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 finished and ready for fabrication, however changes can still be made (and I'm sure will be for a few revisions).
As you can see there are six 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 five such dockables ready to be installed, these being...
- A dual dockable with an RTC, backup battery, and an SD memory card socket.
- A power supply module.
- A serial module with two RS485 drivers and a dual RJ45 socket.
- A digital IO module.
- A dual PiicoDEV-format I2C interface module.
This is one example of a system that may, for example, be a data logger with a serial RS485 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 large relays and a small amount of control logic.
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 store-and-forward model that is slow by today's network standards but but fast enough for a monitoring and control system and it 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 is essentially the same as the existing PiicoDEV/STEMMA-QT/QWIIC I2C systems with the addition of buffered line drivers.
QUUBlink however has two additional signals, an ALERT signal, al la the more industrial I2C bus called SMBus, and a 12V power supply in addition to the standard 3V3 power supply. Both power supplies can be turned off under program control.