Skip to the content
PCBKitNew board
2 layers66 × 57 mmFlood hat, the printed circuit board in 3D

Cognicity flood sensor example code

Size
66 × 57 mm
Copper layers
2
Thickness
1.6 mm
Parts
57
Nets
64
Pads
208
Tracks, vias
470, 47
Pours
3
Routed
Yes
KiCad
KiCad 4
Created
3 Mar 2016
Updated
10 May 2017

Overview

Flood hat is an open-source printed circuit board by smart-facility, from the smart-facility/cognicity-floodsensor repository on GitHub, published under the GPL-3.0 licence. It is a 2-layer board of 66 × 57 mm with 57 parts on 64 nets, routed with 470 tracks and 47 vias.

It is built around the STM32L031F4P3, HT7333 and CAT24C32LI-, with the DMMT5401 and AO3401 among its other parts. Its parts include 14 connectors, 13 resistors, 11 capacitors, 5 ICs and 5 transistors. It belongs with the sensors and measurement boards and the STM32 boards of this library.

Main components

5

README

pcb/README.md

PCB

This printed circuit board design implements low-power measurement gathering for the cognicity flood sensor. It conforms to the Raspberry Pi HAT specification.

The design was created in KiCad 4.0.2. Gerbers can be found in the plot/ subdirectory.

Pi HAT

Configuration

The HAT can be configured in one of two ways

  • direct, Pi-only operation: the Pi is wired to the sensors and there is no power control
  • microcontroller-directed: the microcontroller makes and caches sensor observations, and is responsible for controlling power to the Pi and sensors

Three of three-pad solder-bridge footprints are used to determine whether the sensors are connected to the Pi or the STM32. Each must have a single solder-blob connecting its centre-pad to one side, as labelled.

In Direct mode, three additional wire links are installed, to bypass power-switching components that are not loaded.

In Microcontroller mode, the power-control and microcontroller circuitry is loaded, and the wire-links are not installed.

A 24C32 I2C EEPROM is installed, which contains configuration data used by the Pi to identify the HAT and its functionality. Programming the EEPROM requires that the PROG link adjacent to the EEPROM be shorted, in order to to pull up the write-enable pin. Otherwise, the EEPROM is read-only.

Microcontroller

The PCB hosts an STM32F030F4 or STM32L031F4 microcontroller. The L031 supports a 32768Hz crystal for real-time clock (RTC) functionality but the F030 does not - the crystal and its capacitors not be loaded if the F030 is used.

The microcontroller is programmed and debugged using an ST-Link v2 via the single wire debug (SWD) port at the top-left of the board. The BOOT0 pin is pulled low unless the BOOT0 link is shorted, which allows the micro to be programmed via a serial port. A reset button is provided.

The microcontroller controls power to the sensors and Pi (power-status is indicated by LEDs), is directly connected to the sensors, and has a serial connection to the Pi.

Pins PA4-PA7 are not currently used and are broken out to a header, intended for use with an 8-pin IDC ribbon cable. They can be used as GPIO, to monitor voltages (ADC), or to implement an SPI interface.

Power Management

The power-management block contains:

  • a 5V input (screw terminals)
  • a PPTC resettable fuse on the input
  • a low-voltage-drop reverse-polarity/reverse-current protection circuit
  • 3.3V regulator to supply the microcontroller
  • 3.3V regulator (input switched) to supply the DHT22
  • two P-channel FETs to control power to the Pi and the sensors

The Pi receives 5V power from this board. The board must be provided with a clean, regulated 5V supply, through the screw-terminal connector. The Pi should not be connected to any other power source.

The power-switching is under the control of the micro.

If the board is assembled as a Direct configuration (no micro), then most of the power control circuitry is not loaded and is bypassed by wire links. The sensors receive power from the 5V line and through the Pi's onboard 3.3V regulator.

Sensors

The board supports:

  • a DHT22 temperature/humidity sensor or other one-wire device such as DS18B20, and
  • an ultrasonic ranging module, or any similar 5V-powered device with 1 input and 1 output pin

Resistive networks are supplied for pullup (one-wire) and voltage conversion (from the 5V ranging sensor).

License

