element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • 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 & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • 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
Cypress Kits
  • Products
  • Dev Tools
  • Cypress Kits
  • More
  • Cancel
Cypress Kits
Forum PSoC 4 Pioneer Kit Community Project#032 – More Relay Shield!
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Cypress Kits to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 2 replies
  • Subscribers 26 subscribers
  • Views 979 views
  • Users 0 members are here
  • 100projects
Related

PSoC 4 Pioneer Kit Community Project#032 – More Relay Shield!

cy.wbz
cy.wbz over 12 years ago

Hello!


In our earlier Home Automation example project we used the Relay Shield. We wanted to provide another basic example using that shield and the Pioneer kit.

In this example project we use both SW1 and SW2 switches to step through relay states.


  • CY8CKit-042
  • Relay Shield

 

image

 

Forum Post Attachments:

 

At the bottom of this post we are including the following items:

  • Example Project Zip File
  • Zip File of Images
    • Project Schematic
    • Component Configurations

 

Components Used:

 

The user can download the example project at the bottom of this post. The project uses the following list of Creator Components:

  • Control Register
  • Status Register
  • CyPins
  • CyClock

 

The components are configured by right clicking on the component in your Top Design schematic view and selecting Configure. Please enable the following selections in the Configuration windows for the listed components above.

 

Firmware Description:

 

The main.c firmware is included in the example project. Please review the commented sections for more details.

 

When the PSoC4 is reset (SW1 Reset button pushed and released), the relays are in their default state (coils not powered).

 

Each relay has a connection between its COM and NC pins. To indicate it is in this reset state, the LED (D9 RGB LED) on the Pioneer board is set to RED.

 

If the Pioneer Kit SW2 button is pushed (and held in the depressed position), the LED turns blue and all relays have their coils powered and all relays connect COM to NO pins.

If the button is released, the LED turns green and the relays cycle through a sequence:

  1. Relays off
  2. Relay1 on for one second
  3. Relay2 on for one second
  4. Relay3 on for one second
  5. Relay4 on for one second

 

At the end of the sequence the LED turns a green-blue color for one second (while all relays are off) and then back to green to start the sequence again

 

If the button (SW2) is pushed and held, it will go back to a blue LED color and all relays on (after the green sequence is done).

 

Hardware Connections:

 

Simply connect the Relay Shield to the Pioneer Kit. The Pioneer kit will be powered using the USB cable from the PC. The Relay Shield will be powered using a 9V DC power supply. Verify the outputs on the relays using a multi-meter.

 

Test Your Project:

 

Program your project and begin scrolling through the relay states using the Pioneer kit buttons.

 

I hope this example can help you in your design.

 

Best,

Matt

Attachments:
4505.Project Images.zip
Design01.cywrk.Archive02.zip
  • Sign in to reply
  • Cancel
  • DAB
    DAB over 12 years ago

    Hi Matt,

     

    Another good post.

    What is the max output drive current will the Psoc4 support?

     

    Keep those projects coming, I am learning with each new one.

     

    Thanks

    DAB

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • jesusantoniocar
    jesusantoniocar over 12 years ago in reply to DAB

    Hello DAB.

    i hope you are better.

    the max current per gpio is:

     

    Maximum current per GPIO –25 – 25 mA Absolute max

     

    best regards,

     

    Jesus Antonio.image

    • Cancel
    • Vote Up 0 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