timer cunter temperature manual

31
3-in-1 : Timer & Counter & Temperature Control Relay [email protected]

Upload: ibalco

Post on 08-Feb-2016

26 views

Category:

Documents


0 download

DESCRIPTION

Timer

TRANSCRIPT

Page 1: Timer Cunter Temperature Manual

3-in-1 : Timer & Counter & Temperature

Control Relay

[email protected]

Page 2: Timer Cunter Temperature Manual

Features Summary: 1. Microchip PIC16F883 DIP28 2. LCD Module 1602 3. Power Circuit (MC34063A , Vin=7V~16V, Vout=5V/ 1 A) 4. J5:Voltage Input (Voltage Range =0V~55V) 5. Keyboard Circuit(Up/Down/Right/Left/Select, Five keyboards) 6. Relay Circuit: Build in one Relay. 7. J4:Digital TemperatureDS18B20 (You must buy Digital Temperature

DS18B20 in additional). 8. The product needs to be assembled and soldered by your-self. 9. Function1: Timer Relay ON/OFF 1 second to 999 hours (999:59:59)

Digital Display 10. Function2: UP-DOWN Counter 00000000-99999999 with Relay

Control 11. Function3: Digital Temperature Control Relay -50˚ to +125˚C PC FAN

Kit

Page 3: Timer Cunter Temperature Manual
Page 4: Timer Cunter Temperature Manual
Page 5: Timer Cunter Temperature Manual

1. Timer Relay ON/OFF 1second to 999 hours (999:59:59) Digital

Display

This circuit is Digital Timerboard which you can set Timer of Relay to turn on and set Timer of Relay to turn off. The Relay work On -> Off -> On-> Off -> On->Off as loop until power off.

Keep setting counter value in PIC16 internal EEPROM , don't worry about

power off. The setting counter value will be reloaded when power on.

The Timer range can be adjusted be 5 keyboards. DisplayTimer by LCD

1602 Module.

Relay can handle max at 7A/240VAC or 10A/110VAC.

Mode1: Set Timer of Relay to turn on / press clear button to reset

Mode2: Loop count without clear button. It has Relay ON when the Timer

= “Set Timer Relay” time and Relay OFF(reset) when the Timer= “Set

Timer OFF” time as loop until power off.

EX :

When Timer=001:00:00(“Set Timer Relay” time)the Lamp toturn on.

When Timer=001:50:00 (“Set Timer OFF” time) the Lamp toturn off.

The Lamp work On -> Off -> On-> Off -> On->Off as loop until power

off.(Relay control Power ON/OFF)

Page 6: Timer Cunter Temperature Manual

2. UP-DOWN Counter 00000000-99999999 with Relay Control

This function is up-down counter 0-99999999 or 99999999-0 with

Relay Control. The Relay will turn on when the counter count the number

reach to your setting number.

Keep setting counter value in PIC16 internal EEPROM , don't worry about

power off. The setting counter valuewill be reloaded when power on.

The counter value range can be adjusted be 5keyboards.

Displaytemperature by LCD 1602 Module.

Up/Down Input signal:TTL , CMOS 5V and speed 0-6KHz

Mode1: Count up until Relay turn on / press clear button to reset

Mode2: Loop count without clear button. Relay will turn on when count to

setting value and Relay on 1-9second.

Ex :You use this product to connect with infrared sensor to count the

number of people which pass the door. And turn on the light and the voice

to say “Hello Welcome" when people pass the door.

Page 7: Timer Cunter Temperature Manual

3. Digital Temperature Control Relay -50˚ to +125˚C PC FAN Kit

This is Digital Temperature control or thermostat which works from -50

- 125˚C. Controls your device by switching on the relay when the warm

temperature you desire is reached (for a PC fan/air conditioner / Hatching

cabinet), or when the low temperature is reached(heater).

Keep setting Temperature in PIC16 internal EEPROM , don't worry about

power off. The setting upper/lower temperaturewill be reloaded when

power on.

It can be set to detect the temperature from -50˚ TO +125˚C. (Digital

Sensor DS18B20. High accuracy)

The temperature setting range can be adjusted be 5keyboards.

Displaytemperature by LCD 1602 Module.

Relay can handle max at 7A/240VAC or 10A/110VAC.

It has Relay ON when the temperature >“setting upper temperature” and

Relay OFF when the temperature<“setting lower temperature”varied 1˚C .

Page 8: Timer Cunter Temperature Manual

I. Press “SELECT”=>Enter Select Function

Press “LEFT”=>Up/Down Counter Control Relay

Press ”RIGHT”=>Timer Control Relay

Press “DOWN”=>Temperature Control Relay

II. Press “LEFT”=> Up/Down Counter Control Relay

Using UP/Down/Right/Left/SelectKeypadSetupCounter

Value.(EX: Counter Value=100)

Page 9: Timer Cunter Temperature Manual

Using UP/Down/SelectKeypad Setup Reset Time:1~9 SEC

orOFF.

Loop count without clear button. Relay will turn on when

count to setting value and Relay on 1-9second of setting time.

When Counter value:100 =>Relay ON

J4(CP1 Pin):UP Counter Signal Input, TTL Level(5V/0V)

J2(CP2 Pin):DOWN Counter Signal Input, TTL Level(5V/0V)

J5:Voltage Meter input(0V~55V)

Page 10: Timer Cunter Temperature Manual

Press “RIGHT” Keypad:UP Count(+1)

Press “LEFT”Keypad:DOWN Count(-1)

Press “Down/Clear”Keypad: Clear Counter Value &Relay OFF,

(Restart Counter)

Page 11: Timer Cunter Temperature Manual

III. Press ”RIGHT”=>Timer Control Relay

Using UP/Down/Right/Left/SelectKeypad Setup Timer (EX:

Hour:Minute:Second; Timer Value=000:01:00)

Using UP/Down/Right/Left/SelectKeypad

Setup Timer OFF(EX: Hour:Minute:Second; Timer

Value=001:00:00)

When Time Out =>Relay ON

Page 12: Timer Cunter Temperature Manual

Press “Down/Clear”: Clear Timer &Relay OFF (Restart Timer)

Mode1: Set Timer of Relay to turn on / press clear button to

reset

Mode2: Loop count without clear button. It has Relay ON

when the Timer = “Set Timer Relay” time and Relay

OFF(Reset) when the Timer= “Set Timer OFF” time as loop

until power off.

Page 13: Timer Cunter Temperature Manual

IV. Press “DOWN”=>Temperature Control Relay

Setup “Relay ON” Temperature

Press “Up”Keypad=>”+”

Press “Down”Keypad=>“-“

Press “Select”=> Enter Temperature

Using UP/Down/Right/Left/SelectKeypad

SetupTemperature(Ex: +027՞C)

Setup “Relay OFF” Temperature

Press “Down”Keypad=>“-“

Press “Up”Keypad=>”+”

Press “Select”=> Enter Temperature

Using UP/Down/Right/Left/SelectKeypadSetupTemperature(Ex:

+024՞C)

Page 14: Timer Cunter Temperature Manual

When Temperature> +027՞C =>Relay ON

When Temperature =< +024՞C =>Relay OFF

Press “Down/Clear”Keypad=> Relay OFF

Page 15: Timer Cunter Temperature Manual

J4 not connect “DS18B20”=>ERROR

MAXIM DS18B20 Pin Configurations

Page 16: Timer Cunter Temperature Manual
Page 17: Timer Cunter Temperature Manual
Page 18: Timer Cunter Temperature Manual

System Circuit Diagram

1. LCD 16x2Module Circuit

Title

Size Document Number Rev

Date: Sheet of

<Doc> <Rev Code>

<Title>

Custom

1 1Wednesday , Nov ember 23, 2011

R2300

5VJ1

CON6

123456

SCKSDA

C6 20P

Y120 MHz

C5 20P

MCLR

J8

CON6

123456

MCLR

VCC

GND

PGD

PGC

RXTX

SDASCK

5V

R3 300

U2 MC34063A

COMP5

TCAP3

VCC6

GND4

DC8

PK7 SWC

1

SWE2

A1

R4

10KJ4CON3

123

CP1

5V

R181K

