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.
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.
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.
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.
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
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);
}
}
}
see attached.
All reference designs on this site are sourced from major semiconductor manufacturers or collected online for learning and research. The copyright belongs to the semiconductor manufacturer or the original author. If you believe that the reference design of this site infringes upon your relevant rights and interests, please send us a rights notice. As a neutral platform service provider, we will take measures to delete the relevant content in accordance with relevant laws after receiving the relevant notice from the rights holder. Please send relevant notifications to email: bbs_service@eeworld.com.cn.
It is your responsibility to test the circuit yourself and determine its suitability for you. EEWorld will not be liable for direct, indirect, special, incidental, consequential or punitive damages arising from any cause or anything connected to any reference design used.
Supported by EEWorld Datasheet