Project Description
No development required! Ready to use
75*50*16mm ultra-small size four-way IoT smart switch
IoT switch based on PSF-B04-596928A
Project Features
1. The PSF-B04 module is used. The module is small in size, has simple peripheral circuits, and complete front-end and back-end matching. It saves a lot of configuration processes and is easy to use.
(The mall has stopped selling and can be purchased through third-party platforms)
2. In order to ensure the miniaturization of the final PCB volume as much as possible and to separate the high and low pressures, two PCBs are used for design.
The upper layer is four button switches and low-voltage circuits such as main control and power supply. Larger patch buttons are selected for easy use.
The lower layer is four relays and drive circuits.
3. Using three sets of 2*2 and two sets of 1*2 female/pin rows, the connection between the upper and lower layers is quick, simple and convenient.
The height of the relay is 15.8mm. The height of a single female header is 8.5mm. Two equal female headers are connected by pin headers.
In order to ensure good contact, each group uses two 2*2 female headers, connected diagonally, and connected on both sides respectively.
To ensure the structural stability of the connection, the three sets of female headers are placed in a triangular position, and two sets of GND are added to ensure The stability of the connection structure
- Reserved - 5v input pad, later connected to an external 220-5V ACDC step-down circuit to achieve power supply
- Reserved - 433 remote control pad, later external wireless remote control can be used to achieve short-distance remote control without network
Function description
Control four relays through PSF-B04 to realize switching control of electrical circuits
A variety of control methods can be realized, and the relay can be controlled in various modes such as timing, self-locking, and interlocking.

layout design
Because an upper and lower PCB design is used, the first thing to consider is the connection and fixation of the upper and lower boards.
I chose a female header and pin header design that can take into account both. By reading the technical manual, I can know the height of the relay and the height of the female seat.
After calculation, the height of the two female bases is just similar to the height of the relay, and the solution is feasible (during later selection, it was found that there were 17mm long pin rows, so an alternative solution was added)
Since 220V high-voltage electricity is used, be careful not to pour copper underneath the relay. At the same time, slot holes should be made in adjacent plug-ins to prevent electricity creepage.

The main control module integrates a ceramic antenna, which saves a lot of space. At the same time, pay attention to the layout position and dig grooves in the PCB below to prevent it from affecting its working performance.

Each button has a one-to-one correspondence with the status indicator light, making it easy to observe the relay status, and the selected direct plug-in LED can facilitate the later design of the housing.

Project log
200806--Project approval and construction of the project
200807--Select the main control and draw the schematic diagram
200809--Complete PCB design and determine upper and lower board structures
200811--Optimize the wiring and PCB shape, optimize the position of the upper and lower board sockets, change some device selections, remove the optocoupler according to the teacher's suggestion, but retain the 8050 drive method, which will have little impact on the later replacement of 3124 (probably)
200813--Buy original parts and place an order for pcb manufacturing
200815--Create a visual BOM file (upload the attachment later)
200817-- Update project description, optimize layout, upload attachments, re-optimize slots near relays and terminals, adjust some silk screens, original parts have arrived, PCB is expected to arrive on the 18th
200823--Improved the project description, added a demonstration video, corrected two wiring sequences, corrected the location of the typec interface, fine-tuned the placement of the original resistors and capacitors, and updated the scope of the copper laying area