First, recently I required to establish a communication with my electronic system through the system housing, without having the chance to wire cables and/or using a connector. Second, I remember several use cases when I wished to have a simple galvanic isolation available. And third, sometimes I would like to communicate system date over several meters and more.
Having all that in mind, I found Infineon's "EZ-Serial" platform very interesting.
AIROC™ EZ-Serial is a firmware platform provided by Infineon and enables an easy way to run serial communication via dedicated preconfigured Bluetooth® LE modules.
ElectronicsBeside of all offered modules, I selected the CYW20822-P4TAI040 based on CYW20822 for testing, as it offers additionally the BLE Long-Range...
Generally, it is promoted to to support the entire spectrum of Bluetooth® LE-LR use cases including Industrial IoT applications, Smart home, Asset tracking, Beacons and Sensors, and Medical devices.
As a fully integrated module it includes the antenna and the already mentioned AIROC™ EZ-Serial firmware, what means, it runs out of the box by minimized user operation.
An evaluation kit CYW920822M2P4TAI040-EVK is offered what might be useful for evaluation, although I missed from my first encounter the connect LED that had to be added by the user manually, considering that the expansion connector does not respect the Maker friendly mil spacing.
In order to use the BLE module as a pure communication bridge the evaluation kit is really oversized with missing features, like e.g. a connect LED. The figure below shows the minimum external circuitry required to get the module running with the integrated EZ-Serial firmware.
The BOM is reduced to the following:
- Infineon's CYW20822-P4TAI040
- Würth Elektronik WE-XTAL Watch Crystals, 32kHz 830066431
- Würth Elektronik WCAP-CSGP MLCCs, 10uF, 0805, 885012107004
- Würth Elektronik WR-PHD 2.54 mm THT 4-Pin Header, 61300411121
- Würth Elektronik WL-SMTW TOP LED 'Blue', 150141BS7310
- Resistor 1M Ohm, 0805 (2 pcs)
Now, for my Maker approach I was thinking about another minimized solution - Embedded into a 3D printed package.
Mechanics - Embedded in a 3D printed packageMaybe this was the most fun part of this project to embed the fully integrated embedded BLE module into a 3D printed housing.
The following picture sequence demonstrates the assembly including soldering and packaging - Embedded in 3D.
The cool thing is, the Infineon module CYW20822-P4TAI040 already come preprogrammed including the EZ-Serial.
However, it might be good to update the firmware via OTA, using Infineon's DevTool (found currently just as APK on the Evaluation Kit page below tab Resources -> Infineon DevTools) on your mobile phone and upload latest EZ-Serial firmware.
Refer to the user guide and instructions given by Infineon how to update the module's firmware.
You need a USB-2-Serial bridge to access via a serial Terminal program (e.g. Tera Term, 115200 baud) to the module.
You can use the command /RFAC to load the factory settings
/RFAC
@R,000B,/RFAC,0000
@E,0005,RFAC
@E,003B,BOOT,E=01000B00,S=05040001,P=0001,H=40,C=05,A=FFCD95647151
@E,000E,ASC,S=01,R=03
Please refer to the related EZ-Serial Firmware User Guide to understand commands and responses in detail.
Next, one module needs to configured as Central another as Peripheral - basically it doesn't matter at the end - finally the communication works bidirectional.
- Enable first module to be a Peripheral
Configuration as Peripheral and automatically advertise and wait for connection:
Enter command .CYSPPSP$,P=0,E=2,L=11223344
.CYSPPSP$,P=0,E=2,L=11223344
@R,000F,.CYSPPSP$,0000
- Enable second module to be a Central
Configuration as Central and automatically search and connect to the peripheral:
Enter command .CYSPPSP$,P=1,G=1, E=2,R=11223344,M=FFFFFFFF
and reboot /RBT
.CYSPPSP$,P=1,G=1, E=2,R=11223344,M=FFFFFFFF
@R,000F,.CYSPPSP$,0000
/RBT
@R,000A,/RBT,0000
@E,003B,BOOT,E=01000B00,S=05040001,P=0001,H=40,C=04,A=C350F7126591
@E,000E,SSC,S=01,R=03
Getting started & DemonstrationIn case you will use two serial terminal windows you can observe how the Central has scanned to find the correct Peripheral, the blue LED gets light when connected and now user can write 'wireless' in both directions...
Instead of the serial terminal you may connect the EZ-BLE module to your embedded system, or whatever where you like to replace a serial communication by a wireless BLE connection.
SummaryOn the quick an existing serial (UART) communication can be replaced easily having the advantage of...
- wireless connection (e.g. less cables, through walls without a hole, etc.)
- galvanic isolation
- long distance (depending on the topology, 20 meters and more are possible using the on-module antenna)
The approach having the system assembled and embedded into a 3D-printed case was a low-cost solution showing with the right selected 'EZ-Serial' BLE module things get easy to implement.
Well - that's it!... for the moment. Stay tuned!
Regards, Holger
Comments