Close

nRF24l01+

A project log for PERISCOPE Perimeter Security

A perimeter security system employing multiple sensors to detect area intrusions and AWS for alarm notification, logging and visualization.

kschulzkschulz 08/13/2020 at 18:140 Comments

A little late posting a log update; here are some notes from a couple of weeks ago.

Getting started with the dev kit hasn't been difficult, just time consuming. I have a fair amount of hands-on with PSoC Creator and PSoC 4 devices, however with PSoC 6 / WiFi / BT devices we have a several development environments to choose from; PSoC Creator, WICED, and ModusToolbox. These must be understood to know the best dev path to take. I've gone through the WICED WiFi 101 tutorial series by Alan Hawse, which are excellent. I have yet to look at ModusToolbox, but having a better understanding of WICED Studio, I believe WICED can do what I need for this  project. I'll probably come back to  ModusToolbox when I have the time.

The nRF24l01 radio transceiver is a fundamental part of my project so I decided to start with this first and build out from there. I started by implementing a couple SPI example projects to get a feel for interfacing with the PSoC 62 MCU. I was able to find an nRF24 library created by Carlos Diaz on GitHub in the form of a custom component compatible with PSoC Creator 4.x. Ran into a few problems getting the lib to work with the PSoC 62 MCU, particularly with interrupt handling and packet sizing, but I now have it working. I felt it would easiest to use the Arduino-compatible connectors of the Pioneer Kit to interface these components with the dev board. I typically wire prototypes together using 30ga. Kynar insulated wire.

My understanding is that I'll need to use WICED Studio to implement the WiFi, as these aren't supported in PSoC Creator (yet?). It seems I'll eventually need to somehow migrate the nRF24l01 and PIR sensor code from PSoC Creator into the WICED Studio environment in order to tie everything together. Not exactly sure how that's going to happen but expect it will be a rather time-consuming process. Sure would be nice to have support for the WiFi / BT components already in PSoC Creator as I like it *much* better than Eclipse-based IDEs. Yeah, not a big fan of Eclipse.

Multiple nRF24l01 transceivers will be communicating with each other in this project. It's a bit of a challenge to proto this with only one dev kit. I ended up adapting an ATMega328P-based display I had from another project and added an nRF24 transceiver to the SPI interface. For now this will act as a Periscope BASE unit until I finish enough of the OUTPOST implementation to free up the PSoC 62 dev kit for BASE development.

Here the PSoC 62 is transmitting a 32-bit timestamp and alternating data value to the ATMega328P display unit at a 1/2 second rate. The LED is flashed GREEN each transmission, RED if error. The display unit counts received packets and toggles a comm whirlygig indicator. Debug output is being sent to USB serial port terminal emulators for both.

Moving on now to implement the PIR motion sensor and WiFi / BT radio sniffer.

Discussions