[go: up one dir, main page]

CN202077005U - Touch screen switching circuit with infrared remote control - Google Patents

Touch screen switching circuit with infrared remote control Download PDF

Info

Publication number
CN202077005U
CN202077005U CN2011201054392U CN201120105439U CN202077005U CN 202077005 U CN202077005 U CN 202077005U CN 2011201054392 U CN2011201054392 U CN 2011201054392U CN 201120105439 U CN201120105439 U CN 201120105439U CN 202077005 U CN202077005 U CN 202077005U
Authority
CN
China
Prior art keywords
resistance
emitting diode
light
pin
circuit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN2011201054392U
Other languages
Chinese (zh)
Inventor
郑梁
郑洁
唐肖军
王亮
张海斌
徐志望
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Dianzi University
Original Assignee
Hangzhou Dianzi University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Dianzi University filed Critical Hangzhou Dianzi University
Priority to CN2011201054392U priority Critical patent/CN202077005U/en
Application granted granted Critical
Publication of CN202077005U publication Critical patent/CN202077005U/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02BCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO BUILDINGS, e.g. HOUSING, HOUSE APPLIANCES OR RELATED END-USER APPLICATIONS
    • Y02B20/00Energy efficient lighting technologies, e.g. halogen lamps or gas discharge lamps
    • Y02B20/40Control techniques providing energy savings, e.g. smart controller or presence detection

Landscapes

  • Electronic Switches (AREA)

Abstract

本实用新型公开了一种带红外遥控的触摸屏开关电路,包括背光电路、触摸屏电路、继电器驱动电路和红外电路;所述触摸屏电路、背光电路、继电器驱动电路和红外电路与所述单片机相连,所述继电器驱动电路有4个且结构相同。克服了传统机械式开关的缺点,暗背光触控设计使得人在夜晚没有灯光的时候,也能安全的触摸屏开关进行操作,而且红外的控制可以在一定范围内对其进行远程操作,安全便利。

The utility model discloses a touch screen switch circuit with infrared remote control, which comprises a backlight circuit, a touch screen circuit, a relay drive circuit and an infrared circuit; the touch screen circuit, the backlight circuit, the relay drive circuit and the infrared circuit are connected with the single chip microcomputer, the There are 4 relay driving circuits with the same structure. Overcoming the shortcomings of traditional mechanical switches, the dark backlight touch design allows people to safely operate the touch screen switch at night when there is no light, and the infrared control can be remotely operated within a certain range, which is safe and convenient.

Description

一种带红外遥控的触摸屏开关电路A touch screen switch circuit with infrared remote control

技术领域 technical field

本实用新型属于电子技术领域,具体涉及一种控制灯具开关的电路。 The utility model belongs to the field of electronic technology, in particular to a circuit for controlling a lamp switch.

背景技术 Background technique

现在我们使用的都是机械式的开关,直接通过按钮使金属片接触和断开来实现电源的通断。这种开关虽然价格便宜,但是样式比较简单普通,在夜晚没有灯光的时候找不到开关的位置,而且人体直接与强电接触容易引起触电,而且没法远程进行控制,使得操作不是很便利。 Now we all use mechanical switches, which directly make the metal sheet contact and disconnect through the button to realize the on-off of the power supply. Although this kind of switch is cheap, its style is relatively simple and ordinary, and the position of the switch cannot be found when there is no light at night, and the direct contact of the human body with strong electricity may cause electric shock, and it cannot be controlled remotely, which makes the operation not very convenient.

发明内容 Contents of the invention

本实用新型的目的就是克服当前机械式开关的不足,提供一种操作安全便利的开关控制电路。 The purpose of the utility model is to overcome the deficiency of the current mechanical switch and provide a switch control circuit with safe and convenient operation.

为了解决上述技术问题,本实用新型采用如下技术方案: In order to solve the above technical problems, the utility model adopts the following technical solutions:

