


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
How to make a simple 2-step Arduino programmable timer circuit that can be used to switch an electrical load ON/OFF with independently adjustable ON and OFF timings. The article provides a program code that can be compiled and uploaded to the Arduino board to start the timer function. The document also includes a circuit diagram with the Arduino connections.
Typology: Schemes and Mind Maps
1 / 4
This page cannot be seen from the preview
Don't miss anything!
In this article we learn how to make a simple 2-step Arduino programmable timer circuit, which can be used to switch an electrical load ON/OFF with independently adjustable ON and OFF timings. For example if you want a light to remain ON for 24 hours and OFF for 2 hours, you can simply do this through a quick modification in the program code. In the same way you can customize the output timings to any other desired set of time intervals by changing the code appropriately. You just have to compile and upload the following code to your Arduino board and start the timer function as per your specific application needs. Program Code void setup(){ pinMode(13, OUTPUT); } void loop(){ digitalWrite(13, HIGH); delay(86400000); digitalWrite(13, LOW); delay(3600000); } In the above example code the lines delay(86400000); and delay(3600000); determine the output ON and OFF delay time intervals respectively, in milliseconds. Here, the figure 86400000 milliseconds corresponds to 24 hours, while 3600000 exhibits 1 hour delay. You can customize these two values as per your personal preference to get the required output delays.
Once setup and powered, the Arduino will continue switching between the two step ON/OFF timing sequence. as long as power remains applied to the system. Circuit Diagram The complete circuit diagram along with the Arduino connections can be witnessed in the following diagram: