timer

Rosa's picture

Offline

Joined: Jan 08, 2019

Replies: 0
timer
January 8, 2019 - 10:26am

Looking or some help on creating a timer to run a servo motor.

For example, I would like the servo motor to turn to 180 degrees every day at noon, remain there for 30 seconds, then return to 0 and wait for it to be noon again.

Hiro_Hamada's picture

Offline

Joined: Apr 17, 2018

Replies: 83
Use an RTC and Arduino
January 8, 2019 - 11:11am

Hi Rosa,

I am not sure what microcontroller you are using, but from your question I assume that you are beginner in electronics.

 

So the best way to go with your project is to use a servo motor, Arduino and RTC module. Since you have to rotate the servo motor exactly at noon everyday, your microontroller (Arduino) should know what the real world time is, so we can use an RTC module like DS3231 to read the real world time.

When it is noon (say 4pm) we can make the servo rotate by simply providing a pwm signal to the motor. With arduino it is very easy to do it because of the readily available libraries. you can use the following links for reference.

https://circuitdigest.com/microcontroller-projects/automatic-pet-feeder-...

https://circuitdigest.com/article/servo-motor-basics

https://circuitdigest.com/microcontroller-projects/controlling-multiple-...

 

Hope this helps, feel free to ask if you have any doubts, all the best