element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Arduino Forum Scheduling relays to open/close
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 2 replies
  • Subscribers 388 subscribers
  • Views 974 views
  • Users 0 members are here
Related

Scheduling relays to open/close

obzrve
obzrve over 4 years ago

Hey Everyone ,

For my project I have 4 channel relay would like channel 1 to turn on  at 5 pm and off at 6 pm on Monday. For a length of a hour.

Channel 2 to turn on  at 5 pm  and off 6 pm on Tuesday.

Channel 3 to turn on  at 5 pm  and off 6 pm on Wednesday.

Channel 4 to turn on  at 5 pm  and off 6 pm on Thursday.

 

1.) No two relays will be on at the same time.
2.) The start time and stop times are the same.
3.) Only the day of the week and relay number changes.
4.) If there is a power outage, the program must sense the correct day and time so it will resume power to the correct relay and not wait for the next cycle.

Can someone point me in the right direction, share a link or video that would help me on this project?

 

Item list

UNO WIFI REV2

Adafruit PCF8523 Real Time Clock Assembled Breakout Board

ELEGOO 8 Channel DC 5V Relay Module

4 Port USB Hub

  • Sign in to reply
  • Cancel

Top Replies

  • beacon_dave
    beacon_dave over 4 years ago +4
    Adafruit have a tutorial guide on the PCF8523 RTC which would be worth taking a look at: https://learn.adafruit.com/adafruit-pcf8523-real-time-clock That shows you how to set the time, and then how to…
  • phoenixcomm
    phoenixcomm over 4 years ago +2
    obzrve this is straight forward.. As beacon_dave suggested use the RTC kit from Adafruit. A little snooping with Google I found the diagram. **** CAUTION *** even though the Relays are rated at 16amp at…
  • beacon_dave
    beacon_dave over 4 years ago

    Adafruit have a tutorial guide on the PCF8523 RTC which would be worth taking a look at:

    https://learn.adafruit.com/adafruit-pcf8523-real-time-clock

     

    That shows you how to set the time, and then how to read the time from then on using the RTClib library, so half-way there.

     

    now.dayOfTheWeek() will return you the weekday number

       and

    now.hour() will return you the hour

     

    By using them, you can determine which relays need to be toggled as per your schedule.

    • Cancel
    • Vote Up +4 Vote Down
    • Sign in to reply
    • Cancel
  • phoenixcomm
    phoenixcomm over 4 years ago

    obzrve  this is straight forward.. As beacon_dave suggested use the RTC kit from Adafruit. A little snooping with Google I found the diagram.image

    **** CAUTION *** even though the Relays are rated at 16amp at 250 volts. they are other ways to skin the cat. I use this same setup to run lamps in

    flight simulator normally 24 v @ < 1 amp.

    BTW most of the I will use a Relay Board with an I2C interface.

    ~~ Cris.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube