Header banner
Revain logoHome Page
Chris Cruz photo
1 Level
788 Review
37 Karma

Review on πŸ’‘ High-Quality Power Relay Module for Raspberry Pi 4 3 2 Model B B+ A+ by Chris Cruz

Revainrating 5 out of 5

Exactly what I needed

This board is manufactured by Waveshare. You can find a diagram and sample code on their website. The following information applies to the Raspberry Pi v2: Relay 1 - Pin 37 (marked P25 on the board) Piv2 GPIO25 Relay 2 - Pin 38 (marked P28 on the board) Piv2 GPIO28 Relay 3 - Pin 40 (marked on the board P28). P29 marked) Piv2 GPIO29* Labels on the board correspond to WiringPi code* All connections are low-active. 1=OFF 0=ON (LED also on) At boot the GPIO pins are configured via /etc/init.d/gpio_start which is called from /etc/rc.localgpio_start: #!/bin/sh -e # # Set all three GPIO pins to OFF Write /usr/bin/gpio 25 1 Write /usr/bin/gpio 28 1 Write /usr/bin/gpio 29 1 # Set all three GPIO pins to output mode /usr/bin/gpio mode 25 out /usr /bin/gpio mode 28 out /usr/bin/gpio mode 29 outMy Pi2 is now reading the battery voltage from the solar charge controller. If the weather has been cloudy for several days and the battery voltage has become too low, the relay switches on the charger. magic :)

Pros
  • Useful not just for its intended purpose
Cons
  • There are flaws