Redirecting ...

Please wait.

You are being redirected to the destination address ...

  • Login
  • Register
Login
Username/Email:
Password: Lost Password?
 
rusty ox
  • Home
  • Search
  • Help
    • Login
    • Register
    Login
    Username/Email:
    Password: Lost Password?
     
Swavesey › Swavesey › Rusty Ox v
1 2 3 4 5 Next »
› raspberry pi EP-0099 4 channel relay module schematic

24% OFF, Early Islamic Culinary Art: Based on Prophetic Traditions £13.44@Amazon UK

5
raspberry_pi_4_channels_relay.jpg
raspberry pi EP-0099 4 channel relay module schematic
RustyOx Offline
Super Moderator
Posts: 337
Threads: 263
Joined: Apr 2021
Reputation: 0
Points: 5,523.17
#1
30-06-2022, 04:46 PM (This post was last modified: 28-07-2022, 10:17 AM by RustyOx.)
I bought this for my home automation project, it is planned to be used to control siren and flashlight for my security system.

Board was bought from Amazon.

I noticed that the NC, NO is labelled wrong. The NC pin on board is actually normal open (NO).

It doesn't fit well on my Raspberry Pi 4 case, after cut some bits and drill a few holes ( for heat dissipation purpose), I have managed to put it in the Raspberry Pi case.


.pdf   raspberry pi EP-0099 relay module schematic.pdf (Size: 860.23 KB / Downloads: 0)

   
Find
Reply

AD:16% OFF, Release Me 2 (Amazon Exclusive Lavender Sleeve & Vinyl) £30.80@Amazon UK

RustyOx Offline
Super Moderator
Posts: 337
Threads: 263
Joined: Apr 2021
Reputation: 0
Points: 5,523.17
#2
30-06-2022, 04:47 PM (This post was last modified: 30-06-2022, 06:36 PM by RustyOx.)
use command below to enable I2C interface (in menu "2 Interface Options" -> "P5 I2C").

    sudo raspi-config

Below command could be used to check I2C address
    sudo i2cdetect -a -y 1


Example code in Python



Code:
import time
import smbus
import sys

DEVICE_BUS = 1
DEVICE_ADDR = 0x10
bus = smbus.SMBus(DEVICE_BUS)

while True:
    try:
        for i in range(1,5):
            print("\nturning on  %d" % i)
            bus.write_byte_data(DEVICE_ADDR, i, 0xFF)
            time.sleep(2)
            print("turning off %d" % i)
            bus.write_byte_data(DEVICE_ADDR, i, 0x0)
            time.sleep(3)
    except KeyboardInterrupt as e:
        print("Quit")
        sys.exit()



.png   python test code for raspberry pi EP-0099 4 channel relay module.PNG (Size: 13.21 KB / Downloads: 18)






Output:




Code:
pi@raspberrypi:~ $ python3 test_relay.py

turning on  1
turning off 1

turning on  2
turning off 2

turning on  3
turning off 3

turning on  4
turning off 4
Find
Reply
RustyOx Offline
Super Moderator
Posts: 337
Threads: 263
Joined: Apr 2021
Reputation: 0
Points: 5,523.17
#3
30-06-2022, 04:48 PM
  • test commands:
  • Turn on channel No.2 relay
i2cset -y 1 0x10 0x02 0xFF
  • Turn off channel No.2 relay
i2cset -y 1 0x10 0x02 0x00
  • Turn on channel No.3 relay
i2cset -y 1 0x10 0x03 0xFF
  • Turn off channel No.3 relay
i2cset -y 1 0x10 0x03 0x00
  • Turn on channel No.4 relay
i2cset -y 1 0x10 0x04 0xFF
  • Turn off channel No.4 relay
i2cset -y 1 0x10 0x04 0x00
Find
Reply
RustyOx Offline
Super Moderator
Posts: 337
Threads: 263
Joined: Apr 2021
Reputation: 0
Points: 5,523.17
#4
30-06-2022, 04:49 PM
i2c address table for raspberry pi EP-0099 4 channel relay module

   
Find
Reply

AD:44% OFF, Logitech C310 HD Webcam £24.99@Currys & PC World

« Next Oldest | Next Newest »


Possibly Related Threads…
Thread
Author,Replies/Views,Last Post
 Raspberry Pi 4 8GB Power Consumption Measurements
RustyOx, 0/ 827, 13-11-2021, 12:03 AM
 Mercedes W211 Gearbox Lever Module Issue (Gear Stuck on 2) Analyse and Fix
RustyOx, 8/ 3,208, 21-08-2021, 12:29 PM
 How to Fix Chattering (Buzzing, Clicking) Relay Noise for Glow Worm Ultimate Boiler,
RustyOx, 0/ 649, 06-06-2021, 09:14 PM
 Rusty Ox Youtube Channel
RustyOx, 0/ 615, 24-04-2021, 01:56 PM

  • View a Printable Version

14% OFF, Casio Wave Ceptor Men's Watch LCW-M100DSE £146.88@Amazon EU

Share Page
  • Contact Us
  • Return to Top
  • Portal
  • About Us
Top
Linear Mode
Threaded Mode