一种带红外遥控的触摸屏开关电路,包括单片机和晶振电路,其特征在于,还包括背光电路、触摸屏电路、继电器驱动电路和红外电路;所述触摸屏电路、背光电路、继电器驱动电路和红外电路与所述单片机相连;所述继电器驱动电路有4个且结构相同。所述背光电路包括发光二极管L1、发光二极管L2、发光二极管L3、发光二极管L4、发光二极管L5、发光二极管L6、电阻R3、电阻R4、电阻R5、电阻R6、电阻R7和电阻R8;所述电阻R3一端与发光二极管L1相连;所述电阻R4一端与发光二极管L2相连;所述电阻R5一端与发光二极管L3相连;所述电阻R6一端与发光二极管L4相连;所述电阻R7一端与发光二极管L5相连;所述电阻R8一端与发光二极管L6相连;所述发光二极管L1、发光二极管L2、发光二极管L3、发光二极管L4、发光二极管L5、发光二极管L6的另一端接地;所述电阻R3、R4、R5、R6及R7的另一端分别与所述单片机的RB2~RB7引脚相连。所述继电器驱动电路包括电阻R9、NPN型三极管Q1、二极管D2、继电器K1;所述电阻R9一端与所述三极管Q1的基极相连,另一端与单片机相应的引脚相连;所述三极管Q1的集电极与所述二极管D2的正端及所述继电器K1的5号脚相连;所述三极管Q1的发射极接地;所述二极管D2的负端及所述继电器K1的4号脚都连接电源;所述继电器K1的1号脚与输出火线L1相连,3号脚与输入火线Lin相连。所述红外电路包括红外接收头U2,所述红外接收头U2的sin端与单片机的RB0引脚相连,GND端与地相连,VCC端与电源相连。 A touch screen switch circuit with an infrared remote control, comprising a single-chip microcomputer and a crystal oscillator circuit, is characterized in that it also includes a backlight circuit, a touch screen circuit, a relay drive circuit and an infrared circuit; the touch screen circuit, the backlight circuit, the relay drive circuit and the infrared circuit and the The single-chip microcomputers are connected; there are four relay drive circuits with the same structure. The backlight circuit includes light emitting diode L1, light emitting diode L2, light emitting diode L3, light emitting diode L4, light emitting diode L5, light emitting diode L6, resistor R3, resistor R4, resistor R5, resistor R6, resistor R7 and resistor R8; One end of R3 is connected to the light emitting diode L1; one end of the resistor R4 is connected to the light emitting diode L2; one end of the resistor R5 is connected to the light emitting diode L3; one end of the resistor R6 is connected to the light emitting diode L4; one end of the resistor R7 is connected to the light emitting diode L5 Connected; one end of the resistor R8 is connected to the light emitting diode L6; the other end of the light emitting diode L1, the light emitting diode L2, the light emitting diode L3, the light emitting diode L4, the light emitting diode L5, and the light emitting diode L6 is grounded; the resistors R3, R4, The other ends of R5, R6 and R7 are respectively connected to the RB2-RB7 pins of the single-chip microcomputer. The relay drive circuit includes a resistor R9, an NPN transistor Q1, a diode D2, and a relay K1; one end of the resistor R9 is connected to the base of the transistor Q1, and the other end is connected to a corresponding pin of the microcontroller; the transistor Q1 The collector is connected to the positive end of the diode D2 and the No. 5 pin of the relay K1; the emitter of the triode Q1 is grounded; the negative end of the diode D2 and the No. 4 pin of the relay K1 are connected to a power supply; The No. 1 pin of the relay K1 is connected to the output live line L1, and the No. 3 pin is connected to the input live line Lin. The infrared circuit includes an infrared receiving head U2, the sin end of the infrared receiving head U2 is connected to the RB0 pin of the single-chip microcomputer, the GND end is connected to the ground, and the VCC end is connected to the power supply.

作为可选方案,所述单片机采用PIC16F883单片机。 As an optional solution, the single-chip microcomputer adopts a PIC16F883 single-chip microcomputer.

作为可选方案,所述电阻R3、电阻R4、电阻R5、电阻R6、电阻R7和电阻R8的电阻值均为510Ω。 As an optional solution, the resistance values of the resistors R3, R4, R5, R6, R7 and R8 are all 510Ω.

作为可选方案,所述电阻R9为1KΩ,所述三极管Q1采用IN9013三极管,所述二极管D2采用IN4148二极管,所述继电器K1采用SRD-S-124D继电器。 As an optional solution, the resistance R9 is 1KΩ, the transistor Q1 is an IN9013 transistor, the diode D2 is an IN4148 diode, and the relay K1 is an SRD-S-124D relay.

本实用新型克服了传统机械式开关的缺点,暗背光触控设计使得人在夜晚没有灯光的时候,也能安全的触摸屏开关进行操作,而且红外的控制可以在一定范围内对其进行远程操作,安全便利。 The utility model overcomes the shortcomings of the traditional mechanical switch. The dark backlight touch design enables people to safely operate the touch screen switch when there is no light at night, and the infrared control can be used for remote operation within a certain range. Safe and convenient.

