We use cookies on this site to enhance your user experience

By clicking the Accept button, you agree to us doing so. More info on our cookie policy

AMRPI4HAT01 Carrier Board

AMRPI4HAT01: Raspberry Pi 4 carrier board of the AMASC01 camera

AMRPI4HAT01 Carrier Board

AMRPI4HAT01 is the board that sits on top of the Raspberry Pi 4 inside the AMASC01 camera. It takes power from the network cable (PoE), switches the dome heater and the fans, measures the conditions inside the camera and keeps the time when the camera has no internet connection. A small second board, AMHATLED01, carries the status LEDs, the outside air sensor and the fan.

This page describes revision AMRPI4HAT01D.

What the board does

Function What it means for you
PoE power one network cable powers the whole camera, no separate power supply is needed
Dome heater and fans the thermal control software switches the heater, the body fan and the CPU fan, see thermal control
BODY sensor temperature, humidity and pressure inside the camera body
Real-time clock the camera keeps the correct time after a power cut, even without network
Status LEDs POWER, NETWORK and STORAGE on the AMHATLED01 board
ENVI sensor temperature and humidity of the air entering the camera
Extra sensor connector a place for an additional I²C sensor

Board revision in software

The software has to know the board revision, otherwise the heater and the body fan may be swapped. The revision is printed on the board (AMRPI4HAT01D) and is set in /amasc01.env:

BOARD_VARIANT=AMRPI4HAT01D

After changing it restart the service:

sudo systemctl restart thermal-control

thermal-control-cli status shows the variant in use on its first line. The installer creates /amasc01.env on the first installation and never overwrites it. See also thermal control – configuration.

Thermal outputs

The heater and the fans are plugged into three 2-pin headers. Pin 1 (marked +) is +12 V.

Header Connect Controlled by the software
J5 dome heater power 0–100 %, keeps the dome at the target temperature
J6 CPU fan on/off by CPU temperature
J7 body fan speed 0–100 % by the temperature inside the camera

The fan on AMHATLED01 always runs together with the body fan. All outputs stay off while the camera boots, until the thermal control service starts.

To check that everything is connected correctly, run the hardware test:

thermal-control-cli test

AMHATLED01 LED and sensor board

AMHATLED01 is a small half-round board around the fan opening of the camera, connected to AMRPI4HAT01 with a flat cable. It carries the parts that have to be visible from outside or exposed to the airflow.

Status LEDs

LED Colour Meaning
POWER red the camera is powered
NETWORK orange blinks on network traffic
STORAGE green blinks when the camera reads or writes the SD card

The LEDs are set up by the installer and need no configuration. To check the NETWORK LED by hand:

echo none | sudo tee /sys/class/leds/netact/trigger
echo 1 | sudo tee /sys/class/leds/netact/brightness    # on
echo 0 | sudo tee /sys/class/leds/netact/brightness    # off
sudo systemctl restart netact-led                      # back to network activity

The STORAGE LED is /sys/class/leds/sdact.

Dimming

AMHATLED01 can switch off or dim all LEDs, e.g. so that they do not shine at night. This is not implemented yet, so the LEDs always run at full brightness.

ENVI sensor

The ENVI sensor (Sensirion SHT41) sits on a thin tongue reaching into the fan opening and measures the temperature and humidity of the air drawn into the camera. The thermal control shows it as ENVI together with the dew point; it is used for monitoring only and does not control the heater or the fans.

Note: The ENVI sensor does not replace a weather station. It measures the temperature and humidity of the air at the camera’s air intake, and the reading is influenced by the camera casing (sunlight, heat from the camera body).

Fan

The 12 V fan is mounted on AMHATLED01. It runs together with the body fan, its speed follows the temperature inside the camera.

Real-time clock

The board has a clock with a backup coin cell (12 mm, e.g. CR1220). It keeps the time when the camera is switched off or has no network, so images get correct timestamps right after start-up. The clock is set up by the installer.

sudo hwclock -r   # show the time stored in the clock
sudo hwclock -w   # store the current system time in the clock

Connectors

Connector Use
J1 Raspberry Pi GPIO header (the board sits on it)
J2 PoE from the Raspberry Pi network connector
J3 additional I²C sensor
J4 +12 V from the PoE supply
J5, J6, J7 heater and fans, see Thermal outputs
J8 flat cable to AMHATLED01

J3 – additional I²C sensor

JST GH 4-pin connector.

Pin Signal
1 +5 V
2 SCL
3 SDA
4 GND

The sensor is powered from 5 V, but its I²C lines must work with 3.3 V logic.

J4 – 12 V

2×4 pin header with the +12 V from the PoE supply.

Pins Signal
1, 2 GND
3, 4, 5, 6 +12 V
7, 8 GND

J8 – flat cable to AMHATLED01

8-pin 0.5 mm FFC connector, the same pinout on both boards.

Pin Signal
1 +3.3 V
2 STORAGE LED
3 NETWORK LED
4 I²C SDA
5 I²C SCL
6 GND
7 LED dimming (not connected on AMRPI4HAT01D)
8 12 V for the fan

Technical reference

Raspberry Pi GPIO usage

GPIO Header pin Function
GPIO2 / GPIO3 3 / 5 I²C bus 1 (SDA / SCL)
GPIO6 31 CPU fan (sysfs GPIO 518, CPU_FAN_GPIO)
GPIO12 32 PWM0 – body fan
GPIO13 33 PWM1 – heater
GPIO22 15 STORAGE LED
GPIO27 13 NETWORK LED

I²C devices

Bus Address Device
1 0x44 SHT41 – ENVI sensor (AMHATLED01)
1 0x51 PCF8563 real-time clock
1 0x76 BME280 – BODY sensor
10 0x44 SHT40 – DOME sensor (camera I²C, not on this board)

Electrical notes

  • Heater and fans are switched on the low side by N-MOSFETs; pull-downs keep them off until the software takes over. PWM runs at 50 Hz.
  • The 12 V fan supply for AMHATLED01 is switched on the high side and follows J7.
  • I²C bus 1 has 3.9 kΩ pull-ups to 3.3 V.