1.Product Introduction
PSF-B04 is a 4-channel ultra-low-power Wi-Fi switch module based on ESP8285. It’s specially designed for mobile devices and Internet of Things applications with the most competitive package size and ultra-low energy consumption technology in the industry. Connecting users’ devices to the Wi-Fi wireless network for remote or local area network communication to achieve networking. This module can be used as a switch control for 4 household appliances. Either it can be controlled by the device button, or remotely controlled by connecting to APP (eWeLink).
PSF-B04 has various packaging methods, and the antenna supports ceramic antennas. It can be widely used in smart grid, smart transportation, smart home, handheld devices, industrial control and other fields.
Product Features:
- Built-in 32bit MCU, and can double as an application processor
- Support wireless 802.11 b/g/n standard
- Wi-Fi @2.4 GHz, support WPA/WPA2 security mode
- +20.5dBm maximum outputpower in 802.11b mode
- Support devicebutton control
- Support timer schedule
- Support Wi-Fi remote control
- Support compatible pairing mode /quickpairing mode
- Support OTA upgrade
2.Electrical Characteristics
2.1 Rated parameters
Conditions: VDD=3.3V±10% , GND=0V; test at room temperature 25°C.
Type | Parameters |
Model | PSF-B04 |
Main chip | ESP8285 |
Hardware interface | UART, GPIO |
Operating Voltage | 2.7V~3.6V |
GPIO drive capability | Max: 12mA |
Working current | Average current: ≈80mA , Maximum working current: 210mAStandby: <200uA |
Operating temperature | 0℃~45℃ |
Storage condition | Temperature: -10℃~75℃ , Relative humidity: 20%RH~80%RH |
Wireless network type | STA/AP/STA+AP |
Encryption mechanism | WEP/WPA-PSK/WPA2-PSK |
Encryption type | WEP64/WEP128/TKIP/AES |
Firmware upgrade | OTA remote upgrade |
2.2 Wi-Fi parameters
Conditions: VDD=3.3V±10% , GND=0V ; test at room temperature 25°C.
Type | Parameters |
Wireless standard | IEEE 802.11b/g/n |
Frequency range | 2.412GHz-2.484GHz |
Transmit power | 802.11b: 20±2dBm (@11Mbps) 802.11g: 17±2dBm (@54Mbps) 802.11n: 14±2dBm (@HT 20, MCS 7) |
Receiving sensitivity | 802.11b: -91 dBm (@11 Mbps, CCK) 802.11g: -75 dBm (@54Mbps, OFDM) 802.11n: -72 dBm (MCS7) |
Antenna type | Ceramic patch antenna |
3.Module Type and Pin Definition
3.1 Module type
PSF-B04 top view
3.2 Sequence of pin arrangement
PSF-B04 module provides 4-channel switch control interface, Wi-Fi status light interface, UART serial port.
Top view of module pins:
Bottom view of module pins:
3.3. Pin definition
Pin definition and function description
Pin | Name | Features |
1 | ANT | Wi-Fi Antenna Note: PSF-B04 cannot be used |
2 | ADC | ADC interface, input range: 0-1V |
3 | EN | Chip enable terminal high level: valid; low level: closed.Note: An external pull-up resistor of 1~10K, connect a 100nF capacitor to the ground. |
4 | GPIO16 | Main switch for 4-channel pin, active low. APP configuration pin, when the low level> 5S, enter the pairing mode. |
5 | GPIO14 | The switch for the fourth channel pin, active low. APP configuration pin, when the low level> 5S, enter the pairing mode. |
6 | GPIO12 | The relay switch for the first channel: active high, power-on default low level. Note: As a switch button, there will be a period of high level at the moment of power-on, which requires a pull-down (1~4.7K) resistor to ground. |
7 | STATUS | Wi-Fi status indicator light, connect LED in series with current limiting resistor to 3V3 |
8 | GPIO15 | The relay switch for the fourth channel, active low. APP configuration pin, when the low level> 5S, enter the pairing mode. Note: The chip configuration pin needs to pull down (1~4.7K) resistor to ground. |
9 | GPIO2 | Used to program flash UART1_TX |
10 | GPIO0 | The switch for the first channel, active low. APP configuration pin, when the low level> 5S, enter the pairing mode. |
11 | GPIO4 | The relay switch for the third channel, active high, power-on default low level. |
12 | GND | GND |
13 | GPIO9 | The switch for the second channel, active low. APP configuration pin, when the low level> 5S, enter the pairing mode. |
14 | GPIO10 | The switch for the third channel, active low. APP configuration pin, when the low level> 5S, enter the pairing mode. |
15 | GPIO11 | NC |
16 | GPIO6 | NC |
17 | GPIO7 | NC |
18 | GPIO8 | NC |
19 | GPIO5 | The relay switch for the second channel, active high, power-on default low level. |
20 | GND | GND |
21 | RX | Used to program flash UART_RX |
22 | TX | Used to program flash UART_TX |
23 | 3V3 | Power supply |
24 | RST | External reset signal: active at low level, externally need to pull up a 10K resistor to 3.3V, and connect a 100nF capacitor to ground. |
4.Function Description
4.1. Module function
PSF-B04 module can be used as a 4-channel switch, which can control the switch locally or remotely through APP.
The following is the function description:
- Pairingmethod: quick pairing mode / compatible pairing mode.
Press and hold the button (IO0 pull-down, default high level) for more than 5s to enter the quick pairing mode. When it is in the quick pairing mode, press the button for more than 5s again to enter the compatible pairing mode. APP can be configured in both modes. Please refer to 4.3 for details of the configuration method.
- Switch:
- In the normal state: click the button (pull down any IO port of 4 channels for more than 100ms) to control the relay on and off (four relay switches corresponding IO port output high/low level)
- In the pairing mode: click the button to exit the pairing mode.
- Timer: including single, count down, repeat, and loop timer, see details in 4.5.
- Power-on status configuration: The power-on switch status can be configured on or off through the APP, and the default power-on status is off.
4.2. Wi-Fi status indicator light description
The flashing mode of the Wi-Fi status light on the device represents the its current network working status. The specific status includes the following seven types:
The flashing of the Wi-Fi status light is in a cycle of 2 seconds, as shown in the figure, the low-level light is on and the high-level light is off. Detailed explanation of each status:
- Normal: The device is working normally and the connection to the cloud server is normal.The device can be only controlled through the APP in this mode.
- NO Wi-Fi: The device cannot connect to the router.
- No Server: The device has been connected to the router, but it cannot connect to the server (also known as”cannot access the Internet”).
- Unregistered: The device has not been bound to account. The device needs to be bound to the eWeLink account to connect to the cloud server. You can bind the device by tap “Add Device” in the eWeLink APP.
- Upgrade: Indicates that the device is upgrading the firmware.
- Setting G1: Indicates that the device is in compatible pairing mode. The device obtains the necessary information provided by the APP to join the service network, including router SSID, password, server IP, port number, etc in the setting mode.
- Setting G2: Indicates that the device is in quick pairing mode. The device obtains the necessary information provided by the APP to join the service network, including router SSID, password, server IP, port number, etc in the setting mode.
The device obtains information in different ways in the two modes, read below section for details.
4.3 The Wi-Fi module basic workflow
- Configuration
- Compatible pairing mode: The mobile terminal joins the device AP as a station to form a local area network to realize data interaction. When the device is in the quick pairing mode (G state, see details in 4.2 Wi-Fi status indicator light description), press and hold the pairing button for 5S, the device enters the compatible pairing mode. Click “add device” on the eWeLink APP, connect the device hot spot in the phone setting page manually with SSID: ITEA 10000XXXX and password12345678 to connect the device to the Internet.
- Quick pairing mode: The Wi-Fi module is in promiscuous mode, and the encrypted message containing information such as SSID and password from the mobile terminal is obtained by empty packet capture. The device enters the quick pairing mode by pressing the pairing button for 5S when it is in the A~D flashing modes. Click “add device” on the eWeLink APP, enter the SSID and password of the router to connect the device to the Internet.
- Online
The module goes through the following process from power-on to connecting to the server:
- Join the configured router and connect to the Internet.
- Connect to the server.
- Register the device and bind it to the eWeLink account.
- Obtain device application parameters and stay online.
When the connection/acquisition fails in the above steps, there are corresponding back-off strategies and reconnection mechanisms to ensure that the device is stable and keep online.
- Upgrade
The module connects to the upgrade server, downloads and updates to the latest version of the firmware to realizes the online upgrade of the device.
4.4 Timer function
The timer function is configured through the APP, and the timer is divided into the following four types:
- Single timer: executeat a specified time.
- Count downtimer: execute after the setting time.
- Repeattimer: repeat the operation every week.
4.5 Timer function description
PSF-B04 supports timer. The eWeLink APP provides four timing modes to facilitate the use in more scenarios.
- Single timer: This is the most common timing setting, allowing users to set the work schedule of the device. For example, turn on/off the device at 8:30 am every Wednesday, etc. It is similar to the setting of an alarm clock, timing is very convenient to use especially for devices that are repeatedly running at certain moments.
- Count downtimer: The count down is to facilitate the user to perform one-time timing operations, such as turn on/off the device after 30 minutes. It is very convenient to turn off a device after running a period of time. This device supports up to 24 hours of count down.
- Repeat timer: Repeat the operation every week. For example, set an alarm clock for working time. After the time is set, select execute dates (a week optional), and the alarm clock will turn on at the set time within the selected days.
5.Wi-FiRadio Frequency Index
Conditions: VDD=3.3V±10% , GND=0V ; test at room temperature 25°C.
Description | Minimum | Typical value | Max | Unit |
Input frequency | 2412 | - | 2484 | MHz |
Output impedance | - | 50 | - | Ω |
Input reflection | - | - | -10 | dB |
PA output peak valuepower when at 72.2Mbps | 15.5 | 16.5 | 17.5 | dBm |
PA output peak value power in 802.11b mode | 19.5 | 20.5 | 21.5 | dBm |
5.1 Sensitivity
Description | Typical value | Unit mA |
CCK 1Mbps | -98 | dBm |
CCK 11Mbps | -91 | dBm |
6Mbps(1/2BPSK) | -93 | dBm |
54 Mbps (3/4 64-QAM) | -75 | dBm |
HT20, MCS7 (65Mbps,72.2Mbps) | -72 | dBm |
5.2 Adjacent frequency suppression
Description | Typical value | Unit mA |
OFDM, 6Mbps | 37 | dB |
OFDM, 54Mbps | 21 | dB |
HT20, MCS0 | 37 | dB |
HT20, MCS7 | 20 | dB |
Note:
- 2Mbps is measured in the 802.11n mode, the MCS =7, the GI = 200uS.
- Up to + 21.5dBm output powerin 11b mode.
6.PCB Design
Precautions for PCB layout and module layout:
- Pay attention to the placement of the module during PCB layout, especially the antenna part of the module, as far as possible away from interference sources: magnetic components (such as motors,inductance, transformers, etc.), high-frequency signal devices (such as crystal oscillators, high-frequency clock signals, etc.).
- The upper and lower layers of the PCB where the module is placed should not be routed as much as possible. Do the copper-clad processing, and the PCB from the module antenna to the nearest pin of the module should be hollowed out as much as possible.
- The module PCB antenna area and the 15 mm extension area need to be clear (copper, trace on the board, and component placement are strictly prohibited), refer to the following figure:
- Place the module’s power supply (VCC) pin capacitance and other module pin capacitances, resistors as close as possible to the module pins, and the tracepath should be short.
7.Packaging Information
Package size diagram:
PSF-B04 connected with the relay module does not turn on, only disconnecting the output to the 4th channel allows to start. How to solve this problem?
When the module starts, PIN8 should keep low level until the module starts
Pin #7 STATUS – which ESP GPIO is?
I have a unit that is stuck in interlock mode (only one relay will energize at a time). Is there a way to disable on the PCB?
Push 20sec the pushbutton belowe the pcb. Thuis Will disable the interlock function. Worked with both of my boards.
Hello, I bought this today, and I can’t make it work.. First, how can I add the led to the STATUS pin? I only got 0.20V from there. How can I incrase the voltage? I don’t really understand the description for this. . Thanks for the answer!