Build a Battery-Free Bluetooth-Enabled Wireless Switch for Smart Products

By Stephen Evanczuk

Contributed By Digi-Key's North American Editors

The rapid deployment of smart connected products has fueled a demand for wireless switches to facilitate connectivity. Being wireless, these switches eliminate the need to string additional wire and also allow for convenient placement. However, recent wireless switches are battery powered, adding cost and complexity to the design and forcing users to deal with battery replacement. The solution may lie in the form of inductive energy harvesting.

There are many sources of ambient energy including photons, RF energy, vibration, temperature differentials, and pressure. However, this article will describe an inductive energy harvesting reference design, combining parts from ON Semiconductor and ZF Electronics in a novel approach based on Bluetooth and the Eddystone open beacon protocol.

Together, the design and associated development kit will supply an ultra-low-power Bluetooth 5.0 module with all the power it needs to wirelessly signal a Bluetooth capable hub or smart product.

Ultra-low-power design

The ON Semiconductor BLE-SWITCH001-GEVB development kit combines a drop-in Bluetooth 5.0 module with an energy harvesting mechanical switch, providing developers with an immediate solution for a wireless switch and the foundation for custom wireless switch designs. In this design, a ZF Electronics AFIG-0007 inductive energy harvester provides sufficient energy to power an ON Semiconductor RSL10 Bluetooth 5 system-in-package (SiP) long enough to transmit Bluetooth low energy (BLE) beacons. Upon receipt of a beacon, a BLE capable receiver in a smart product or hub can perform the associated action to control a light, relay, or other device.

The key to this battery-free design lies in the ideal match that exists between the RSL10’s power requirements for beacon transmission and the AFIG-0007’s ability to generate sufficient energy to meet those requirements.

Designed to meet emerging demand for low-power wireless connectivity, the RSL10 module integrates multiple functional blocks to provide a complete Bluetooth 5 solution (Figure 1). For processing, the module includes both an Arm® Cortex®-M3 core for general purpose processing, and ON Semiconductor’s own LPDSP32 32-bit digital signal processor (DSP) core for specialized applications.

Diagram of ON Semiconductor’s RSL10 SiP module

Figure 1: ON Semiconductor’s RSL10 SiP module combines multiple functional blocks to provide a complete Bluetooth 5.0 solution while consuming minimal power. (Image source: ON Semiconductor)

The module supports these processors with multiple peripherals and memory, including 384 Kbytes of flash, 76 Kbytes of program memory, and 88 Kbytes of data memory. For Bluetooth communications, the module includes a 2.4 gigahertz (GHz) RF front-end that supports the Bluetooth physical layer (PHY) and a baseband controller that supports advanced Bluetooth 5.0 protocols.

Able to operate across a wide supply voltage range of 1.1 to 3.3 volts, the RSL10 consumes remarkably low levels of power. Using the Embedded Microprocessor Benchmark (EEMB) Consortium’s ULPMark ultra-low-power (ULP) benchmark, the RSL10 achieves an industry leading score of 1090 with a 3 volt supply, and 1360 when operating off a 2.1 volt supply.

In many wireless applications, however, the power required to support repetitive long-duration wireless transactions can test the limits of the most power efficient design. The ON Semiconductor reference design addresses the use of very short wireless transactions that are made possible using Bluetooth beacon protocols.

Beacons are short messages that follow Bluetooth Advertising protocols for broadcasting an identifier or other short piece of data to any available listener. Paired with specialized mobile apps, beacons have found widespread use in retail, entertainment, transportation and other public venues where a beacon might provide information related to the user’s location. The ON Semiconductor wireless switch design uses a special type of beacon called an Eddystone beacon.

Eddystone beacons follow an open standard that specifies the envelope and data payload associated with packets that are only a few bytes in length. For Eddystone beacons, payload formats can specify a unique ID (UUID), a URL, or different types of telemetry (TLM) data such as temperature (Figure 2).

Diagram of industry standard Eddystone format (click to enlarge)

Figure 2: The industry standard Eddystone format defines a beacon envelope and payload in only a few bytes. (Image source: ON Semiconductor)

On finding an Eddystone beacon, a receiving app can perform actions associated with that UUID, send the user to that URL, or respond appropriately to the telemetry data.

Energy harvesting supply source

Eddystone beacon transmissions can be as short as 10 milliseconds (ms), and with the ultra-low-power RSL10, the energy required to complete that transmission can be as little as 100 millijoules (mJ), which is well within the power generation capabilities of the AFIG-0007 energy harvester.

Within the AFIG-0007, a coil surrounds a metal core in contact with a magnetic block (Figure 3, left). When the user presses a spring-loaded actuator, the magnetic block shifts (Figure 3, right). This action reverses the polarity of the magnetic field through the wire coil, resulting in a pulse of electrical energy according to the principles of magnetic induction. Release of the actuator causes the magnetic block to spring back to its original position, resulting in another pulse of energy with the opposite polarity.

Diagam of ZF Electronics’ AFIG-0007 energy harvester

Figure 3: When the user presses an actuator built into ZF Electronics’ AFIG-0007 energy harvester, a magnetic block moves from its resting position (left) to its extended position (right), generating a pulse of energy with the initial push of the actuator and another with its release. (Image source: ZF Electronics)

With a life expectancy of 1,000,000 switching cycles, the 20 x 7 x 15 millimeter (mm) ZF matches key mechanical and physical requirements for wireless switch design. The AFIG-0007 also easily matches energy requirements for this design. With its ability to generate about 300 mJ with each press and release activation cycle, the ZF provides the RSL10 with sufficient power to transmit two or three Eddystone beacons. Besides these two parts, implementation of the wireless switch design requires only a few additional components to complete the energy harvesting power supply circuit.

The energy harvesting power supply design

Typically, energy harvesting supply circuits require combinations of voltage converters and coils to bring generated voltage levels to precise levels required by a microcontroller. For this design, the RSL10’s wide 1.1 to 3.3 volt supply range simplifies the supply circuit design. The output of the AFIG-007 is rectified by an NSR1030 Schottky full bridge rectifier and clamped with a simple circuit comprising an SZMM3Z6V2ST1G Zener diode, a filtering/storage capacitor (C1), and an NCP170 low dropout (LDO) regulator, all from ON Semiconductor (Figure 4).

Diagram of ON Semiconductor RSL10

Figure 4: Developers can power the ON Semiconductor RSL10 using a simple power supply circuit that clamps the rectified output from the ZF Electronics AFIG-007 energy harvester. (Image source: ON Semiconductor)

The ON Semiconductor BLE-SWITCH001-GEVB kit combines the AFIG-007 and the above supply circuit with the RSL10 on a 23 x 23 mm board (Figure 5).

Image of ON Semiconductor BLE-SWITCH001-GEVB board

Figure 5: The ON Semiconductor BLE-SWITCH001-GEVB board places the functional component on the center section of a 23 x 23 mm board (left). Detachable wings hold development interfaces, including a 10-pin JTAG interface accessible from the bottom (right). (Image source: ON Semiconductor)

While the 7 mm wide center section contains the core components, the detachable side wings provide development interfaces including a 10-pin JTAG/SWD interface for a standard adaptor, such as the Tag-Connect TC2050-IDC. Along with the 10-pin interface, the side wings provide headers for a jumper and an external 3.3 volt supply source (Vout) for programming and debugging using a connected JTAG programmer, such as the Segger Microcontroller Systems 8.16.28 J-LINK ULTRA+.

Switch development

The BLE-SWITCH001-GEVB board comes preloaded with firmware that transmits an Eddystone beacon every 20 ms until the system exhausts the energy from a single switch activation. For this sample application, the design first transmits an Eddystone-URL frame containing the URL ““. Following this initial frame, the design transmits Eddystone-TLM frames, which contain telemetry data including the switch’s supply voltage, its up time, and the total number of packets transmitted to date.

ON Semiconductor’s RSL10 Eddystone sample software illustrates the basic design patterns for building frames and transmitting them (Listing 1). As shown, developers call a function EddyService_Env_Initialize() to load an Eddystone environment struct, eddy_env_tag, with the payload for an Eddystone-URL frame. To send the beacon, developers call Eddy_GATTC_WriteReqInd() which builds the package, encrypts the data using the RSL10’s AES encryption accelerator, and then sends (ke_msg_send()) the message to a transmission queue. Lower service layers retrieve queued messages, build packets, and transmit them.

struct eddy_env_tag eddy_env;
void EddyService_Env_Initialize(void) {
       /* Reset the application manager environment */
       memset(&eddy_env, 0, sizeof(eddy_env));
       memcpy(eddy_env.advslotdata_value, (uint8_t[16] ) { 0x10, 0x03, 'o', 'n',
                                  's', 'e', 'm', 'i', '.', 'c', 'o', 'm', '/', 'i', 'd', 'k' },
       eddy_env.advtxpower_value = OUTPUT_POWER_DBM; /* Set radio output power of RF */
       valptr = (uint8_t *) &eddy_env.advtxpower_value;
       /* Enable and configure the base band block */
       /* Copy in the exchange memory */
       uint8_t plain_text[16];
       for (int i = 0; i<=15;i++)
              plain_text[i] = eddy_env.challenge_value[15-i];
       memcpy((void *) (EM_BLE_ENC_PLAIN_OFFSET + EM_BASE_ADDR), plain_text, 16);
       /* Configure the AES-128 engine for ciphering with the key and the memory
        * zone */
       uint8_t encryptionkey[16];
       for (int i = 0; i<=15;i++)
              encryptionkey[i] = eddy_env.lockstate_value[16-i];
       Sys_AES_Config((void *) encryptionkey, EM_BLE_ENC_PLAIN_OFFSET);
       /* Run AES-128 encryption block */
       /* Access to the cipher-text at EM_BLE_ENC_CIPHER_OFFSET address */
       uint8_t encryptedtext_temp[16];
       memcpy(&encryptedtext_temp[0], (void *) (EM_BLE_ENC_CIPHER_OFFSET + EM_BASE_ADDR), 16);
       uint8_t encryptedtext[16];
       for (int i = 0; i<=15;i++)
              encryptedtext[i] = encryptedtext_temp[15-i];
       if (!memcmp(encryptedtext, eddy_env.unlocktoken_value, 16))

Listing 1: ON Semiconductor sample code illustrates basic design patterns for defining the payload for an Eddystone-URL frame and sending the completed frame. (Code source: ON Semiconductor)

The transmitted beacons can be detected by any BLE-capable host in range or displayed on a nearby mobile device using a beacon app such as the ON Semiconductor RSL10 mobile app. To control devices with the wireless switch, developers can use the ON Semiconductor RSL10-based BDK-GEVK BLE IoT development kit to process beacons and perform associated actions. For example, developers can implement a light controlled with a wireless switch by combining the BDK-GEVK base board with the ON Semiconductor D−LED−B−GEVK dual LED ballast board. When designing motor driven applications, developers can combine the base board with ON Semiconductor’s BLDC-GEVK brushless DC motor driver board or D-STPR-GEVK stepper motor driver board.

Finally, to deploy the wireless switch, developers can simply snap off the two wings, leaving a single 7 x 23 mm assembly that contains all the functional components (Figure 6).

Image of ON Semiconductor dev board and typical rocker blank

Figure 6: After removing the two wings from the ON Semiconductor dev board (left), developers can easily position the 7 x 23 mm assembly in a rocker blank (right). (Image source: ON Semiconductor)

Because the ZF actuator lies at the rear of the assembly, it can be positioned under a rocker switch or switch blanks.


Wireless switches offer a maintenance-free solution to rapidly growing demand for controlling smart products. For conventional wireless designs, however, power requirements need a battery for operation, adding cost and complexity to the design and forcing users to deal with battery management and replacement. A reference design from ON Semiconductor largely eliminates these problems, using energy harvesting to supply an ultra-low-power Bluetooth 5.0 module with all the power it needs to wirelessly signal a Bluetooth-capable hub or smart product.

Disclaimer: The opinions, beliefs, and viewpoints expressed by the various authors and/or forum participants on this website do not necessarily reflect the opinions, beliefs, and viewpoints of Digi-Key Electronics or official policies of Digi-Key Electronics.

About this author

Stephen Evanczuk

Stephen Evanczuk has more than 20 years of experience writing for and about the electronics industry on a wide range of topics including hardware, software, systems, and applications including the IoT. He received his Ph.D. in neuroscience on neuronal networks and worked in the aerospace industry on massively distributed secure systems and algorithm acceleration methods. Currently, when he's not writing articles on technology and engineering, he's working on applications of deep learning to recognition and recommendation systems.

About this publisher

Digi-Key's North American Editors