The goal of this project was to demonstrate how to control and receive data from a Panasonic Grid Eye Sensor remotely using a BLE connection. The Cypress EZ-BLE module was chosen because of its flexibility and ease of use.
The example application utilizes the Cypress semiconductor PSOC 4 BLE pioneer board as the GAP Central and GATT Client device. You can purchase that kit here: CY8CKIT-042
The design shown on this webpage is purely for demonstration and evaluation purposes. It is not a reference design and is not guaranteed to pass FCC or other regulatory testing. It is the responsibility of the user to follow all applicable laws when utilizing this design.
The following zip file contains a PSOC creator workspace which contains both the BLE Central and BLE Peripheral projects.
For those of you who use Kicad, the schematic and board files are found below. In addition, a library which contains footprints for the PROC module and Grid Eye Sensor is also included.
CAP CER 1.5UF 6.3V X5R 0603
CAP CER 1UF 10V X7R 0603
|Samsung Electro-Mechanics America, Inc|
|1||C3||1276-1119-1-ND||CAP CER 10UF 6.3V X5R 0603||Samsung Electro-Mechanics America, Inc|
CAP CER 0.1UF 16V X7R 0603
|1||C5 (CMOD, value can vary, typically 2.2 nF)||490-1459-1-ND||CAP CER 2200PF 50V NP0 0603||Murata Electronics North America|
DIODE ZENER 3.3V 500MW SOD123
|Micro Commercial Co|
|1||D2||160-1434-1-ND||LED ORANGE CLEAR 0603 SMD||Lite-On Inc|
|1||JP1||3M9455-ND||CONN HEADER VERT SGL 20POS GOLD||3M|
|1||JP2||A28783-ND||CONN HEADER RT/A .100 2POS 15AU||TE Connectivity AMP Connectors|
|2||JP3, JP4||N/A||Any 0.100" (2.54mm) Pitch Through Hole Connector||N/A|
|1||L1||490-5988-1-ND||FERRITE BEAD 330 OHM 0805||Murata Electronics North America|
|1||R1||311-20.0HRCT-ND||RES SMD 20 OHM 1% 1/10W 0603||Yageo|
|1||R2||311-10KGRCT-ND||RES SMD 10K OHM 5% 1/10W 0603||Yageo|
|1||R3||311-100HRCT-ND||RES SMD 100 OHM 1% 1/10W 0603||Yageo|
MOD EZ-BLE PROC 48MHZ 21SMD
|Cypress Semiconductor Corp|
|1||U2||255-3509-1-ND||SENSOR GRID-EYE 3.3V HIGH GAIN||Panasonic Electronic Components|
Note: It is possible to modify this design to use 5 volts instead of 3.3 volts. You'll need to use the one of the 5 volt Grid Eye sensors such as the P19004CT-ND. Also, you'll need to replace the 3.3V zener with a 5V one.I haven't tested this modification so I can't guarantee that it will work, but there shouldn't be any major issues. The user should avoid applying more than 5.5 volts to the EZ-BLE module, as damage will result.
The demo application demonstrates a simple setup in which the PROC demo board shown above functions as GAP peripheral and GATT server and a PSOC BLE pioneer board serves as a GAP Central and GATT Client. The user is able to control the process by communicating with the pioneer board via a terminal interface. The PROC demo board utilizes a custom BLE profile for transferring the data from the Grid Eye sensor to the GATT Client device. The profile consists of the following services and characteristics:
Flow charts demonstrating the basic algorithms for both the PROC demo board (BLE peripheral) and PSOC pioneer board (BLE Central) are shown below:
When the streaming mode is enabled, the BLE central will continuously receive data packets from the PROC Demo board. Each packet contains 130 bytes where the first 128 are the temperature values of each pixel and the last two bytes are the temperature values for the grid eye's thermisistor. Each pixel on the grid eye has 12 bits of resolution broken up into two 8 bit registers. Thus each pixel will be represented by two values in the packet. The packet is formatted so that the lower value, the 8 least significant bits, arrives first followed by the high value, the 4 most significant bits. The pairs arrive sequentially so the values from pixel 1 will be the first two values in the packet and the values from packet 64 are the last two before the thermistor values. The two bits for the thermistor follow this same format. An example packet is shown below:
The cypress miniprog3 is a programmer/debugger that supports most of Cypress psoc and proc products. It can be purchased from digikey here: 428-2975-ND
If you are unwilling to spring for a miniprog3, it is also possible to program the demo board using the CY8CKIT-042 PSOC pioneer board.
I would like to thank Chris Baird and Johnathon Richardson for the earlier work they did with the Grid Eye sensors. A large amount of this project was based on their articles which you can find on EEwiki.
I would also like to thank Scott Raeker who suggested to me the idea of adding BLE connectivity to the Grid Eye Sensors.