R17 3K

5V

J2CON3

123

CP2

L2

10uH

5VC

RN14.7K

1 2345

IO0IO1IO2

T1

IO3

J7CON3

123

5V

IO4

R82K

IO5

IO4

5V

5V

D6

R160.3 1/2W

J6CON3

123

IO5

R72K 5V

D7

IO4IO5

ED4D5

T1

C3

470pF

T1

R1 10K

C1 0.1uF

5V

D7D6

MCLR

J9

JH5

12345

5V

5V

Key inA1

RS

RX

D2

1N5819

TX

SDA

CP2CP1SCK

CP1 IO5IO4

L1220uH

IO3IO2IO1IO0

C4

0.1u

HT2

HEADER 2

12

R9

10K

R6 100K

CAP2

470u

Q1

NPN BC547

C2 0.1uF

CAP1

100u

CP2

CP1

IO5/A5

IO4/A4

IO3/A3

IO2/A2

IO1

IO0

SW1SW

VCC

RX

TX

SDA

SCK

GND

J3CON3

123

SW2SW

SW3SW

SW4SW

5V

SW5SW

R10

300

R11

300

R12

300

R5

2K

R14

300

Key in

J5

CON2

12

UP

RIGHTA1

GND

SELECT

LEFT

DOWN/Clear

LS1

RELAY

35

412

D1 1N4004

LED1

LED

R13 2K

Q2NPN 9013

R15 2K

HT1

HEADER 3

123

U1

PIC16F883

MCLR1

AN0/RA02

AN1/RA13

AN2/RA24

AN3/RA35

RA46

AN4/RA57

Vss8

RA79

RA610

RC011

RC1/CCP212

RC2/CCP113

RC3/SCK14

RC4/SDA15RC516TX/RC617RX/RC718Vss19Vdd20RB0/AN1221RB1/AN1022RB2/AN823RB3/AN924RB4/AN1125RB5/AN1326PGC/RB627PGD/RB728

5V

1/4W

5V

Relay

5V

LCD1

LCD Module

12345678910111213141516

5V

5V

D4

E

RS

D6D5

D7

Pin1

VR1

VAR

GND

+5V

Vo

RS

RW

E

D0

D1

D2

D3

D4

D5

D6

D7

+5V

GND

Relay

Page 19: Timer Cunter Temperature Manual

2. Power Circuit (Vin=7V~16V,Vout=5V) The MC34063A Series is a monolithic control circuit containing theprimary

functions required for DC− to−DC converters. These devicesconsist of an internal

temperature compensated reference,comparator,controlled duty cycle oscillator

with an active current limit circuit,driver and high current output switch. This series

was specificallydesigned to be incorporated in Step−Down and Step−Up

andVoltage− Inverting applications with a minimum number of

externalcomponents.

Features:

Operation from 3.0 V to 40 V Input

Low Standby Current

Current Limiting

Output Switch Current to 1.5 A

Output Voltage Adjustable

Frequency Operation to 100 kHz

Precision 2% Reference

Note: CAP1=100uF/16V

Page 20: Timer Cunter Temperature Manual

3. PIC16F883 Circuit

4. Voltage Input Circuit (Voltage Range =0V~55V) A1=Voltage Input*[10k/(100K+10K)]

Ex: Voltage Input=45V

A1(PIC16F883 AN0,Pin 2) =>45V*(10K/110K)=4.09V

Page 21: Timer Cunter Temperature Manual

5. Keyboard Circuit The PIC16 buil-in 10-bit ADCs. For this example, an analogue keyboard is

connected to one of the ADCs.When a key is pressed, the input voltage detected by

the ADC changes according to the voltage divider activated by the keypad. The

conversion result from the ADC is used to determine which key is pressed.

1. No any key is pressed: Keyin=5V.

2. SW1 is pressed:keyin=0V.

3. SW2 is pressed: keyin=5*[300/(300+2K)]=0.65V

4. SW3 is pressed: keyin=5*[600/(600+2K)]=1.15V

5. SW4 is pressed: keyin=5*[900/(900+2K)]=1.55V

6. SW5 is pressed: keyin=5*[1200/(1200+2K)]=1.85V