附图说明 Description of drawings

  图1为本实用新型单片机电路的电路图; Fig. 1 is the circuit diagram of the single-chip microcomputer circuit of the present utility model;

图2为本实用新型背光电路的电路图; Fig. 2 is the circuit diagram of the utility model backlight circuit;

图3为本实用新型继电器驱动电路的电路图。 Fig. 3 is a circuit diagram of the utility model relay driving circuit.

具体实施方式 Detailed ways

下面将结合附图和具体实施例对本实用新型做进一步说明: The utility model will be further described below in conjunction with accompanying drawing and specific embodiment:

图1中单片机的RA0~RA4引脚分别与触摸屏电路的Left、Down、Mid、Up和Right引脚相连,当触摸屏的第一块区域被按下时,控制所有线路的通断;当触摸屏的第二、第三、第四、第五块区域被按下时,分别控制四路线路中相应的一路的通断;当触摸屏的第五块区域被按下时,可以根据用户的需求来控制某几路线路的通断。 The RA0~RA4 pins of the microcontroller in Figure 1 are respectively connected to the Left, Down, Mid, Up, and Right pins of the touch screen circuit. When the first area of the touch screen is pressed, it controls the on-off of all lines; when the touch screen When the second, third, fourth, and fifth areas are pressed, respectively control the on-off of the corresponding one of the four lines; when the fifth area of the touch screen is pressed, it can be controlled according to the needs of the user On-off of certain routes.

红外遥控的操作也是类似。遥控上1-6分别代表触摸屏的六块区域。按下某一个按键,代表触摸屏上相应的区域被按下,控制相应的线路的通断。利用红外遥控可以更加方便的控制家电。 The operation of infrared remote control is also similar. 1-6 on the remote control represent six areas of the touch screen respectively. Pressing a button means that the corresponding area on the touch screen is pressed, and controls the on-off of the corresponding line. Using infrared remote control can control home appliances more conveniently.

具体电路实现步骤如下: The specific circuit implementation steps are as follows:

如图1所示,带红外遥控的触摸屏开关电路单片机PIC16F883,红外电路: As shown in Figure 1, the touch screen switch circuit with infrared remote control microcontroller PIC16F883, infrared circuit:

复位按键S1的一端和电容C3(10uF电解电容)的负端都与地连接,二极管(IN4148)的N端和电阻R1(10KΩ)的一端都与5V 电压连接,复位按键S1的另一端、电容C3的正端、二极管的P端和电阻R1的另一端都与电阻R2(1KΩ)的一端连接,电阻R2的另一端与单片机PIC16F883的MCLR脚连接,单片机PIC16F883的RA0脚与触摸屏的Left脚连接,单片机PIC16F883的RA1脚与触摸屏的Down脚连接,单片机PIC16F883的RA2脚与触摸屏的Mid脚连接,单片机PIC16F883的RA3脚与触摸屏的Up脚连接,单片机PIC16F883的RA4脚与触摸屏的Right脚连接,电容C1(22pF)的一端和电容C2(22pF)的一端都与地连接,晶振Y(12M)的一端和电容C1的另一端都与单片机PIC16F883的OSC1脚连接,晶振Y的另一端和电容C2的另一端都与单片机PIC16F883的OSC2脚连接。 One end of the reset button S1 and the negative end of the capacitor C3 (10uF electrolytic capacitor) are both connected to the ground, the N end of the diode (IN4148) and one end of the resistor R1 (10KΩ) are connected to the 5V voltage, the other end of the reset button S1, the capacitor The positive end of C3, the P end of the diode and the other end of the resistor R1 are all connected to one end of the resistor R2 (1KΩ), the other end of the resistor R2 is connected to the MCLR pin of the single-chip microcomputer PIC16F883, and the RA0 pin of the single-chip microcomputer PIC16F883 is connected to the Left pin of the touch screen , the RA1 pin of the single-chip microcomputer PIC16F883 is connected with the Down pin of the touch screen, the RA2 pin of the single-chip microcomputer PIC16F883 is connected with the Mid pin of the touch screen, the RA3 pin of the single-chip microcomputer PIC16F883 is connected with the Up pin of the touch screen, the RA4 pin of the single-chip microcomputer PIC16F883 is connected with the Right pin of the touch screen, and the capacitor One end of C1 (22pF) and one end of capacitor C2 (22pF) are connected to the ground, one end of the crystal oscillator Y (12M) and the other end of capacitor C1 are connected to the OSC1 pin of the microcontroller PIC16F883, the other end of the crystal oscillator Y is connected to the capacitor C2 The other end is connected with the OSC2 pin of the microcontroller PIC16F883.

