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
« Previous 1 2 3 4 5 … 7 Next »
› raspberry pi EP-0099 4 channel relay module schematic

25% OFF, Martindale CP501 Classic Check Plug 240V Socket Tester (New Design) £11.96@Amazon Marketplace

9
raspberry_pi_4_channels_relay.jpg
raspberry pi EP-0099 4 channel relay module schematic
RustyOx Offline
Super Moderator
Posts: 380
Threads: 285
Joined: Apr 2021
Reputation: 0
Points: 6,307.12
#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:49% OFF, Ghost Stories for Christmas (Expanded 6-Disc Collection Box Set) [DVD] £17.64@Amazon Marketplace

RustyOx Offline
Super Moderator
Posts: 380
Threads: 285
Joined: Apr 2021
Reputation: 0
Points: 6,307.12
#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: 20)






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: 380
Threads: 285
Joined: Apr 2021
Reputation: 0
Points: 6,307.12
#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: 380
Threads: 285
Joined: Apr 2021
Reputation: 0
Points: 6,307.12
#4
30-06-2022, 04:49 PM
i2c address table for raspberry pi EP-0099 4 channel relay module

   
Find
Reply

AD:20% OFF, The Fine Art of Paper Flowers: A Guide to Making Beautiful and Lifelike Botanicals £14.63@Amazon Marketplace

« Next Oldest | Next Newest »


Possibly Related Threads…
Thread
Author,Replies/Views,Last Post
 Smart Doorbell with IKEA ZigBee Button and Raspberry Pi
RustyOx, 6/ 1,700, 01-05-2023, 07:52 AM
 Zigbee 4 ch relay module
RustyOx, 0/ 220, 12-04-2023, 01:07 PM
 Design the Simplest DC UPS with super capacitor for home router and raspberry pi
RustyOx, 0/ 297, 28-03-2023, 06:21 PM
 Raspberry Pi 4 8GB Power Consumption Measurements
RustyOx, 0/ 1,502, 13-11-2021, 12:03 AM
 Mercedes W211 Gearbox Lever Module Issue (Gear Stuck on 2) Analyse and Fix
RustyOx, 8/ 7,764, 21-08-2021, 12:29 PM

  • View a Printable Version

19% OFF, Nigellissima: Instant Italian Inspiration: Instand Italian Inspiration £14.95@Amazon Marketplace

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