Difference between revisions of "Lesson 9--Microduino Infrared Transcoding"

From Microduino Wiki
Jump to: navigation, search
(Created page with "{{Language|第九课--Microduino 红外转码}} {| style="width: 800px;" |- | ==Objective== This lesson will use the TV remote control electric water heater, to achieve infrar...")
 
 
(3 intermediate revisions by 2 users not shown)
Line 10: Line 10:
  
 
*'''[[Microduino-FT232R]]'''
 
*'''[[Microduino-FT232R]]'''
Download program module, connects with Microduino-Core or Microduino-Core+ directly, and communicates with PC. It uses MicroUSB, so Microduino is very samll, just like one yuan coin. The download cable is the same with mobile USB cable, easy to use.
+
Download program module, connects with Microduino-Core or Microduino-Core+ directly, and communicates with PC. It uses MicroUSB, so Microduino is very small, just like one yuan coin. The download cable is the same with mobile USB cable, easy to use.
  
 
*Other hardware equipment
 
*Other hardware equipment
Line 23: Line 23:
  
 
==Debug==
 
==Debug==
 +
Download program:
 +
https://github.com/Microduino/Microduino_Tutorials/tree/master/Microduino_Advanced/Microduino_Infrared_transcoding
 +
 
===Prepare Work===
 
===Prepare Work===
Step 1:Set up infrated receive and send board
+
Step 1: Set up infrared receive and send board
*Requsted hardware:Infrared transmitting tube, infrared receiver, resistor, pegboard, row needls.
+
*Requsted hardware:Infrared transmitting tube, infrared receiver, resistor, pegboard, row needles.
  
 
[[File:Infrared_1.jpg|800px|thumb|center|Microduino-Infrared]]
 
[[File:Infrared_1.jpg|800px|thumb|center|Microduino-Infrared]]
Line 40: Line 43:
 
Step 2:Infrared decoding
 
Step 2:Infrared decoding
  
Download example program:
+
Download example program:
 
You can use serial port the check the decoding value for example program. Or run the IRecvDemo program in IRremote library and use serial to observe. You need change the infrared receive pin "RECV_PIN+11" to your own pin. In our example program, A3 is used, so need change to "RECV_PIN = A3".
 
You can use serial port the check the decoding value for example program. Or run the IRecvDemo program in IRremote library and use serial to observe. You need change the infrared receive pin "RECV_PIN+11" to your own pin. In our example program, A3 is used, so need change to "RECV_PIN = A3".
  
Line 56: Line 59:
  
 
*Step 3:Program debug
 
*Step 3:Program debug
Player can change program accroding to actual condiction.
+
Player can change program according to actual condition.
 
*Use the bread board to set tup circuit, infrared receive and send pin can be defined by yourself, the send pin is D3.
 
*Use the bread board to set tup circuit, infrared receive and send pin can be defined by yourself, the send pin is D3.
 
*The decoding value of some hardware, such as refrigerators, air conditioners is stored into function hongwaisend().
 
*The decoding value of some hardware, such as refrigerators, air conditioners is stored into function hongwaisend().
*Other remote control's decoding valuse is stored in function hongwaikong().
+
*Other remote control's decoding valuce is stored in function hongwaikong().
 
*After compiled, select correct board to download.
 
*After compiled, select correct board to download.
*Finished download, you can test the infrare decoding control function.
+
*Finished download, you can test the infrared decoding control function.
  
==Resutl==
+
==Result==
 
use the TV remote control to control electric water heater, fully realize the function of infrared transcoding. Players can design according to yourself circumstance.
 
use the TV remote control to control electric water heater, fully realize the function of infrared transcoding. Players can design according to yourself circumstance.
 
==Note==
 
==Note==
Line 70: Line 73:
 
*Pay attention to the send pin connection, just like the LED.
 
*Pay attention to the send pin connection, just like the LED.
 
==Video==
 
==Video==
http://v.youku.com/v_show/id_XNjgwNzMyOTc2.html
+
 
 
|}
 
|}

Latest revision as of 08:05, 12 September 2016

Language: English  • 中文

Objective

This lesson will use the TV remote control electric water heater, to achieve infrared transcoding functions.

Equipment

Microduino-Core is a 8-bit microcontroller development board using Atmel ATmega328P, ATmega168PA as core, which is an opened and Arduino UNO compatible controller module.

Download program module, connects with Microduino-Core or Microduino-Core+ directly, and communicates with PC. It uses MicroUSB, so Microduino is very small, just like one yuan coin. The download cable is the same with mobile USB cable, easy to use.

  • Other hardware equipment
    • USB Data cable one
    • The infrared receiver two
    • Infrared transmitting tube two
    • 470Ω resistor two
    • Infrared remote control two
    • Pegboard one
    • Row needles
    • LED one

Debug

Download program: https://github.com/Microduino/Microduino_Tutorials/tree/master/Microduino_Advanced/Microduino_Infrared_transcoding

Prepare Work

Step 1: Set up infrared receive and send board

  • Requsted hardware:Infrared transmitting tube, infrared receiver, resistor, pegboard, row needles.
Microduino-Infrared
  • Welding Schematic
Microduino-Infrared
  • Welding hardware. Infrared light is invisible to the naked eye, use a LED lights to indicate, and use program to control.
Microduino-Infrared
Microduino-Infrared


Step 2:Infrared decoding

Download example program: You can use serial port the check the decoding value for example program. Or run the IRecvDemo program in IRremote library and use serial to observe. You need change the infrared receive pin "RECV_PIN+11" to your own pin. In our example program, A3 is used, so need change to "RECV_PIN = A3".

  • Haier remote control decoding key value
Microduino-Infrared
  • Home TV remote control decoding
Microduino-Infrared
  • Store the decoding value to Excel file and easy to convert
Microduino-Infrared
  • Step 3:Program debug

Player can change program according to actual condition.

  • Use the bread board to set tup circuit, infrared receive and send pin can be defined by yourself, the send pin is D3.
  • The decoding value of some hardware, such as refrigerators, air conditioners is stored into function hongwaisend().
  • Other remote control's decoding valuce is stored in function hongwaikong().
  • After compiled, select correct board to download.
  • Finished download, you can test the infrared decoding control function.

Result

use the TV remote control to control electric water heater, fully realize the function of infrared transcoding. Players can design according to yourself circumstance.

Note

  • Can't use for all of the remote control, some remote control with special code can't be transcoded.
  • Define infrared send and receive pin.
  • Pay attention to the send pin connection, just like the LED.

Video