If more than one key is pressed at the same time, the key detected is the

closest key to the ADC input in the chain. This means that the key recognition is

managed by priority.The number of keys that can be detected depends on the

tolerance of the resistors used and the noise from the circuit. The application

software uses a voltage range corresponding to each key when converting an

analogue reading to a key number.

Page 22: Timer Cunter Temperature Manual

6. IO & ADC interface Circuit

7. Relay Circuit(Timer & Counter & Temperature Control Relay)

Page 23: Timer Cunter Temperature Manual

8. Frequency & RPM Input Circuit(fmax=50MHz) It was needed only an amplifier stage to raise the input signal level from

200-300 mV p.p. to about 3 volts p.p. A self biased common emitter amplifier

produces a pseudo-TTL driving signal. The 10uH inductor in the collector lead helps

extend the high frequency response. Any "fast" NPN transistor should be suitable.

The basic idea comes from the AN592 Microchip application note: "Frequency

counter using PIC16C5x" where you may find a simple software wich implements a

frequency counter using a PIC microcontroller.I wrote a specifically designed

software to improve the counter resolution, to handle the IF mode and value by

means of an operating menu, to decode and edit the read frequency on an LCD

display. The result was a simple and effective device.

9. PICKIT3 Connector

Page 24: Timer Cunter Temperature Manual

Bill Of Materials

Quantity Reference Part

2 J8,J1 CON6

5 2,J3,J4,J6,J7 CON3

1 J5 CON2

1 J9 JH5

3 C1,C2,C4 0.1uF

3 R1,R4,R9 10K ohm

6 R2,R3,R10,R11,R12,R14 300 ohm

5 R5,R7,R8,R13,R15 2K ohm

5 SW1,SW2,SW3,SW4,SW5 SW

1 R6 100K 1%

1 RN1 4.7K ohm (label :473)

2 D1,D3 1N4004

LCD 16x2&MCU Circuit

1 LCD1 LCD 16x2

1 VR1 VAR

1 U1 PIC16F883

1 Y1 20MHz

2 C6,C5 20PF

Power Circuit

1 U2 MC34063A

1 D2 1N5819

1 HT2 HEADER 2

1 R16 0.3 ohm;1/2W

1 R17 3K ohm;1/4W

1 R18 1K ohm;1/4W

1 C3 470pF (Label:471)

1 L1 220uH

1 CAP1 100uF/16V

1 CAP2 470uF/16V

Relay Circuit (Timer & Counter & Temperature Control Relay)

1 LED1 LED

1 LS1 RELAY

1 Q2 NPN 9013

1 HT1 HEADER 3

Page 25: Timer Cunter Temperature Manual
Page 26: Timer Cunter Temperature Manual
Page 27: Timer Cunter Temperature Manual

Steps for installation the components

1. Keyboard Circuit:

R5 :2K ohm

R10,R11,R12,R14 :300 ohm

SW1,SW2,SW3,SW4,SW5 :SW

J4: 3Pin

Page 28: Timer Cunter Temperature Manual

2. Relay Circuit

Q2: NPN9013

R13,R15: 2K ohm

LED1: LED

D1: 1N4004

LS1: RELAY

HT1: HEADER3

Page 29: Timer Cunter Temperature Manual

3. Power Circuit:

U2: MC34063A

R16: 0.3 ohm,1/2W

R17: 3K ohm

R18: 1K ohm

CAP1: 100uF/16V or 100uF/25V

CAP2: 470uF/16V

C3: 470pF (label:471)

D3: 1N4004

D2: 1N5819

HT2: HEADER2

Page 30: Timer Cunter Temperature Manual

4. Voltage Input Circuit& RN1:

R6: 100K

R9: 10K

RN1: 5P4R, 4.7K ohm (Label:472)

J2: 3Pin

J5: 2Pin (Attention Pin 1)

Page 31: Timer Cunter Temperature Manual

5. PIC16F883 & LCD Circuit:

LCD: 16Pin

U1: PIC16F883

C1,C4: 0.1uF

Y1: 20MHz

C5,C6: 20pF

R1: 10K ohm

VR1: VAR