Timer With Arduino and Rotary Encoder

by TedySto in Circuits > Arduino

11031 Views, 11 Favorites, 0 Comments

Timer With Arduino and Rotary Encoder

P1030272.JPG

The timer is a tool often used in both industrial and household activities.

This assembly is cheap and easy to make.

It is also very versatile, being able to load a program chosen according to needs. There are several programs written by me, for Arduino Nano.

The duration of the timer can be entered on the display (1602) from the rotary encoder. By pressing the button on the rotary encoder the timer is triggered.
The load will be powered during the time delay via the contacts of a relay.

I personally used the timer for UV exposure in the process of PCB, but also at home where a kitchen robot operated to knead bread dough.

Supplies

All components can be found on AliExpress at low prices.

PCB is designed and manufactured by me (KiCad project). The method of PCB production will be the subject of a future Instructables.

Schematic Diagram

Timer Arduino and rotary encoder sch.jpg

The circuit is built around an Arduino Nano. The display that sets the time and reads the remaining time is of type 1602.

Through Q1, BZ1 is activated, which emits a beep at the end of the delay time.

The setting of the delay time is made from Rotary Encoder (mechanical type).

Also from here is made "Start time".

The relay K1 (12V) is activated by Q2. The relay contacts K1 are available at connector J1.

The schematic is supplied (+12V) to the J2 connector.

List of Components and Tools

P1030079.JPG

This is the list of components given by the KiCad program:

A1 Arduino_Nano Module:Arduino_Nano_WithMountingHoles

BZ1 Buzzer 5V Buzzer_Beeper:Buzzer_12x9.5RM7.6

C1 470nF Capacitor_THT:C_Rect_L7.0mm_W2.0mm_P5.00mm

C2, C3 100nF Capacitor_THT:C_Rect_L7.0mm_W2.0mm_P5.00mm

D1 LED Red LED_THT:LED_D5.0mm

D2 1N4001 Diode_THT:D_DO-41_SOD81_P10.16mm_Horizontal

DS1 WC1602A Display:WC1602A

J1 Conn_01x05 Connector_PinHeader_2.54mm:PinHeader_1x05_P2.54mm_Horizontal

J2 +12V Connector_BarrelJack:BarrelJack_Horizontal

K1 Rel 12V Relay_THT:Rel 12V

Q1, Q2 BC547 Package_TO_SOT_THT:TO-92_Inline

R1, R3 15K Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal

R2 1K/0,5W Resistor_THT:R_Axial_DIN0309_L9.0mm_D3.2mm_P12.70mm_Horizontal

R4 220 Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal

RV1 5K Potentiometer_THT:Potentiometer_Piher_PT-10-V10_Vertical

SW1 Rotary_Encoder Rotary_Encoder:RotaryEncoder_Alps_EC11E-Switch_Vertical_H20mm

SW2 Memory Button_Switch_THT:SW_CuK_JS202011CQN_DPDT_Straight

To this are added:

-PCB designed in KiCad.

-Digital multimeter (any type).

-Fludor and soldering tools.

-Screws M3 l = 25mm, nuts and spacers for LCD1602 mounting.

-Knob for rotary encoder.

-The desire to do it.

PCB

The PCB project is made in the KiCad program and can be found at:

https://github.com/StoicaT/Timer-with-Arduino-and-...

Here you will find all the details necessary for the factory order (Gerber files, etc.).

Starting from this documentation, you can also make your own PCBs on double-plated material, 1.6 mm thick. No metallic holes, with side-by-side passages with non-insulated connector.

Cover all routes with tin.

We check with the digital multimeter the PCB routes to detect interruptions or short circuits between the routes (first photo in Step 4).

Module Assembly

P1030091.JPG
P1030109.JPG
P1030122.JPG
P1030110.JPG
P1030115.JPG
P1030125.JPG
P1030126.JPG
P1030130.JPG

The following photos briefly show how to plant electronic components.

The last 3 photos show the completed front-back set (final).

Start up the module:

-Visually check the correct placement of components and tin soldering (the components are planted in such a way that the assembly can be mounted on the front panel of a device).

-Power the mounting on the J2 with 12V .

-Measure (according to the schematic diagram) the voltages on the board (digital multimeter).

-Adjust the optimal contrast on the LCD1602 from RV1.

-Upload the program on Arduino Nano board as shown below.

-Check the proper functioning by giving a timer and seeing that it is executed correctly.

Software.

The program can be found at:

https://github.com/StoicaT/Timer-with-Arduino-and-...

https://github.com/StoicaT/Timer-with-Arduino-and-...

There are 2 program variants. The github repository explains what each one does and how the timer is programmed in each case.

We will download the desired version and upload it to the Arduino Nano board.

And that's it!