Monarco HAT Hardware Reference Manual Monarco HAT – Lightweight I/O for the Raspberry Pi minicomputer https://www.monarco.io Revision 20190728-1 © REX Controls s.r.o.
Monarco HAT Hardware Reference Manual 20190728-1 Contents Revision History ................................................................................................................................... 3 Other Resources .................................................................................................................................. 3 1. Introduction ................................................................................................................................. 4 2.
Monarco HAT Hardware Reference Manual 20190728-1 Revision History 2016/06/19 o Initial PRELIMINARY revision. 2016/06/23 o Ch. 3.2: Fixed P2 connector pinout table. 2016/08/12 o Ch. 2.2.: Added board layout drawings. o Ch. 3.1.: ID EEPROM contents description. Notes for Raspberry Pi 3. o Ch. 3.2.: Extended description of digital inputs and outputs technology functions. 2016/10/04 o Overall minor revisions. 2018/04/03 o Added “Other Resources” section. Added Ch. 2.3 “Software Integration”.
Monarco HAT Hardware Reference Manual 20190728-1 1. Introduction Monarco HAT is an add-on board which provides input-output interfaces following industrial automation standards for the Raspberry Pi (B+ and newer) minicomputer. It is designed according to the HAT (Hardware Attached on Top) – https://github.com/raspberrypi/hats – specification.
Monarco HAT Hardware Reference Manual 20190728-1 2. Monarco HAT Overview Note: Features denoted by “*” are currently being under development. Additional documentation and resources can be found on: http://monarco.io 2.1. System Design Monarco HAT is based around ARM Cortex-M3 microcontroller (MCU) which provides a wide set of embedded peripherals missing on the Raspberry Pi itself.
Monarco HAT Hardware Reference Manual 20190728-1 2.2. Board Layout Following image shows board layout with connectors on the top side highlighted – P1 (Raspberry Pi header), P2 (input and output signals), P3 (MCU debugger), P4 (display 5 V power output). Image 2.2: Monarco HAT board layout – Top side. On the bottom side, location of battery holder BAT1 and LED0 to LED8 indicators are highlighted. Image 2.3: Monarco HAT board layout – Bottom side.
Monarco HAT Hardware Reference Manual 20190728-1 2.3. Software Integration The latest Monarco HAT MCU firmware, software tools and instructions for upgrading are available from the GitHub repository: https://github.com/monarco/monarco-hat-firmware-bin Monarco HAT software integration is officially supported on the Raspberry Pi1 (B+ and newer) and the UpBoard2 (original version mechanically compatible with Raspberry Pi B+) with Raspbian/Debian GNU/Linux operating system.
Monarco HAT Hardware Reference Manual 20190728-1 3. Hardware Description and I/O Connection Examples 3.1. Connecting Raspberry Pi (P1) 3.1.1. Interface Specification Connector type: 2×20 pin 2.54 mm pitch socket on bottom side, long pins are available on the top board side for connection of additional devices to IOs not used by Monarco HAT P1 – Raspberry Pi 40pin Header (pins not listed below are not used by Monarco HAT) Pin no.
Monarco HAT Hardware Reference Manual 20190728-1 3.1.2. ID EEPROM Monarco HAT contains EEPROM with device-tree-overlay which is automatically loaded by Raspberry Pi bootloader. This overlay enables SPI interface and I2C with real time clock (MCP79410) and 1-Wire controller (DS2482-100) device nodes. Note for Raspberry Pi 3: In default configuration, UART0 (ttyAMA0, PL011 UART) is used for embedded Bluetooth interface on Raspberry Pi 3.
Monarco HAT Hardware Reference Manual 20190728-1 3.2. Connecting Input and Output Signals (P2), LED Indicators 3.2.1.
Monarco HAT Hardware Reference Manual 20190728-1 3.2.2. LED Indicators There are 9 LED indicators on board bottom side under the P2 terminal connector. These are divided into three groups with predefined functions: LED0 (orange) – Monarco HAT firmware status: o Fast blink (5 Hz, 1:1): firmware running, outputs in safe state (no valid process data received during configured timeout interval). o Slow blink (0.5 Hz, 1:1): firmware running, outputs under control by process data.
Monarco HAT Hardware Reference Manual 20190728-1 3.2.3. Digital Inputs (DIN) Description and Electrical Design Monarco HAT has 4 digital inputs isolated by a high speed optocouplers. Digital inputs have a common ground (minus pole) so they are sink-type inputs. Voltage levels are designed to be compatible with both 24 V industrial sensors and 5 V standard logic, with tolerance to negative voltage up to 30 volts. Logic low voltage: −30 V to 1.8 V Logic high voltage: 3.5 V to 30 V Input current: 0.
Monarco HAT Hardware Reference Manual 20190728-1 Image 3.3: Digital inputs connection examples with various sensor types. For these functions, digital inputs are able to handle signals with frequency up to 500 kHz. Moreover, the counters values can be automatically stored to nonvolatile (flash) memory in case of power failure and then loaded back (under development).
Monarco HAT Hardware Reference Manual 20190728-1 COUNTER Technology Function There are two COUNTER hardware function modules available: COUNTER1 – Input channels: A = DIN1, B = DIN2, COUNTER2 – Input channels: A = DIN3, B = DIN4, C = DIN2 (shared with COUNTER1). Each COUNTER module contains 16bit hardware counter which can count up or down. Counter value wrap-around on overflow.
Monarco HAT Hardware Reference Manual 20190728-1 3.2.4. Digital Outputs (DOUT) Description and Electrical Design Monarco HAT has 4 digital non-isolated open-drain outputs. The open-drain topology was chosen for best flexibility in connecting various devices. Outputs are able to sink up to 1 A current, which is enough for direct connection of a robust contactor coil or a small DC motor. Maximal switching voltage is 40 V.
Monarco HAT Hardware Reference Manual 20190728-1 Technology Functions Overview Digital outputs can be also driven by advanced technology functions, which are not possible with Raspberry Pi integrated GPIOs: PWM (Pulse Width Modulator) with frequency widely adjustable in continuous range 1 Hz to 100 kHz, which can be also considered as a versatile square-wave generator which period and duty cycle is controlled by cyclic process data coming from Raspberry Pi, PULSE-DIR generator for motion control base
Monarco HAT Hardware Reference Manual 20190728-1 3.3. Connecting ARM Debugger (P3) There is a space for standard 9 (10) pin ARM Cortex debug connector with SWD (single wire debug) interface on board, marked as P3. Normally you do not need this, so it’s not populated. If you want to hack Monarco MCU firmware, proper header can be soldered in (20021511-00010T4LF type by FCI). Compatible with "J-LINK 9-PIN CORTEX-M ADAPTER" provided by Segger. P3 – ARM MCU Debug Interface 1 VCC 3.
Monarco HAT Hardware Reference Manual 20190728-1 4. Technical Specifications 4.1. Mechanical Board shape: Compatible with the HAT (Hardware Attached on Top) standard5 Board dimensions: 65 mm x 56 mm, 3 mm radius corners. Height: o Spacers between Raspberry Pi and Monarco HAT: 12 mm o Board thickness: 1.6 mm o Highest component on top (P2 connector): 11 mm Note: Can be used with the display cable attached to the Raspberry Pi. Aluminum case dimensions: 93 mm x 60 mm x 40 mm (see drawing in ch.
Monarco HAT Hardware Reference Manual 20190728-1 4.6. Real Time Clock (RTC) RTC chip type: MCP79410 with 32768 Hz crystal Interface: I2C, address 0x6f (RTC/SRAM) + 0x57 (EEPROM) Wiring: connected to Raspberry Pi I2C-1 and to MCU I2C Battery type: CR1225 or CR1216 4.7.
Monarco HAT Hardware Reference Manual 20190728-1 4.10. Digital Outputs Output type: Open drain, not isolated, internal 1.
Monarco HAT Hardware Reference Manual 20190728-1 4.13. LEDs 1 × orange, 8 × green LEDs software controlled from MCU standard functions: system status, digital inputs status, digital outputs status 4.14. ID EEPROM Type: 24LC32 Interface: I2C (connected to Raspberry Pi according to the HAT standard), address 0x50 Capacity: 4096 byte EEPROM is factory pre-programmed according to the HAT (Hardware Attached on Top) specification.
Monarco HAT Hardware Reference Manual 20190728-1 5.