走马观花

Infrared light communication device

 
Overview

Preface

     This design is the winning entry of the China University of Science and Technology of China School Competition, and it has well completed the parameter indicators required by the competition question.

team introduction

     All members are from China Jiliang University and are undergraduate students in the class of 2020. Two of them are majoring in electronic information engineering and one is majoring in communication engineering.

Question requirements

    Design and build a mixed signal transmission communication device based on infrared light. The infrared optical communication device uses infrared light emitting tubes and infrared light receiving tubes as transceiver devices to transmit signals in a directional manner. The transmission distance is 2m, and the received sound has no obvious distortion. Add a digital channel to transmit the ambient temperature of the transmitter in real time and display it on the receiver. The digital signal transmission delay does not exceed 10s. The temperature measurement error does not exceed 2℃. Voice signals and digital signals can be transmitted simultaneously. Then design and make an infrared optical communication relay forwarding node to change the communication direction by 90° and extend the communication distance by 2m.

Question analysis

    According to the competition title, the signal required to be transmitted can be input by a microphone or audio jack line, or by a low-frequency signal source; the frequency range is 300~3400Hz. The sound received should be without obvious distortion. When the input voice signal at the transmitter is changed to an 800Hz single tone signal, the effective value of the output voltage of the receiving device is not less than 0.4V on an 8Ω resistive load. Without changing the circuit state, reduce the amplitude of the input signal at the transmitter to 0V, and use a low-frequency millivolt meter to measure the noise voltage at the output of the receiving device at this time. The reading should not be greater than 0.1V. At the same time, a digital channel must be added to transmit the ambient temperature of the transmitter in real time. The design of the infrared optical communication relay forwarding node is similar to the transmitting part and the receiving part. The overall block diagram of the system is shown in the figure below.

Schematic circuit design

1. Overall circuit framework design

 

 

2.Microphone circuit

3. Adding circuit

4. Infrared transmitter circuit

5. Infrared receiving and amplifying circuit

 

6. Filter circuit

 High pass filter circuit

 low pass filter circuit

7. Demodulation circuit

 

8. Power amplifier circuit

 

Software description

  The main code is as follows. 
Emit some code blocks:
#include "delay.h"
#include "sys.h"
#include "led.h"
#include "lcd_init.h"
#include "lcd.h"
#include "pic.h"
#include " usart.h"
#include "ds18b20.h"
#include "ad9833.h"
#include "HMI.h" ;
char tjcstr[100];
static u8 flag;
int main(void)

    u16 tem[1];
    u16 temperature ;
    float temp,temp1,temperature_ture;
    float t=0;
    delay_init(168);
    uart_init(4800);
    OLED_Init();
    LED_Init();//LED initialization
    LED0=0;
    
    
    while(1) 
    {    
        delay_ms(50);
        if (DS18B20_Init() == 0)
    {temperature_ture=DS18B20_Get_Temp()/10;
        temperature = DS18B20_Get_Temp()-200;
        USART_SendData(USART1,temperature);
        
    }
        
    }
Receive
part of the code block:

#include "stm32f10x.h"                  // Device header
#include "Delay.h"
#include "Timer.h"
#include "lcd_init.h"
#include "lcd.h"
#include "pic.h"
#include "Key.h"
#include "usart.h"

int main(void)
{
 u32 temp=0; 
    u16 get_tempareture,get_tempareture_z,get_tempareture_x;
 NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);//Set interrupt priority group 2 //Delay function initialization     
    uart_init(4800);
    LCD_Init();//LCD initialization
    LCD_Fill(0,0,240,40,GRAY);
    LCD_Fill(0,40,120,240,LGRAY);
    LCD_Fill(120,40,240,240,LBBLUE);
    LCD_ShowChinese(0,40,"Current Temperature",BLACK,LGRAY,32,0);
    while (1)
{    
    get_tempareture = USART_ReceiveData(USART1)+200;
    get_tempareture_z=get_tempareture/10;
    get_tempareture_x= get_tempareture%10;
    if(get_tempareture<400)
    {LCD_ShowIntNum(140,40,get_tempareture_z,2,BLACK,LBBLUE,32);
    LCD_ShowString (175,40,".",BLACK,LBBLUE,32,0);
    LCD_ShowIntNum(186,40,get_tempareture_x,1,BLACK,LBBLUE,32);
    LCD_ShowChinese(202,40,"℃",BLACK,LBBLUE,32 ,0);
    }
  }
}



Physical display

 

Demo video

    see attached.

参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-05-10 10:09:33
  • How women from different countries react when their skirts are scratched
  • Have you ever seen tigers in Northeast China?
  • data verification failed at address 0x0?
  • How to connect to PDA using ActiveSync in Platform Builder 5.0
  • About the difference in the use of opamp in Proteustexoac natoa opamp library
  • Wince serial port programming

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号