11 years, 9 months ago.

Controlling relay

Hi, My project is to control the high voltage ac loads with a relay. I will set the time and it will follow according to the set time. Other than the set time, the ac loads cannot be operated. For this I am using LPC 1768. I have chosen this one because it has a built in RTC. I need help in writing the code. Can anyone please help me in writing it? Thanks in advance. tadns

2 Answers

11 years, 8 months ago.

Hi, Najia, please tell me a few things:

  • which type of relay are you using
  • you want that the relay activates the load every certain time? is this correct?

Greetings

Accepted Answer

My relays are NC relays. Yes, it will activate the load according to the scheduled time like pick and off pick. During pick it will deactivate the load and during off pick time it will activate the load. In other words, loads will operate only according to the scheduled time. For this I need to call the RTC. I am using LPC 1768. I need to know how to call it? Thank you very much for the reply. :D

posted by Najia Hossain 27 Mar 2013

Hi, try to check this pages:

Maybe this will help you to create the code you want

Greetings

posted by Ney Palma 27 Mar 2013
11 years, 8 months ago.

This contains a software example: http://mbed.org/users/4180_1/notebook/powerswitch-tail-ii/

Don't forget the diode D1 parallel to the relay coil: http://mbed.org/users/4180_1/notebook/relay-breakout-boards/

Thank you for your answer. I have seen both of the pages before. I need to know how to call RTC for LPC1768 for my project. Thanks a lot for the reply.

posted by Najia Hossain 27 Mar 2013

Well if I search "RTC": http://mbed.org/users/Sissors/code/RTC/

posted by Geert Hospers 27 Mar 2013