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
Personal Blogs
  • Community Hub
  • More
Personal Blogs
Legacy Personal Blogs One Last Thing
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: sasquatch84
  • Date Created: 31 Aug 2017 9:33 PM Date Created
  • Views 484 views
  • Likes 0 likes
  • Comments 2 comments
Related
Recommended

One Last Thing

sasquatch84
sasquatch84
31 Aug 2017

Ok so the unit is working great.  There's just one small thing.  When I was testing different sketches out, I noticed that when the code said "HIGH" it would make the relay pin "LOW" and vice versa.  I tried a few different sketches and uploaded and re-uploaded and it just kept on doing this.  To add More confusion, I tried the classic "Blink" sketch and connected the relay to pin13, but when I did, the LED would light up at the appropriate time, but then when it went low, the output would go high and therefore activate the relay.  Like, totally out of phase with the LED.  So instead of breaking my brain over a problem that might just be explained by this Nano's country of origin (China) I just went back to the original pin I was using and the original sketch and just swapped LOW and HIGH.  Seems to be working great.  I'm still confused, though.

  • Sign in to reply

Top Comments

  • jw0752
    jw0752 over 8 years ago +2
    Hi Clinton, When you have more time draw us another schematic and we will take a look at it. Sometimes, depending how things are hooked up a High output will produce a low in the next step of the circuit…
  • mcb1
    mcb1 over 8 years ago +1
    I noted in your previous posts, that you were using a 4 channel opto coupled relay board. The sainsmart and many others tie one end of the optocoupler to Vxx and therefore the input needs to be grounded…
  • mcb1
    mcb1 over 8 years ago

    I noted in your previous posts, that you were using a 4 channel opto coupled relay board.

     

    The sainsmart and many others tie one end of the optocoupler to Vxx and therefore the input needs to be grounded to energise the relay.

    image

     

    This allows the units to be connected to open collector devices, and work.

     

    If you unit is the same, it would explain why the relay turns ON when the output pin is LOW.

     

     

    Mark

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • jw0752
    jw0752 over 8 years ago

    Hi Clinton,

    When you have more time draw us another schematic and we will take a look at it. Sometimes, depending how things are hooked up a High output will produce a low in the next step of the circuit. This is called an inverted output. We should be able to get to the bottom and explain what is happening but we will need some more information.

    John

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • 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