Actuate a 5V relay based on NFC Card Presence : how to prevent the PinOut to be rize-up during the boot sequence.
-
Dear All,
First : Happy New Year 2021 to all.I'm using a Sipy + PyScan (RFID) to actuate a relay that will be used to open a door.
=> I'm using P19 as pinout to actuate the relay and generating impulsion for 0,5 sec on opening the garage door.
From the wiring, and programming, all is working as a charm : approaching a whitelisted NFC card from the reader is generating the impulsion and as a result open / close the door.
The problem i have is when the Sipy is rebooting : at the boot sequence, all Pxx seems to be activated, which is resulting onto generating an impulsion on the relay... opening the door ... unwanted.
Is there a way to prevent the P19 (or any other accessible PIN accessible as Pin-Out on the Pyscan) to rize up during the boot sequence ?
Thanks for your help
Regards
Patrick.
PS @ Community Manager : Sorry i did not found any section regarding Pyscan on the forum, therefore i've attached it to Expansion Board section. Feel free to move it to more appropriate section if need be. -
-
This post is deleted! -
Hello jcaron
Thanks for your speedy answer.
indeed, i added an hold(false) before and hold(true) after activating the relay and it works fine.
Considering your point on disconnecting power : I'll backup the USB power with and LipoBattery, and add up a regular watchdog reset (in case of) so it never() falls into the "no power case", and forget the "hold".
Regards
Patrick
() or only if the power is down and battery is drained! (very bad luck here).the "script" now looks like.
Relay.hold(False)
Relay.value(ON)
time.sleep(0.5)
Relay.value(OFF)
Relay.hold(True)
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login