I have been studying PCB these days and happened to have a lot of idle USB sockets on hand (actually I bought a bunch of them to add USB ports to the router), so I came up with the idea of making a USB HUB. After all, it requires relatively few components. It’s also a relatively simple project. So I started copying boards online and found an ancient USB2.0 project based on SL2.1A. In order to keep up with the times, I changed the original micro usb to type-c, and the original various chip capacitors were changed to plug-in types. Even the fuse has been removed directly, and the crystal oscillator patch has been changed from a 4-pin patch to a plug-in type. All this is for the convenience of soldering under the conditions of only electric iron and solder.
Based on the lessons learned from the failure of the 6-pin welding of type-c in the previous LED project, for this type-c with more than a dozen pins, ordinary electric iron and solder cannot handle it, so we decisively replaced it with directly soldered ones. type-c small board. Then there is the problem of the shell. I used an ABS plastic box before, but the thickness was too thick and difficult to process. I finally decided to use a 90mm*60mm (the hole position is 7mm from the center to the edge, the diameter is 4mm, something worth two or three yuan) Acrylic board as the shell (this thing was originally sold online as a display board. If a novice does not have a suitable shell, you can consider it. When designing the PCB according to the size of the acrylic, you need to ask the merchant about the distance and diameter of the magnet hole from the edge. Follow-up All my pcb sizes are based on this. The advantage is that pcb boards of this size are free from Jialichuang (the default is 100*100mm). The other 4 strong magnet positions can be directly drilled, which is much more convenient. Of course, I will consider it later. SMD components + solder paste + air gun + constant temperature heating table + 3D printer can solve all your worries. For now, forget it.
Back to the topic, a simple USB HUB is too monotonous, and the desktop is a bit messy. I unconsciously came up with some ideas, why not make a USB HUB that integrates various functions. The previously idle OLED clock based on esp8266 has been added, and it has a sense of technology, which is quite impressive. Well, then there is the running water lamp. The esp8266 has various idle pins, so there is no need to waste too much, so I directly used an LED lamp to be driven by the esp8266 (D5-D8) as a marquee. In fact, the main reason was that there were too many idle LEDs before. Adding another circuit indicator light is just to consume too many LEDs, and one less one is one.
Then there is the power supply problem of esp8266. We can't finally plug in two data lines, that would be too troublesome. So I removed a micro usb data cable and connected it directly and there was no problem. Okay, with esp8266, how can we lose intelligent control, so we added a USB female socket (only for power supply), and used esp8266 (D4) to remotely control the USB switch. The USB can be connected to a small light or something (note The 5V power supply port of ESP8266 has problems with the voltage being less than 5V or the current being too small. Devices that require regular USB need to change the PCB diagram and use TYPE-C (the voltage is 5V). Okay, now we have 3 functions, OLED weather clock, LED high imitation running water lamp, remote control USB switch (the code has not been added yet, you need to explore it by yourself).
If you want to place it vertically (so you can easily view the OLED), the USB port must face upward. In this case, the screen needs to be flipped, and you can just comment out two statements in the program .
// display.flipScreenVertically(); //The screen is reversed, there are two items that need to be commented out.
Relevant dimensions and points of attention
1. Acrylic plate, 60mm*90mm, rounded rectangle, the hole position is 7mm from the center to the edge, and the diameter is 4mm.
2. The size of the PCB through hole is 3mm in diameter, and the hole position is 7mm from the center to the edge. (For commonly used M3 studs)
3. The distance between the two sockets of the esp8266 mini d1 on the PCB is eight 2.54 spaces.
4. Type-C has pins instead of strips. It was too troublesome to redesign so I didn’t change it. The pins should be about 12mm away from the edge so that the type-c board can fit perfectly.
5. The 5V power supply port of ESP8266 has problems with the voltage being less than 5V or the current being too small. Devices that require conventional USB need to change the PCB diagram. The positive pole of the power supply of the USB female socket (power supply only) should be changed to the voltage of TYPE-C 5V.
6. The two large pin soldering holes of the default USB female socket for stability are round, too large, unsightly and inconvenient. It is recommended to change them to rectangular ones.
7. Weld the two outermost female headers first, otherwise they will be easily welded crooked.
The V9 version has corrected the above existing problems and changed the components to SMD components.
Link address: V9 version
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