如图2背光电路包括发光二极管L1、发光二极管L2、发光二极管L3、发光二极管L4、发光二极管L5、发光二极管L6、电阻R3、电阻R4、电阻R5、电阻R6、电阻R7和电阻R8,其中电阻R3~R8的电阻值均为510Ω。 As shown in Figure 2, the backlight circuit includes LED L1, LED L2, LED L3, LED L4, LED L5, LED L6, resistor R3, resistor R4, resistor R5, resistor R6, resistor R7 and resistor R8, wherein the resistor The resistance values of R3~R8 are all 510Ω.

电阻R3的一端与单片机PIC16F883的RB2脚连接,电阻R4的一端与单片机PIC16F883的RB3脚连接,电阻R5的一端与单片机PIC16F883的RB4脚连接,电阻R6的一端与单片机PIC16F883的RB5脚连接,电阻R7的一端与单片机PIC16F883的RB6脚连接,电阻R8的一端与单片机PIC16F883的RB7脚连接,电阻R3的另一端与发光二极管L1的正端连接,电阻R4的另一端与发光二极管L2的正端连接,电阻R5的另一端与发光二极管L3的正端连接,电阻R6的另一端与发光二极管L4的正端连接,电阻R7的另一端与发光二极管L5的正端连接,电阻R8的另一端与发光二极管L6的正端连接,发光二极管L1的负端、发光二极管L2的负端、发光二极管L3的负端、发光二极管L4的负端、发光二极管L5的负端和发光二极管L6的负端都与地连接。 One end of the resistor R3 is connected to the RB2 pin of the single-chip microcomputer PIC16F883, one end of the resistor R4 is connected to the RB3 pin of the single-chip microcomputer PIC16F883, one end of the resistor R5 is connected to the RB4 pin of the single-chip microcomputer PIC16F883, one end of the resistor R6 is connected to the RB5 pin of the single-chip microcomputer PIC16F883, and the resistor R7 One end of the resistor R8 is connected to the RB6 pin of the single-chip microcomputer PIC16F883, one end of the resistor R8 is connected to the RB7 pin of the single-chip microcomputer PIC16F883, the other end of the resistor R3 is connected to the positive end of the light-emitting diode L1, and the other end of the resistor R4 is connected to the positive end of the light-emitting diode L2. The other end of the resistor R5 is connected to the positive end of the light-emitting diode L3, the other end of the resistor R6 is connected to the positive end of the light-emitting diode L4, the other end of the resistor R7 is connected to the positive end of the light-emitting diode L5, and the other end of the resistor R8 is connected to the positive end of the light-emitting diode The positive terminal of L6 is connected, the negative terminal of LED L1, the negative terminal of LED L2, the negative terminal of LED L3, the negative terminal of LED L4, the negative terminal of LED L5 and the negative terminal of LED L6 are all connected to the ground connect.

继电器驱动电路包括电阻R9(1KΩ)、电阻R10(1KΩ)、电阻R11(1KΩ)、电阻R12(1KΩ)、NPN型三极管Q1(IN9013)、NPN型三极管Q2(IN9013)、NPN型三极管Q3(IN9013)、NPN型三极管Q4(IN9013)、二极管D2(IN4148)、二极管D3(IN4148)、二极管D4(IN4148)、二极管D5(IN4148)、继电器K1(SRD-S-124D)、继电器K2(SRD-S-124D)、继电器K3(SRD-S-124D)和继电器K4(SRD-S-124D)。 Relay driving circuit includes resistor R9 (1KΩ), resistor R10 (1KΩ), resistor R11 (1KΩ), resistor R12 (1KΩ), NPN transistor Q1 (IN9013), NPN transistor Q2 (IN9013), NPN transistor Q3 (IN9013 ), NPN transistor Q4 (IN9013), diode D2 (IN4148), diode D3 (IN4148), diode D4 (IN4148), diode D5 (IN4148), relay K1 (SRD-S-124D), relay K2 (SRD-S -124D), Relay K3 (SRD-S-124D) and Relay K4 (SRD-S-124D).

电阻R9的一端与单片机PIC16F883的RC0脚连接,电阻R9的另一端与NPN型三极管Q1的基极连接,二极管D2的负端和继电器K1的4脚都与24V的电源连接,二极管D2的正端和继电器K1的5脚都与NPN型三极管Q1的集电极连接, NPN型三极管Q1的发射极与地连接,继电器K1的1脚与输出火线L1连接,继电器K1的3脚与输入火线Lin连接。电阻R10的一端与单片机PIC16F883的RC1脚连接,电阻R10的另一端与NPN型三极管Q2的基极连接,二极管D3的负端和继电器K2的4脚都与24V的电源连接,二极管D3的正端和继电器K2的5脚都与NPN型三极管Q2的集电极连接, NPN型三极管Q2的发射极与地连接,继电器K2的1脚与输出火线L2连接,继电器K2的3脚与输入火线Lin连接。电阻R11的一端与单片机PIC16F883的RC2脚连接,电阻R11的另一端与NPN型三极管Q3的基极连接,二极管D4的负端和继电器K3的4脚都与24V的电源连接,二极管D4的正端和继电器K3的5脚都与NPN型三极管Q3的集电极连接, NPN型三极管Q3的发射极与地连接,继电器K3的1脚与输出火线L3连接,继电器K3的3脚与输入火线Lin连接。电阻R12的一端与单片机PIC16F883的RC3脚连接,电阻R12的另一端与NPN型三极管Q4的基极连接,二极管D5的负端和继电器K4的4脚都与24V的电源连接,二极管D5的正端和继电器K4的5脚都与NPN型三极管Q4的集电极连接, NPN型三极管Q4的发射极与地连接,继电器K4的1脚与输出火线L4连接,继电器K4的3脚与输入火线Lin连接。 One end of the resistor R9 is connected to the RC0 pin of the microcontroller PIC16F883, the other end of the resistor R9 is connected to the base of the NPN transistor Q1, the negative end of the diode D2 and the 4 pins of the relay K1 are connected to the 24V power supply, and the positive end of the diode D2 Both pin 5 of the relay K1 are connected to the collector of the NPN transistor Q1, the emitter of the NPN transistor Q1 is connected to the ground, pin 1 of the relay K1 is connected to the output live wire L1, and pin 3 of the relay K1 is connected to the input live wire Lin. One end of the resistor R10 is connected to the RC1 pin of the microcontroller PIC16F883, the other end of the resistor R10 is connected to the base of the NPN transistor Q2, the negative end of the diode D3 and the 4 pin of the relay K2 are connected to the 24V power supply, and the positive end of the diode D3 Both pin 5 of the relay K2 are connected to the collector of the NPN transistor Q2, the emitter of the NPN transistor Q2 is connected to the ground, pin 1 of the relay K2 is connected to the output live wire L2, and pin 3 of the relay K2 is connected to the input live wire Lin. One end of the resistor R11 is connected to the RC2 pin of the microcontroller PIC16F883, the other end of the resistor R11 is connected to the base of the NPN transistor Q3, the negative end of the diode D4 and the 4 pin of the relay K3 are connected to the 24V power supply, and the positive end of the diode D4 Both pin 5 of the relay K3 are connected to the collector of the NPN transistor Q3, the emitter of the NPN transistor Q3 is connected to the ground, pin 1 of the relay K3 is connected to the output live wire L3, and pin 3 of the relay K3 is connected to the input live wire Lin. One end of the resistor R12 is connected to the RC3 pin of the microcontroller PIC16F883, the other end of the resistor R12 is connected to the base of the NPN transistor Q4, the negative end of the diode D5 and the 4th pin of the relay K4 are connected to the 24V power supply, and the positive end of the diode D5 Both pin 5 of the relay K4 are connected to the collector of the NPN transistor Q4, the emitter of the NPN transistor Q4 is connected to the ground, pin 1 of the relay K4 is connected to the output live wire L4, and pin 3 of the relay K4 is connected to the input live wire Lin.

红外电路包括红外接收头U2(HD0038)。红外接收头U2的Sin端与单片机PIC16F883的RB0脚连接,红外接收头U2的GND端与地连接,红外接收头U2的VCC端与5V电源连接。 The infrared circuit includes the infrared receiving head U2 (HD0038). The Sin end of the infrared receiving head U2 is connected to the RB0 pin of the microcontroller PIC16F883, the GND end of the infrared receiving head U2 is connected to the ground, and the VCC end of the infrared receiving head U2 is connected to the 5V power supply.

