I made an infrared remote control relay. As for the purpose, I originally made it to remotely control the light in the room, put it in the light switch or next to the light, and put the remote control on my bed.
Of course you can use it elsewhere, you can make the most of your imagination.
material:
1K 10K 100 ohms 4.7K resistors each
IN4007 diode one
10~30pf ceramic capacitors
11.0592M crystal oscillator one (for other crystals, the program has to be changed a bit, I have written in the program, positive and negative 1M should be no problem)
51 single-chip microcomputer (specifically, what model to choose, the smaller the better, I only have STC89C52 on hand, big head, many pins, do this a little waste, but there is no way) (STC12C2052 seems to be very consistent)
One-chip stand
S8550 triode one
5V relay one
LED
10uf electrolytic capacitor
HS0038 integrated infrared receiving tube
Waste remote control (38K carrier, otherwise HS0038 can not be identified)
As for the use of infrared instead of wireless modules, the biggest reason is the cost, but also to some extent reduce the threshold and cost of production.
Blue environmentally friendly etchant bought online, with a small amount of water
Do not draw the printer yourself. If you feel ugly, you can draw with a ruler.
Oily pen, this kind of stroke can definitely do how to draw on the copper clad board, it is very fast, and it saves the trouble of using computer to draw PCB and no printer. The key point is that it will not be dissolved by water after drying.
Put it in the etchant, after a while, the heating can be faster
Corrosion is complete, remove, dissolve the ink with alcohol, then rinse with water
This is the circuit part, the P3. is connected to the microcontroller pin (I did not specifically write P3 points in the figure), my P3.2 is connected to the infrared detection, P3.7 is connected to the LED, P3.6 is connected to the relay, When you do it, you decide which pin to use. Finally, you only need to modify the program. I have comments in it.
The HS0038 raised one facing itself, from left to right, the output, GND, VCC. The relay itself has an indicated pin.
LED is to visually see the relay status, high and low level and relay consistent
These two are my test circuit, practice test to ensure that the circuit is available
The crystal oscillator is removed on the circuit board, and the capacitor is directly soldered on the upper side.
This is my own soldering, which is a bit different from the board I made before. Temporary changes are possible. This is one of the versions, which is a bit large and can't be put into the socket. . .
I made another version. This time it is modular. The single-chip microcomputer is better. So I started by asking you to choose a single-chip microcomputer. I only have this kind of thing. I can only do this. There are still a lot of IO ports that are useless. wasted. The electronic components can be hidden under the MCU, and the smaller the better.
The circuit board above the used mobile phone charger, output 5V, power supply for the microcontroller
Since the switches at home are quite new, the rest don't dare to continue, because they have to dig holes to expose the infrared receiver. Therefore, it can only be installed next to the lamp. It will be practiced in the next day. It will not be demonstrated here. It is quite simple. I believe everyone’s ability, do not forget to do insulation treatment in the switch, use black tape to wrap it, 220v into the microcontroller, the consequences are not Dare to imagine. A relay can only control one way, and the hot line is selected by itself.
My family has two remote controls, all of which can be used, but their user codes are different. I don't have user code recognition in the program. Just the key code is enough. As for how to get the key code, I already think of a good way.
The program is below, P1 port is the key code, the high level is 1, the low level is 0, P1.7 is the highest bit, p1.0 is the lowest bit, and then the eight bits are taken in turn. These eight bits are binary and converted into decimal. Is the button code
You can make a running light, the circuit is as follows
Here is not bright for 1, bright for 0, using 330 ohms for current limiting (you can also use a multimeter directly, or just one LED one by one, don't forget to limit current), infrared input Still p3.2
If you don't recognize it, take a few more shots against the infrared. No response, either the circuit is faulty, or the remote control is not a 38K carrier.
The end
Follow Me
Of course you can use it elsewhere, you can make the most of your imagination.
material:
1K 10K 100 ohms 4.7K resistors each
IN4007 diode one
10~30pf ceramic capacitors
11.0592M crystal oscillator one (for other crystals, the program has to be changed a bit, I have written in the program, positive and negative 1M should be no problem)
51 single-chip microcomputer (specifically, what model to choose, the smaller the better, I only have STC89C52 on hand, big head, many pins, do this a little waste, but there is no way) (STC12C2052 seems to be very consistent)
One-chip stand
S8550 triode one
5V relay one
LED
10uf electrolytic capacitor
HS0038 integrated infrared receiving tube
Waste remote control (38K carrier, otherwise HS0038 can not be identified)
As for the use of infrared instead of wireless modules, the biggest reason is the cost, but also to some extent reduce the threshold and cost of production.
Blue environmentally friendly etchant bought online, with a small amount of water
Do not draw the printer yourself. If you feel ugly, you can draw with a ruler.
Oily pen, this kind of stroke can definitely do how to draw on the copper clad board, it is very fast, and it saves the trouble of using computer to draw PCB and no printer. The key point is that it will not be dissolved by water after drying.
Put it in the etchant, after a while, the heating can be faster
Corrosion is complete, remove, dissolve the ink with alcohol, then rinse with water
This is the circuit part, the P3. is connected to the microcontroller pin (I did not specifically write P3 points in the figure), my P3.2 is connected to the infrared detection, P3.7 is connected to the LED, P3.6 is connected to the relay, When you do it, you decide which pin to use. Finally, you only need to modify the program. I have comments in it.
The HS0038 raised one facing itself, from left to right, the output, GND, VCC. The relay itself has an indicated pin.
LED is to visually see the relay status, high and low level and relay consistent
These two are my test circuit, practice test to ensure that the circuit is available
The crystal oscillator is removed on the circuit board, and the capacitor is directly soldered on the upper side.
This is my own soldering, which is a bit different from the board I made before. Temporary changes are possible. This is one of the versions, which is a bit large and can't be put into the socket. . .
I made another version. This time it is modular. The single-chip microcomputer is better. So I started by asking you to choose a single-chip microcomputer. I only have this kind of thing. I can only do this. There are still a lot of IO ports that are useless. wasted. The electronic components can be hidden under the MCU, and the smaller the better.
The circuit board above the used mobile phone charger, output 5V, power supply for the microcontroller
Since the switches at home are quite new, the rest don't dare to continue, because they have to dig holes to expose the infrared receiver. Therefore, it can only be installed next to the lamp. It will be practiced in the next day. It will not be demonstrated here. It is quite simple. I believe everyone’s ability, do not forget to do insulation treatment in the switch, use black tape to wrap it, 220v into the microcontroller, the consequences are not Dare to imagine. A relay can only control one way, and the hot line is selected by itself.
My family has two remote controls, all of which can be used, but their user codes are different. I don't have user code recognition in the program. Just the key code is enough. As for how to get the key code, I already think of a good way.
The program is below, P1 port is the key code, the high level is 1, the low level is 0, P1.7 is the highest bit, p1.0 is the lowest bit, and then the eight bits are taken in turn. These eight bits are binary and converted into decimal. Is the button code
You can make a running light, the circuit is as follows
Here is not bright for 1, bright for 0, using 330 ohms for current limiting (you can also use a multimeter directly, or just one LED one by one, don't forget to limit current), infrared input Still p3.2
If you don't recognize it, take a few more shots against the infrared. No response, either the circuit is faulty, or the remote control is not a 38K carrier.
The end
Follow Me
Link:Tenco
没有评论:
发表评论