I will walk you through the installation and configuration steps in this article so you can use the same module with relays to connect it with Raspberry Pi or CM4 IO board.
Here is a video tutorial; continue reading for a list of written instructions. What You Need For This Tutorial Raspberry Pi 4 or CM4 IO board with Compute Module 4 Micro SD Card or eMMC or NVMe/SSD drive Power Supply aprropriate for a Raspberry Pi or CM4 IO board. Module with two relays Power supply for the module with relays 3 female to female jumper cables 2 female to male jumper cables 7 male to male jumper cables Exercises to complete: Connect wiring according to schema between module with relays and Raspberry Pi / CM4 IO board. Use a Python script to test the module with relays. Check does the module work as expected. Introduction I decided to connect the pump and fan using a module with two relays in order to control them simply because controlling the 5V pump is not possible because it is not a PWM device, and controlling solely the Noctua 5V fan with PWM didn鈥檛 make much sense to me. When the temperature rises above a predetermined threshold (for instance, 50 degrees Celsius), I wanted both devices to turn on, and I wanted them to turn off when the temperature falls below the predetermined threshold.
...