该电路的工作过程如下: The working process of this circuit is as follows:

    通过单片机PIC16F883控制,分别让单片机PIC16F883的RA0脚和RA4脚输出高低电平,检测RA1脚、RA2脚和RA3脚的电平高低。当单片机PIC16F883的RA0脚输出高电平,RA4脚输出低电平,如果RA1脚检测到高电平,表示触摸屏的左下区域被按下,RB4脚输出的PWM波就会从低占空比变为高占空比,发光二极管L3从暗变亮,或者RB4脚输出的PWM波就会从高占空比变为低占空比,发光二极管L3从亮变暗;如果RA2脚检测到高电平,表示触摸屏的左中区域被按下,RB3脚输出的PWM波就会从低占空比变为高占空比,发光二极管L2从暗变亮,或者RB3脚输出的PWM波就会从高占空比变为低占空比,发光二极管L2从亮变暗;如果RA3脚检测到高电平,表示触摸屏的左上区域被按下,RB2脚输出的PWM波就会从低占空比变为高占空比,发光二极管L1从暗变亮,或者RB2脚输出的PWM波就会从高占空比变为低占空比,发光二极管L1从亮变暗。当单片机PIC16F883的RA0脚输出低电平,RA4脚输出高电平,如果RA1脚检测到高电平,表示触摸屏的右下区域被按下,RB7脚输出的PWM波就会从低占空比变为高占空比,发光二极管L6从暗变亮,或者RB7脚输出的PWM波就会从高占空比变为低占空比,发光二极管L6从亮变暗;如果RA2脚检测到高电平,表示触摸屏的右中区域被按下,RB6脚输出的PWM波就会从低占空比变为高占空比,发光二极管L5从暗变亮,或者RB6脚输出的PWM波就会从高占空比变为低占空比,发光二极管L5从亮变暗;如果RA3脚检测到高电平,表示触摸屏的右上区域被按下,RB5脚输出的PWM波就会从低占空比变为高占空比,发光二极管L4从暗变亮,或者RB5脚输出的PWM波就会从高占空比变为低占空比,发光二极管L4从亮变暗。 Through the control of the single-chip microcomputer PIC16F883, let the RA0 pin and RA4 pin of the single-chip microcomputer PIC16F883 output high and low levels respectively, and detect the level of the RA1 pin, RA2 pin and RA3 pin. When the RA0 pin of the microcontroller PIC16F883 outputs a high level, and the RA4 pin outputs a low level, if the RA1 pin detects a high level, it means that the lower left area of the touch screen is pressed, and the PWM wave output by the RB4 pin will change from a low duty cycle to For a high duty cycle, the LED L3 changes from dark to bright, or the PWM wave output by the RB4 pin changes from a high duty cycle to a low duty cycle, and the LED L3 changes from bright to dark; if the RA2 pin detects a high voltage Flat, which means that the left middle area of the touch screen is pressed, the PWM wave output by RB3 pin will change from low duty cycle to high duty cycle, and the light-emitting diode L2 will change from dark to bright, or the PWM wave output by RB3 pin will change from The high duty cycle becomes low duty cycle, and the light-emitting diode L2 changes from bright to dark; if the RA3 pin detects a high level, it means that the upper left area of the touch screen is pressed, and the PWM wave output by the RB2 pin will change from low duty cycle to low. When the duty cycle becomes high, the LED L1 changes from dark to bright, or the PWM wave output by the RB2 pin changes from a high duty cycle to a low duty cycle, and the LED L1 changes from bright to dark. When the RA0 pin of the microcontroller PIC16F883 outputs a low level, and the RA4 pin outputs a high level, if the RA1 pin detects a high level, it means that the lower right area of the touch screen is pressed, and the PWM wave output by the RB7 pin will start from a low duty cycle. Change to a high duty cycle, the light-emitting diode L6 changes from dark to bright, or the PWM wave output by the RB7 pin changes from a high duty cycle to a low duty cycle, and the light-emitting diode L6 changes from bright to dark; if the RA2 pin detects a high Level, indicating that the right middle area of the touch screen is pressed, the PWM wave output by RB6 pin will change from low duty cycle to high duty cycle, and the light-emitting diode L5 will change from dark to bright, or the PWM wave output by RB6 pin will be From high duty cycle to low duty cycle, light-emitting diode L5 changes from bright to dark; if RA3 pin detects a high level, it means that the upper right area of the touch screen is pressed, and the PWM wave output by RB5 pin will change from low duty cycle to low duty cycle. When the duty ratio becomes high, the LED L4 changes from dark to bright, or the PWM wave output from the RB5 pin changes from a high duty cycle to a low duty cycle, and the LED L4 changes from bright to dark.

