Está en la página 1de 31

3-in-1 : Timer & Counter & Temperature Control Relay

pcb8051@gmail.com

Features Summary:
1. 2. 3. 4. 5. 6. 7. Microchip PIC16F883 DIP28 LCD Module 1602 Power Circuit (MC34063A , Vin=7V~16V, Vout=5V/ 1 A) J5:Voltage Input (Voltage Range =0V~55V) Keyboard Circuit(Up/Down/Right/Left/Select, Five keyboards) Relay Circuit: Build in one Relay. 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 +125C PC FAN Kit

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)

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.

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


This is Digital Temperature control or thermostat which works from -50 - 125C. 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 +125C. (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 temperaturevaried 1C .

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)

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)

Press RIGHT Keypad:UP Count(+1) Press LEFTKeypad:DOWN Count(-1) Press Down/ClearKeypad: Clear Counter Value &Relay OFF, (Restart Counter)

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

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.

IV. Press DOWN=>Temperature Control Relay


Setup Relay ON Temperature Press UpKeypad=>+ Press DownKeypad=>-

Press Select=> Enter Temperature Using UP/Down/Right/Left/SelectKeypad SetupTemperature(Ex: +027C)

Setup Relay OFF Temperature Press DownKeypad=>- Press UpKeypad=>+ Press Select=> Enter Temperature Using UP/Down/Right/Left/SelectKeypadSetupTemperature(Ex: +024C)

When Temperature> +027C =>Relay ON

When Temperature =< +024C =>Relay OFF Press Down/ClearKeypad=> Relay OFF

J4 not connect DS18B20=>ERROR

MAXIM DS18B20 Pin Configurations

System Circuit Diagram


5V MCLR C1 0.1uF Key in A1 RS E D4 D5 1 2 3 4 5 6 7 8 9 10 11 12 13 14 R1 10K U1 MCLR PGD/RB7 AN0/RA0 PGC/RB6 AN1/RA1 RB5/AN13 AN2/RA2 RB4/AN11 AN3/RA3 RB3/AN9 RA4 RB2/AN8 AN4/RA5 RB1/AN10 Vss RB0/AN12 RA7 Vdd RA6 Vss RC0 RX/RC7 RC1/CCP2 TX/RC6 RC2/CCP1 RC5 RC3/SCK RC4/SDA PIC16F883 C6 20P 5V 5V A1 GND 5V IO4 CON3 J7 1 2 3 IO4 J5 CON2 1 2 R9 10K LS1 5 3 4 RS VAR E 5V J8 D4 D5 D6 D7 D1 1N4004 5V SDA SCK RX TX 1 2 3 4 5 6 CON6 VCC RX TX SDA SCK GND R13 2K LED1 LED R15 Relay 2K Q2 NPN 9013 SELECT HT2 1 2 R16 0.3 1/2W HEADER 2 6 5 CAP1 100u R18 1K VCC COMP R17 3K 1/4W CAP2 Title 470u <Title> Size Document Number Custom <Doc> Date: Wednesday , Nov ember 23, 2011 Sheet 1 of 1 Rev <Rev Code> 470pF GND 4 5V JH5 1N5819 8 7 U2 DC PK MC34063A 5V SWC SWE TCAP 1 2 3 C3 L1 220uH D2 J9 MCLR VCC GND PGD PGC 1 2 3 4 5 MCLR D7 D6 SW5 300 SW LEFT R14 SW4 300 SW RELAY IO5 1 2 5V DOWN/Clear R12 SW3 300 SW 3 2 1 UP R11 R6 100K A1 HEADER 3 HT1 SW2 SW RIGHT SW1 2K SW Key in R10 300 28 27 26 25 24 23 22 21 20 19 18 17 16 15 D7 D6 IO5 IO4 IO3 IO2 IO1 IO0 RX TX Relay SDA CP1 C 5V 5V CP2 CON3 J2 1 2 3 CP2 5V CON3 J4 1 2 3 CP1 5V R4 0.1u J3 CON3 3 2 1 T1 C2 0.1uF Q1 NPN BC547 R5 5V 10K R3 300 T1 5V 1 RN1 4.7K 2 3 4 5 SDA SCK CP1 5V J1 R2 300 IO5 IO4 IO3 IO2 IO1 IO0 L2 CON6 C4 10uH 1 2 3 4 5 6 IO5/A5 IO4/A4 IO3/A3 IO2/A2 IO1 IO0

C5 20P T1 CP2 CP1 SCK

20 MHz Y1

5V LCD Module Pin1 GND 1 2 +5V 3 Vo 4 RS 5 RW 6 E 7 8 D0 9 D1 10 D2 11 D3 12 D4 13 14 D5 15 D6 16 D7 +5V LCD1 GND

R7 2K

5V IO5

VR1

CON3 J6 1 2 3

R8 2K

1. LCD 16x2Module Circuit

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

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

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.

6. IO & ADC interface Circuit

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

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

Bill Of Materials
Quantity
2 5 1 1 3 3 6 5 5 1 1 2 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Reference
J8,J1 2,J3,J4,J6,J7 J5 J9 C1,C2,C4 R1,R4,R9 R2,R3,R10,R11,R12,R14 R5,R7,R8,R13,R15 SW1,SW2,SW3,SW4,SW5 R6 RN1 D1,D3

Part
CON6 CON3 CON2 JH5 0.1uF 10K ohm 300 ohm 2K ohm SW 100K 1% 4.7K ohm (label :473) 1N4004 LCD 16x2 VAR PIC16F883 20MHz 20PF MC34063A 1N5819 HEADER 2 0.3 ohm;1/2W 3K ohm;1/4W 1K ohm;1/4W 470pF (Label:471) 220uH 100uF/16V 470uF/16V LED RELAY NPN 9013 HEADER 3

LCD 16x2&MCU Circuit LCD1 VR1 U1 Y1 C6,C5 U2 D2 HT2 R16 R17 R18 C3 L1 CAP1 CAP2 LED1 LS1 Q2 HT1

Power Circuit

Relay Circuit (Timer & Counter & Temperature Control Relay)

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

2. Relay Circuit

Q2: NPN9013 R13,R15: 2K ohm LED1: LED D1: 1N4004 LS1: RELAY HT1: HEADER3

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

4. Voltage Input Circuit& RN1:

R6: 100K R9: 10K RN1: 5P4R, 4.7K ohm (Label:472) J2: 3Pin J5: 2Pin (Attention Pin 1)

5. PIC16F883 & LCD Circuit:

LCD: 16Pin U1: PIC16F883 C1,C4: 0.1uF Y1: 20MHz C5,C6: 20pF R1: 10K ohm VR1: VAR

También podría gustarte