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 6 Next »
› raspberry pi EP-0099 4 channel relay module schematic

36% OFF, Petite Dark Brown Leather-Look Blazer New Look £22.00@New Look

9
raspberry_pi_4_channels_relay.jpg
raspberry pi EP-0099 4 channel relay module schematic
RustyOx Offline
Super Moderator
Posts: 359
Threads: 279
Joined: Apr 2021
Reputation: 0
Points: 5,982.84
#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:12% OFF, Samsung 43 AU7100 (2021) 4K Ultra HD HDR Smart TV £325.00@Hughes

RustyOx Offline
Super Moderator
Posts: 359
Threads: 279
Joined: Apr 2021
Reputation: 0
Points: 5,982.84
#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: 359
Threads: 279
Joined: Apr 2021
Reputation: 0
Points: 5,982.84
#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: 359
Threads: 279
Joined: Apr 2021
Reputation: 0
Points: 5,982.84
#4
30-06-2022, 04:49 PM
i2c address table for raspberry pi EP-0099 4 channel relay module

   
Find
Reply

AD:10% OFF, DYMO LetraTag LT-100T Plus Label Maker, S0758380 £34.08@Amazon UK

« Next Oldest | Next Newest »


Possibly Related Threads…
Thread
Author,Replies/Views,Last Post
 Design the Simplest DC UPS with super capacitor for home router and raspberry pi
RustyOx, 0/ 21, 28-03-2023, 06:21 PM
 Smart Doorbell with IKEA ZigBee Button and Raspberry Pi
RustyOx, 4/ 732, 13-10-2022, 10:58 AM
 Raspberry Pi 4 8GB Power Consumption Measurements
RustyOx, 0/ 1,219, 13-11-2021, 12:03 AM
 Mercedes W211 Gearbox Lever Module Issue (Gear Stuck on 2) Analyse and Fix
RustyOx, 8/ 5,521, 21-08-2021, 12:29 PM
 How to Fix Chattering (Buzzing, Clicking) Relay Noise for Glow Worm Ultimate Boiler,
RustyOx, 0/ 985, 06-06-2021, 09:14 PM

  • View a Printable Version

24% OFF, StarTech.com Mini DisplayPort to DVI Video Adapter Converter - White £8.20@BT Shop

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