Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorporate limit switches into relay/motor code #20

Open
danland6 opened this issue Apr 26, 2018 · 7 comments
Open

Incorporate limit switches into relay/motor code #20

danland6 opened this issue Apr 26, 2018 · 7 comments

Comments

@danland6
Copy link

just wondering how hard it would be for you to modifiy the main ino code so that

essentially when you send the Open payload

  • D2 keeps relay 1 HIGH, until NO limit switch on D5 goes LOW

and when sending closed Paylod

  • D1 keeps relay 2 high, untill NO limit switch on D6 goes LOW (with option to maybe over run by a set amount of time,

Essentially i've built a gate that i am trying to automate for my chicken coup, using an old power window regulator/motor for lift, and a gravity latch that after all the tension is removed from the lift cable locks into a slot on one of the side rails, (which is why it would be good to have a slight overrun on close)

I have it all wired up on the bench with 2 relays (for motor reversal), and the 2 limit switches and have the buttons on my home assistant set up for testing, relay up, relay down, and status via one of the limits works fine as expected (i have used your code for my roller door, and front electric gate, and 2 side doors of my shed working great)

So far from all of my searching and lack of ardunio sketch skills i have not been able to figure out how to make these features work myself yet.

let me know if its something that you'd be keen to do, and if any of my information was not clear enough.

Thanks
Dan

@marthoc
Copy link
Owner

marthoc commented Apr 28, 2018

Hmm. I think this could be done fairly easily but it’s not really within the scope of the GarHAge project since I can’t see an application for this in the garage door opener space. Still, I’m interested in helping you to get it to work (I just don’t think that I would incorporate it into the code base of the project even if we get it working).

Tomorrow I was planning to release a new version of the project that has a bunch of new features and moves the codebase forward. Once that’s done, I can turn my thoughts to your project.

So let me get this straight:

  1. When the OPEN command is received, rather than momentarily activating the relay, activate the "open" relay until D5 goes low.
  2. When the CLOSE command is received, rather than momentarily activating the relay, activate the "close" relay until D6 goes low (potentially plus an offset).

@danland6
Copy link
Author

danland6 commented Apr 28, 2018 via email

@danland6
Copy link
Author

turns out its as easy as drag and drop, picture quality not amazing due to smashed lens on my phone camera but shows what i'm working with.

20180428_125238 medium
20180428_125246 medium
20180428_125304 medium
20180428_125316 medium
20180428_125323 medium

@marthoc
Copy link
Owner

marthoc commented Apr 30, 2018

Quick question before I go too far: what microcontroller are you using? NodeMCU? Need to know how many GPIO I’m dealing with.

@danland6
Copy link
Author

danland6 commented Apr 30, 2018 via email

@danland6
Copy link
Author

Hey, i know its not high on your list but just checking in to see if you had any luck at all?
Cheers
Dan

@PaulHam211
Copy link

This would be great, just what I am looking for too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants