The power-saving mode (PSM) allows minimizing power consumption up to 0.4 µA in the sleep mode. Of course, attached sensors and peripherals should support power saving too.
Note: I cannot guarantee that the firmware will work correctly in your case because it greatly depends on a schematic of your DIY device. I exhort you to wash your DIY device in an ultrasonic cleaner because a small current leak may consume a battery.
The power-saving mode has the following limitations:
- GPIO input, the switch mode – the firmware detects ON and OFF states’ changes by a signal rising or falling edge. The CC2530 has a hardware limitation of this implementation. You can add only one switch on pin ranges P00..P07, P10..P13, P14..P17, P20..P23. Therefore, you can have up to four switches in your configuration. If you define a switch on a pin, you cannot use other pins in the corresponding range for other sensors because it may cause problems with detecting signal edges.
- You may use a board with an amplifier (for example, Ebyte E18, CC2530 + CC2592), but this combination of chips consumes about 180 mA in the active mode instead of 25 mA of CC2530.
- Some sensors are incompatible with PSM (for example, Pulse Generator, SenseAir8, Sensirion SPS30).
The following configuration options may help you to create your battery-powered device:
External wake-up – it is a special input type. It wakes up the chip from sleep mode and instructs it to send periodic reports immediately. After this, the chip stays active for 3 seconds and goes to PSM.
If the external wake-up option is selected on Input 1, the firmware also uses it as a system button and allows you to reset the device.
External sensor power control – it is a special output type. The firmware sets the configured output to the HIGH state before reading a sensor’s value and sets it to LOW after that. The CC2530 and CC2531 chips allow you to use pins P10 and P11 to supply power up to 20 ma to external sensors.
If your sensors require more power, you may use any output connected to an external transistor worked in the switch mode. Please, note the firmware sets all output to the LOW state when it transits to the sleep mode. Therefore the transistor should be switched off with the LOW control signal.
This output should be defined immediately before a controlled sensor or a group of sensors.
The LED indicator works differently in PSM if it is configured.
One short blink per four seconds – the device is connecting to a network.
Sporadic short blinks – the firmware indicates the following actions: clicks, switches, external wake-up signals, periodic reports.
Two short blinks – the firmware cannot send a report to a coordinator.
The firmware starts the pairing process immediately after flashing. It tries to connect for about 60 seconds. In case of an unsuccessful attempt, the firmware goes to sleep mode. If you need more time, you should configure the external wake-up input (for example, a button). The signal on that input extends the time for the next 60 seconds.
Power on, wait 2 seconds, power off, repeat this cycle three times. If the status LED is configured, it should light at a half-bright level for more than 2 seconds while the firmware initializes internal NVRAM memory.
If you selected GPIO or the external wake-up option on Input 1, it acts as a system button. You may click and hold it for 10 seconds. If the status LED is configured, it should light at a half-bright level after 10 seconds.