当触摸屏的一块区域被按下的时候,根据相应的功能,单片机PIC16F883的RC0脚、RC1脚、RC2脚和RC3脚就会输出高低电平,就能控制灯的开关。如果RC0脚输出高电平,NPN型三极管Q1导通,继电器K1吸合,L1和Lin导通,其所连接的灯具通电;如果RC0脚输出低电平,NPN型三极管Q1截止,继电器K1断开,L1和Lin断开,其所连接的灯具断电。 When an area of the touch screen is pressed, according to the corresponding function, the RC0 pin, RC1 pin, RC2 pin and RC3 pin of the microcontroller PIC16F883 will output high and low levels to control the switch of the light. If the RC0 pin outputs a high level, the NPN transistor Q1 is turned on, the relay K1 is closed, L1 and Lin are turned on, and the connected lamp is powered on; if the RC0 pin outputs a low level, the NPN transistor Q1 is cut off, and the relay K1 is turned off. Open, L1 and Lin are disconnected, and the connected lamps are powered off.

用红外遥控器对其进行操作时,单片机PIC16F883的RB0脚就会通过红外接收头U1得到相应的码制,经过单片机的解码,得知具体的操作是什么,然后进行相应的动作。 When using the infrared remote controller to operate it, the RB0 pin of the single-chip microcomputer PIC16F883 will get the corresponding code system through the infrared receiver U1, and after decoding by the single-chip microcomputer, it will know what the specific operation is, and then perform the corresponding action.

以上所述仅是本实用新型的优选实施方式,应当指出,对于本技术领域的普通技术人员,在不脱离本实用新型构思的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本实用新型的保护范围内。 The above is only a preferred embodiment of the present utility model, and it should be pointed out that for those of ordinary skill in the art, some improvements and modifications can also be made without departing from the concept of the present utility model. Should be regarded as within the protection scope of the present utility model.

Claims (7)

