Adding a Feather relay board to the Feather wifi clock

For RTC breakouts, etc., use the Other Products from Adafruit forum

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
N6BM
 
Posts: 75
Joined: Mon Nov 10, 2014 4:22 pm

Adding a Feather relay board to the Feather wifi clock

Post by N6BM »

I built the Feather wifi clock and picked up the Feather relay board to add on after the project was working. Now that it is, can I get some help with some timing code so that on the hour, the relay will close for 3 seconds? I have an old Western Union self winding clock that needs a synchronizing pulse on the hour from the Feather relay to keep accurate time. With a Feather relay board and Feather wifi clock to give that hourly pulse, I'll have a great project.

Bill

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Adding a Feather relay board to the Feather wifi clock

Post by adafruit_support_rick »

If you use the Time and TimeAlarms libraries, you can set up a callback function that will execute at a specific time:
http://www.pjrc.com/teensy/td_libs_Time.html
http://www.pjrc.com/teensy/td_libs_TimeAlarms.html

You can use the Time library to keep your Arduino time synchronized with a real-time clock.

User avatar
N6BM
 
Posts: 75
Joined: Mon Nov 10, 2014 4:22 pm

Re: Adding a Feather relay board to the Feather wifi clock

Post by N6BM »

I appreciate the two timing links, but I bought a Feather relay board already and hope I could attach it to my Feather wifi clock and learn where I could wire from a pin output from the clock to trigger the relay. Including the timing code as well as the relay coil trigger wiring by Adafruit would be a great additional functional project for the wifi clock and Feather relay board.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Adding a Feather relay board to the Feather wifi clock

Post by adafruit_support_rick »

The time libraries will work on the feather. Your wifi clock uses NTP, right? So your system clock will be kept current by NTP instead of by an RTC. That's not a problem.
The time libraries work off the system clock, regardless of how it's synchronized. They don't require an RTC - they just make it easier to use it if you have it.

Using the TimeAlarms library, set up a repeating timer to go off once per hour. In the timer callback routine, close your relay, and set another timer to go off in 3 seconds. Turn off the relay in that timer's callback routine. That's all there is to it.

You can also use a repeating alarm to flag you to do your NTP update every day

User avatar
N6BM
 
Posts: 75
Joined: Mon Nov 10, 2014 4:22 pm

Re: Adding a Feather relay board to the Feather wifi clock

Post by N6BM »

adafruit_support_rick wrote:The time libraries will work on the feather. Your wifi clock uses NTP, right? So your system clock will be kept current by NTP instead of by an RTC. That's not a problem.
The time libraries work off the system clock, regardless of how it's synchronized. They don't require an RTC - they just make it easier to use it if you have it.

Using the TimeAlarms library, set up a repeating timer to go off once per hour. In the timer callback routine, close your relay, and set another timer to go off in 3 seconds. Turn off the relay in that timer's callback routine. That's all there is to it.

You can also use a repeating alarm to flag you to do your NTP update every day
It may sound easy, but I'm new at this. I'm a wiz at soldering and building hardware but I'm terrible at writing code. I know all about relays, but I don't know how to activate a relay via wiring with this 7 segment WIFI Feather clock.

If someone can post the above mentioned timing code and relay wiring trigger here, then I'll be good to go. I should be able to customize the code to trigger the relay every hour. I will have learned some more about working with Arduino. The relay will fire a syncronizing circuit in an old wall clock to keep the clock accurately keeping time
Thanks in advance
Bill

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Adding a Feather relay board to the Feather wifi clock

Post by adafruit_support_rick »

You want to merge this into your seven-segment clock code, right? Can you post your code here?

Locked
Please be positive and constructive with your questions and comments.

Return to “Clock Kits (discontinued)”