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
IoT: In the Cloud
  • Challenges & Projects
  • Project14
  • IoT: In the Cloud
  • More
  • Cancel
IoT: In the Cloud
Blog Irrigation Sprinkler Control - Testing the Relay Interface
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join IoT: In the Cloud to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: ralphjy
  • Date Created: 29 Apr 2019 3:10 AM Date Created
  • Views 2155 views
  • Likes 15 likes
  • Comments 8 comments
  • sprinklers
  • gui
  • iot devices
  • iotcloudch
  • tkinter
  • rpiexpert
  • touch interface
  • project14
Related
Recommended

Irrigation Sprinkler Control - Testing the Relay Interface

ralphjy
ralphjy
29 Apr 2019

I've been distracted and just realized that the deadline for the IoT: In the Cloud project is fast approaching.

 

Time to get back to work to connect and test the relay module.

 

Here are pictures of the RPi 3B and 5 inch touchscreen display mounted in the enclosure.  The relay module is not mounted yet.  And I still need to drill out the wiring access at the bottom of the enclosure.

image

image

 

Here is the front bezel mounted on the display.  I have added a surface mount pin header on the back of the display PCB to break out the GPIO pins that I need for the relay control (the display passes through the first 26 GPIO pins - including the ones used for the display)

image

 

Here is the RPi on a baseplate that I 3D printed to mount in the enclosure.  Next to the RPi is a proto breakout board that I wired to interface the 6 pin cable to the relay controller.  I decided to use a breakout board since it will allow me to easily add an RTC module later.  The breakout board plugs onto the surface mount header on the back of the display.

image

 

I was having some problems with the touch screen so I enlarged all of the controls to make them easier to operate.  I should have used a capacitive touch screen but I couldn't find one that would fit in the enclosure that I selected.

 

Here is the new layout.

image

 

Here is a short video showing the relay module being controlled using the tkinter GUI interface.  I am operating the interface via VNC.  Apologies for the lack of clarity.  I need to improve my video setup.

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

I discovered that there is an anomoly with the operation of the tkinter button interface.  For the "Run once" mode, I wanted the radiobutton to turn green while the sprinklers were running and turn back to white when they were finished and also turn the Zone labels green to show which zone was running.  Unfortunately, it appears that button attributes like color do not change until AFTER the button command (callback) function has completed.  I am controlling the relays in the command function so the button colors won't change until after all the sprinklers have run.  I haven't found a way to work around that yet.

 

My next steps are to implement the cloud communication via MQTT to the Cayenne Dashboard.  That way I can monitor and control the interface from a browser or mobile app.

  • Sign in to reply

Top Comments

  • jw0752
    jw0752 over 6 years ago +2
    Hi Ralph, Looks like you are doing a really nice job. There are always things that don't do what you want. Even if you can't get exactly what you envisioned there will be a workaround that will get you…
  • jpnbino
    jpnbino over 6 years ago +2
    For this application it´s fine to use resistive touch and large buttons ( I´d prefer larger ones). Also it´s cheap and good for functional test. My next steps are to implement the cloud communication via…
  • ralphjy
    ralphjy over 6 years ago in reply to ntewinkel +2
    Hi Nico, I have been concerned about the temperature in the enclosure because I did not add any ventilation (I only have the cable access hole on the bottom). I have the enclosure in my garage (that's…
Parents
  • jpnbino
    jpnbino over 6 years ago

    For this application it´s fine to use resistive touch and large buttons ( I´d prefer larger ones). Also it´s cheap and good for functional test.

     

    My next steps are to implement the cloud communication via MQTT to the Cayenne Dashboard.  That way I can monitor and control the interface from a browser or mobile app.

    Looking forward

     

    Good Job

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • jpnbino
    jpnbino over 6 years ago

    For this application it´s fine to use resistive touch and large buttons ( I´d prefer larger ones). Also it´s cheap and good for functional test.

     

    My next steps are to implement the cloud communication via MQTT to the Cayenne Dashboard.  That way I can monitor and control the interface from a browser or mobile app.

    Looking forward

     

    Good Job

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