1. the touch-screen switch circuit with infrared remote control comprises single-chip microcomputer and crystal oscillating circuit, it is characterized in that, also comprises backlight circuit, touch screen circuitry, relay drive circuit and infrared circuit; Described touch screen circuitry, backlight circuit, relay drive circuit and infrared circuit link to each other with described single-chip microcomputer;
Described relay drive circuit has 4 and structure identical.
2. a kind of touch-screen switch circuit according to claim 1 with infrared remote control, it is characterized in that described backlight circuit comprises light-emitting diode L1, light-emitting diode L2, light-emitting diode L3, light-emitting diode L4, light-emitting diode L5, light-emitting diode L6, resistance R 3, resistance R 4, resistance R 5, resistance R 6, resistance R 7 and resistance R 8; Described resistance R 3 one ends link to each other with light-emitting diode L1; Described resistance R 4 one ends link to each other with light-emitting diode L2; Described resistance R 5 one ends link to each other with light-emitting diode L3; Described resistance R 6 one ends link to each other with light-emitting diode L4; Described resistance R 7 one ends link to each other with light-emitting diode L5; Described resistance R 8 one ends link to each other with light-emitting diode L6; The other end ground connection of described light-emitting diode L1, light-emitting diode L2, light-emitting diode L3, light-emitting diode L4, light-emitting diode L5, light-emitting diode L6; The other end of described resistance R 3, R4, R5, R6 and R7 links to each other with the RB2 ~ RB7 pin of described single-chip microcomputer respectively.
3. a kind of touch-screen switch circuit with infrared remote control according to claim 1 is characterized in that, described relay drive circuit comprises resistance R 9, NPN type triode Q1, diode D2, relay K 1; Described resistance R 9 one ends link to each other with the base stage of described triode Q1, and the other end links to each other with the corresponding pin of single-chip microcomputer; The collector electrode of described triode Q1 links to each other with the anode of described diode D2 and No. 5 pin of described relay K 1; The grounded emitter of described triode Q1; No. 4 pin of the negative terminal of described diode D2 and described relay K 1 all connect power supply; No. 1 pin of described relay K 1 links to each other with output live wire L1, and No. 3 pin links to each other with input live wire Lin.
4. a kind of touch-screen switch circuit according to claim 1 with infrared remote control, it is characterized in that described infrared circuit comprises infrared receiving terminal U2, the sin end of described infrared receiving terminal U2 links to each other with the RB0 pin of single-chip microcomputer, the GND end links to each other with ground, and the VCC end links to each other with power supply.
5. a kind of touch-screen switch circuit with infrared remote control according to claim 1 is characterized in that, described single-chip microcomputer adopts the PIC16F883 single-chip microcomputer.
6. a kind of touch-screen switch circuit with infrared remote control according to claim 2 is characterized in that the resistance value of described resistance R 3, resistance R 4, resistance R 5, resistance R 6, resistance R 7 and resistance R 8 is 510 Ω.
7. a kind of touch-screen switch circuit according to claim 3 with infrared remote control, it is characterized in that described resistance R 9 is 1K Ω, described triode Q1 adopts the IN9013 triode, described diode D2 adopts the IN4148 diode, and described relay K 1 adopts the SRD-S-124D relay.
CN2011201054392U 2011-04-12 2011-04-12 Touch screen switching circuit with infrared remote control Expired - Fee Related CN202077005U (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011201054392U CN202077005U (en) 2011-04-12 2011-04-12 Touch screen switching circuit with infrared remote control

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011201054392U CN202077005U (en) 2011-04-12 2011-04-12 Touch screen switching circuit with infrared remote control

Publications (1)

Publication Number Publication Date
CN202077005U true CN202077005U (en) 2011-12-14

Family

ID=45115081

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011201054392U Expired - Fee Related CN202077005U (en) 2011-04-12 2011-04-12 Touch screen switching circuit with infrared remote control

Country Status (1)

Country Link
CN (1) CN202077005U (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102946244A (en) * 2012-11-11 2013-02-27 国家电网公司 Touch switch for household electric appliance
CN103021149A (en) * 2012-11-29 2013-04-03 余姚亿威电子科技有限公司 Wireless encoding and decoding remote controller based on singlechip
CN105656466A (en) * 2015-12-30 2016-06-08 苏州博众精工科技有限公司 Control circuit based on switching action of triode
CN106505540A (en) * 2016-12-20 2017-03-15 奉化市慧光太阳能科技有限公司 Battery lamp load short-circuit protection circuit

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102946244A (en) * 2012-11-11 2013-02-27 国家电网公司 Touch switch for household electric appliance
CN103021149A (en) * 2012-11-29 2013-04-03 余姚亿威电子科技有限公司 Wireless encoding and decoding remote controller based on singlechip
CN103021149B (en) * 2012-11-29 2016-12-21 余姚亿威电子科技有限公司 A kind of remote controller of SCM Based wireless encoding decoding
CN105656466A (en) * 2015-12-30 2016-06-08 苏州博众精工科技有限公司 Control circuit based on switching action of triode
CN106505540A (en) * 2016-12-20 2017-03-15 奉化市慧光太阳能科技有限公司 Battery lamp load short-circuit protection circuit

Similar Documents

Publication Publication Date Title
CN202077005U (en) Touch screen switching circuit with infrared remote control
CN206283690U (en) A kind of indoor illumination based on Bluetooth control
CN205782278U (en) Multifunctional intelligent desk lamp
CN203015240U (en) Classroom light intelligence control system
CN207571515U (en) A kind of off-line type Environmental-protecting dust-removing controller
CN205942485U (en) Greenhouse control device based on mobile terminal
CN204373229U (en) A kind of Intelligent warm air blower control circuit
CN204178160U (en) A kind of comprehensive Smart Home
CN203277860U (en) Laboratory and household remote control energy-saving timing socket
CN207557719U (en) A kind of online Environmental-protecting dust-removing controller
CN202617084U (en) Crystal glass universal touch remote control switch
CN104881980B (en) A kind of visual touch screen intelligent remote control device and its control method
CN204669677U (en) A kind of multi-functional led desk lamp On line switch
WO2015058609A1 (en) Timing controller
CN202475847U (en) Led decorative lamp switch control circuit
TWM620953U (en) Intelligent energy-saving control device
CN201344498Y (en) Dual-purpose switch
CN203896569U (en) Actuator applicable to EnOcean switch
CN202634391U (en) Laser remote control switch
CN203368848U (en) Intelligent socket lamp
CN218482989U (en) Control circuit of lighting lamp capable of learning and memorizing remote controller of household appliance
CN206497326U (en) A kind of intelligent switch
CN202679725U (en) Infrared intelligent switch desk lamp
CN215181609U (en) Intelligent temperature control circuit of electric oven
CN209462622U (en) A kind of control switch of new electrically heating waistband

Legal Events

Date Code Title Description
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20111214

Termination date: 20140412