王达业

# Fifth Lichuang Electronic Design Competition #Intelligent anti-electric shock safety socket

 
Overview

Note: * is required.

[Please fill in during the registration stage↓]   1. Self/Team Introduction I have been working as an electronic engineer in the beauty equipment and small household appliances industry for many years and can use a variety of drawing software. And can program various brands of MCU. Have a deep understanding of the concept of product safety awareness.   2. Briefly introduce the project. There are many home smart product solutions and products now. As far as I know, most of the current home products are related to solving the problem of comfortable life, but few of them are based on the premise of safety as production products. Therefore, combined with the current personal thinking, we make an intelligent anti-shock safety socket that is controlled based on safety. [Please fill in during the competition stage↓]   1. Describe the project details. The main functions of the project are: no output due to short circuit, overload protection, leakage protection, power output can be turned off by unplugging the plug and power cord during or without voltage output, power cord L, N The socket cannot control power transmission when both ends are not plugged in, thus effectively preventing previous accidents.   2. Describe the challenges faced by the project and the problems it solves. How to turn off the power output regardless of whether there is electric output or not when the power cord is unplugged, so the capacitive touch sensing method on the top of the socket is used for practice. But the problem arises from another phenomenon. The closing of the relay will cause the induction value to change. Therefore, a real-time segmented self-correction method is used in the debugging program. It can be cold-drawn or hot-drawn with or without power to achieve power-off output. . * 3. Describe the key points involved in the hardware and software parts of the project: hardware leakage detection and protection: picture.png overload current detection and hardware control: picture.png hardware protection mechanism circuit, using capacitive isolation control relay, using PWM bootstrap boost to turn on the NMOS tube: picture.png overload , Leakage hardware self-locking function circuit, the ERROR network in the schematic diagram is a hardware self-locking path, and the software is configured to use overload and leakage detection to control the two networks AC_EN and RT_EN in the above figure to cut off all power output channel components Circuit: picture.png cold drawing or hot drawing mark code, please see the attachment for other details.

/**********************
*
*获取电线插头标志
*
***********************/
bool touch_adc_channel_switch = 0;
bool touch_adc_channel_switch_flag = 0;
uint8_t touch_adc_check_count = 0;
uint8_t touch_adc_check_reset_count = 0;

bool GET_SOCKET_FLAG(void){
bool temp_flag = touch_adc_channel_switch_flag;

if(GET_ADC_SWITCH_FLAG(TOUCH_ADC_CHANNEL)){
   SET_ADC_SWITCH_FLAG(TOUCH_ADC_CHANNEL,0);

   touch_temp_value = (uint16_t)GET_ADC_DATA(TOUCH_ADC_CHANNEL)*0.8058f;

if(!touch_adc_channel_switch_flag){
if((touch_adc_value > (touch_temp_value + 5))  ){ //&& ((touch_adc_value - touch_temp_value) > touch_adc_check_value)
temp_flag = 1;
touch_adc_channel_switch_flag = temp_flag;
}
}
if(touch_adc_channel_switch_flag){
  if(!line_contact_flag){
if((touch_temp_value > (touch_adc_value + 5)) && ((touch_temp_value - (touch_adc_value + 5)) >= 5)){
temp_flag = 0;
touch_adc_channel_switch_flag = temp_flag;
}
}else{
    if((touch_temp_value > touch_adc_value) ){ //&& ((touch_temp_value - touch_adc_value) > 2)
temp_flag = 0;
touch_adc_channel_switch_flag = temp_flag;
}
}
}

if(!touch_adc_channel_switch){
//touch_temp_value = (uint16_t)GET_ADC_DATA(TOUCH_ADC_CHANNEL)*0.8058f;
touch_adc_channel_switch = 1;
}else if(touch_adc_channel_switch){
touch_adc_channel_switch = 0;

if(!line_contact_flag ){
touch_adc_value = touch_temp_value;
touch_adc_check_reset_count = 0;
}

touch_adc_check_count++;
if(touch_adc_check_count >= 30){
touch_adc_check_value = 10;
touch_adc_check_count = 30;
}
}

}

if(temp_flag){
  gd_eval_led_on(LED3);
}else{
  gd_eval_led_off(LED3);
}

return  temp_flag;
}

In order to prevent the relay contacts from sparking, the relay is turned on first with a delay and then the optocoupler is turned on. When turned off, the optocoupler is turned off first and then the relay is turned off with a delay. The code is as follows: uint16_t delay_time = 0;

void POWER_SWITCH(bool en){ if(en){ RT_PWR_SWITCH(en); RT_EN(en); if(delay_time >= 1000){ delay_time = 0; } delay_time++; if(delay_time >= 3){ AC_EN(en); //Delay off optocoupler delay_time = 30; } }else{ if(delay_time >= 30){ delay_time = 0; } AC_EN(en); delay_time++; if(delay_time >= 3){ RT_PWR_SWITCH(en); // Delay off relay RT_EN(en); delay_time = 2000; } } } * 4. Project material list display

  5. Upload project pictures 5.1. Print the competition logo picture on the PCB. Failure to do so will be considered as giving up the competition      IMG_20200920_231527.jpg           5.2. Other pictures of the project IMG_20200920_231729.jpgIMG_20200920_231606.jpgIMG_20200920_231813.jpg    6. Demonstrate your project and record it as a video for upload 6.1. Video upload to the official website of the competition 6.2. Video title and link at Station B

Notes: ①: Video requirements: Please shoot horizontally, the resolution is no less than 1280×720, the format is Mp4/Mov, the size of a single video is limited to 100M; ②: Video upload: please upload to the official website of the competition and Station B simultaneously ( www .bilibili.com ), the top 10 most popular projects at Station B will receive a cash reward of 1,000-5,000 yuan, and other uploaded projects will receive a 100-yuan Lichuang Mall no-threshold coupon; ③: Video title: The 5th Lichuang Electronic Design Competition: {Project Name }-{Video module name}; such as the 5th Lichuang Electronic Design Competition: "Autonomous Driving" project - team introduction. https://www.bilibili.com/video/BV1Wy4y1k7jj?from=search&seid=7230078652676511060   7. Is it publicly released for the first time? 7.1. If the project has been published or won an award before, please explain. 7.2. If the project is optimized on the original basis, please explain. Optimization part   8. Open source document intelligent anti-shock safety socket program * 9. References

Click the link for more details: https://www.szlcsc.com/go/dsxq

参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-05-23 01:21:57

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号