This hardware design is (C) 2016 William Brodie-Tyrrell and is licensed under the CERN OHL; see cern_ohl_v_1_2.pdf

Parts

57
QtyValueFootprintReferences
5100nCapacitors_SMD:C_0805C1, C5, C9, C10, C11
510kResistors_SMD:R_0805R4, R6, R8, R11, R13
5CONN_01X02Pin_Headers:Pin_Header_Straight_1x02P8, P9, P11, P12, P13
410uCapacitors_SMD:C_0805C2, C3, C4, C6
41kResistors_SMD:R_0805R1, R9, R12, R15
4FIDUCIALsmd:FID0.5FID1, FID2, FID3, FID4
3AO3401TO_SOT_Packages_SMD:SOT-23Q1, Q2, Q4
3CONN_01X03smd:SMD_solder_bridge_3pinP1, P6, P7
222pCapacitors_SMD:C_0805C7, C8
22N7002TO_SOT_Packages_SMD:SOT-23Q3, Q5
23k9Resistors_SMD:R_0805R2, R3
2CONN_01X04Pin_Headers:Pin_Header_Angled_1x04P3, P4
2HT7333TO_SOT_Packages_SMD:SOT89-3_HousingU3, U5
2LEDLEDs:LED_0805D1, D2
11k8Resistors_SMD:R_0805R10
132768Crystals:Crystal_Round_Horizontal_3mmX1
147kResistors_SMD:R_0805R5
1CAT24C32SMD_Packages:SOIC-8-NU1
1CONN_01X02Terminal_Blocks:TerminalBlock_Pheonix_MKDS1.5-2polP2
1CONN_01X04Pin_Headers:Pin_Header_Straight_1x04P5
1CONN_02X04Pin_Headers:Pin_Header_Straight_2x04P10
1DMMT5401TO_SOT_Packages_SMD:TSOT-6-MK06AU2
1PI2GPIOraspi:PI2HATJ1
1PPTC2AResistors_SMD:R_1812F1
1STM32L031F4Housings_SSOP:TSSOP-20_4.4x6.5mm_Pitch0.65mmU4
1SW_PUSHButtons_Switches_SMD:SW_SPST_SKQGSW1

Questions

How big is the Flood hat PCB?

It measures 66 × 57 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Flood hat use?

57 parts, built around the STM32L031F4P3, HT7333, CAT24C32LI- and DMMT5401. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Flood hat KiCad files?

From the smart-facility/cognicity-floodsensor repository on GitHub, at the commit this page was made from: the board is pcb/flood-hat.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the Flood hat design in my own project?

Its repository publishes it under the GPL-3.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).

Similar boards

  • 4 layers200 × 100 mmHeteromycin, the printed circuit board in 3D

    Heteromycin

    hasenbanck/heteromycin

    A 3D printer board using a powerfull STM32 MCU, TMC5160/TMC2160 driver and a Raspberry Pi or compatible SBC

    373 parts40
  • 2 layers65 × 56 mmPi hat, the printed circuit board in 3D

    Pi hat

    MaZderMind/jukebox

    Software and Hardware of my RaspberryPi-Jukebox-Project

    98 parts4
  • 2 layers65 × 56 mmRaspberrypi hat, the printed circuit board in 3D

    Raspberrypi hat

    fablabcb/fablock

    fablock is an RFID lock to our fablab

    31 parts2
  • 2 layers182.5 × 65 mmV1Panel, the printed circuit board in 3D

    V1Panel

    pilotniq/MJoulnir

    Hardware and software for the control system of a full size electric boat.

    171 parts2
  • 2 layers65 × 56 mmACYONP SMD LCSC, the printed circuit board in 3D

    ACYONP SMD LCSC

    SkullKill/ACYONP-PCB

    PCB for Access Control Yubikey OTP NFC Pi (ACYONP). For Raspberry Pi. This is a Door Access Control using Electronic Door Strike, with Yubikey OTP via NFC / KeyPad / WebInterface for Authentication.

    93 parts1GPL-3.0
  • 2 layers65 × 30.5 mmAPMHat-4-powered, the printed circuit board in 3D

    APMHat-4-powered

    stephendade/AP-HAT

    Useful Raspberry Pi HATs for ArduPilot

    61 parts1GPL-3.0