elleny

[Training Camp_Advanced Class] Intelligent WIFI verification board based on Alibaba Cloud

 
Overview

-----------------------------------------------Update 1228---- -------------------------------------------------- -------------------------------------------------- ----------------------------- Version 2.0 is here: https://oshwhub.com/logan0279/tu-ya-wu-lian-wang-cha -zuo -----------------------------------------------Update 0823-- -------------------------------------------------- -------------------------------------------------- -------------------------- The company has been very busy these days and has no time to make further updates. Fortunately, the networking is basically smooth and the relay control It's normal, but there is a problem with the ADC voltage collection circuit, and the voltage data cannot be collected normally. We are currently checking the information, and we plan to update the 2.0 version later. For now, please submit your homework according to this version. I can't expect to be evaluated. I learned a lot from this advanced class and gained a deeper understanding of some electronic components. I would like to express my special thanks to Lichuang for organizing this event, as well as all the teachers and students. In addition, the attachment is updated with a demonstration video and the KEIL C51 source code of this project. The core code part is copied from Teacher Lingyao. -----------------------------------------------Update 0818---- -------------------------------------------------- -------------------------------------------------- -------------------------- I optimized the code in the morning, and now everything is going smoothly with the network distribution, but I have been busy these days and have no time to do more. I'll update it later when I have time. The cover picture was changed to a physical picture. The green flying wires are powered by the CH340E chip. The original design was wrong and the 340E could not work properly, and there was a problem of current flowing back into the MCU. This was solved by flying wires and adding resistors. -----------------------------------------------Update 0817---- -------------------------------------------------- -------------------------------------------------- -------------------------- In addition to the current backflow phenomenon encountered before, new problems have also been encountered. The network distribution has not been smooth. After being reminded by classmates in the group, after adding the AP network distribution command, the network was finally successfully configured. However, a new problem arose at the same time. After the network distribution was successful, the MCU repeatedly restarted in an infinite loop. After investigation, I found out that in the WIFI_MessageFun function, after the WIFI network is successfully configured, there will be an action to restart the MCU. After the MCU restarts, it will re-configure the network. After the network distribution is successful, it will send a message that the network distribution is successful. The MCU that receives the network distribution success message will restart again, thus entering an infinite loop state. --------------------------------------------0815 Three updates: -- -------------------------------------------------- -------------------------------------------------- ------------------- When copying the teacher's USB to TTL circuit, the meaning of the resistor added to the communication line was not clear, so I did not choose the 330 ohm resistor used by the teacher. , but choose the 120 ohm resistor you have on hand. However, in actual use, combined with the following description, although the program can be burned, it is still unstable. So I replaced the existing 470 ohm resistor on hand and then tested it. The burning was much normal. In actual use, after the LDO is enabled and grounded, the LDO outputs a voltage of 0V. However, the communication line with USB and WIFI in the MCU part will generate backflow current, which will cause the MCU to be unable to reset normally, so a larger current limit is used. When using a resistor, the current flow during current backflow can be limited, thereby reducing the impact of current backflow on MCU reset.

--------------------------------------------------0815 Second update-- -------------------------------------------------- -------------------------------------------------- -------------------- After some advice from friends, I tried to change the power supply voltage of 340 to 3.3V, and removed the capacitor from the V3 pin and connected it directly to the power supply. The program can be burned normally. However, after pressing the LDO enable button, it can be measured that the voltage difference between the MCU's Vcc and GND is still about 2.0V. When the 340 uses a 5V supply voltage, after the LDO is enabled and grounded, the voltage difference between VCC and GND is measured. When the difference is 2.0V, the program cannot be programmed normally. After investigation, in the original schematic diagram, the V3 pin of the 340 was connected to a capacitor, but not to VCC. As a result, the V3 pin did not actually work and the 340 chip did not work properly. After reconnecting V3 to the 5V power supply and adding the capacitor, the programming process can be normal. --------------------------------------------------0815 First update -------------------------------------------------- -------------------------------------------------- ------------------- The hardware circuit has overturned. The LDO supplies the MCU part. After pressing the tact switch, the power cannot be effectively cut off. According to analysis by students in the group, the reason is the reverse power supply of TXD in the WIFI and USB parts. After removing the corresponding resistors, there is still a voltage difference of about 0.6V between the MCU VCC and GND. After cutting off the LDO supply to the MCU, and then pressing the touch switch, the LDO output is still 3V. The CH340E TXD and RXD outputs are measured to be about 4.5V. It gives me a headache... According to the relay isolation control method in the schematic diagram, for the STC8A8K64S4A12 chip, the IO I chose is P35. Its default working mode is quasi-bidirectional mode and the output is high level. However, due to the internal quasi-bidirectional mode of STC There is a pull-up resistor, which is a weak pull-up. Its current output capability is very weak, so it cannot saturate the optocoupler and conduct, causing the transistor to cut off and the relay to enter the pull-in state. -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- --------------------------------------- 0812 update, some summaries and tips: BOM list LED2 is an ordinary 5 mm light-emitting diode, not the red and green two-color LED described in the schematic diagram. I mainly have a batch of red and green LEDs on hand, so when I drew the schematic diagram, I randomly selected a 5mm LED and drew it. The LED indication part of the relay should use SMD LEDs, which can occupy a smaller area. The PCB layout adopts the proximity principle for each device, and the layout is not very beautiful. For example, the two tact switches are scattered and the selection is also different. The distance between the COM terminal of the K1 Relay and the freewheeling diode is relatively close, less than 2mm, and there is no slotted isolation, which poses a certain safety risk. Because I was in a hurry to hand in my homework, I didn't draw some of the circuits I originally conceived, and my patience was still insufficient. -------------------------------------------------- ----------------------------0811---------------------- -------------------------------------------------- ------------------------------- The power supply system uses a 220 to 5V switching power supply module. The LDO part is copied from the teacher's homework and uses AMS1117 respectively. -3.3 and ME6215C33M5G step down to power WIFI and MCU. The main control is: STC8A8K64SA12. I chose this one because I heard someone say on a forum that this ADC can have an external reference voltage, and the ADC is 12-bit and has relatively high accuracy. I plan to verify it. The display screen uses 0.91" OLED module IIC communication, a ready-made module that I bought on Taobao before. The voltage monitoring uses the resistor voltage dividing mode. The circuit part refers to the circuit of the Lichuang multimeter (LCSC530+), plus my own mold circuit Understand the design and verify the idea. The op amp chip uses LM358 universal op amp, and the circuit uses a follower circuit. Initially, it is planned to sample and monitor the load current. There are two options. One option is to use a current transformer (previously done It has been verified with a board). One is to use constantan wire resistors for series sampling. I also plan to refer to the circuit of the Lichuang multimeter. Because I work in a party, I only have very little free time every day and have no time to complete the circuit design and drawing board. So I gave up and tried to draw another one when I have the opportunity in the future. The load output part is controlled by a 5V relay and an optocoupler isolation control circuit. The output uses a three-interface screw terminal block, which can completely output NC, NO, and COM signals.

参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-05-18 11:32:16

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号