PSOC for Measuring Social Distancing

PSOC IoT Cloud Gateway for Measuring Social Distancing

Similar projects worth following
Social distancing also called “physical distancing,” means keeping space between yourself and other people outside of your home.

To practice social or physical distancing:
-Stay at least 6 feet (about 2 arms’ length) from other people
-Do not gather in groups
-Stay out of crowded places and avoid mass gatherings

In this project, we will develop a gateway device that can count groups of people in a narrow area and pushes data to the cloud. Thus, we will be able to follow the crowd density information centrally.

We will be scanning IoT enabled personal mobile devices for measuring crowd. These can be smartwatches, mobile phones, or beacon type devices. We will count all of them and upload this information to the cloud. 

We are using PSoC® 6 WiFi-BT Pioneer Kit.  This kit is suitable for our project because we need to use Wi-Fi and BLE on the same platform.

We are also using AWS IoT cloud services for remote monitoring.

All codes can be reached from the Github page:


main project file

C Source File - 15.30 kB - 08/25/2020 at 12:50



runtime for Bluetooth stack

C Source File - 10.52 kB - 08/24/2020 at 20:06



configs and credentials for wifi connection

h - 4.08 kB - 08/24/2020 at 20:06


make file for entire project

mk - 1.26 kB - 08/24/2020 at 20:06


  • 1 × PSoC® 6 WiFi-BT Pioneer Kit (CY8CKIT-062-WiFi-BT) The PSoC 6 WiFi-BT Pioneer Kit features the PSoC 62 MCU: a single- or dual-core MCU, with an Arm® Cortex®-M4 and Arm® Cortex®-M0+, 1MB of Flash, 288KB of SRAM, 102 GPIO, 7 programmable analog blocks, 56 programmable digital blocks, Full-Speed USB, a serial memory interface, a PDM-PCM digital microphone interface, and industry-leading capacitive-sensing with CapSense™.

  • Testing the Device

    Deniz Taşkın08/24/2020 at 22:54 0 comments

    From AWS console, select test. And write PSOC_GW as subscription topic.

    Then our scan results will appear with a time-stamp value. 

    You can also debug messages from serial console

    This information can be easily used by an application that generates a heat map. We can also add a button to the device to know when the room is cleaned. When the cleaning crew completes the process, they can press this button so we have a chance to know this situation.

View project log

  • 1
    AWS account set up

    If you don’t have any AWS account first you must create an AWS account. You can find detailed information for AWS account here :

  • 2
    Create your AWS IoT Thing

    After create your AWS account you must login your AWS management console. At the top, click Services and scroll down until you see Internet of Things on the right hand side. Click on IoT Core.

    On the left side, click Manage, and then click Create button. Choose "Create a Single Thing" and then give it a name. Scroll down and click Next. You can ignore other fields in here. The next page shows certificate creation options. AWS IoT is accessible via TLS with certificates. Create a thing object in AWS IoT and its X.509 device certificate, and then attach the policy document. The thing object is the virtual representation of your device in the AWS IoT registry. The certificate authenticates your device to AWS IoT Core, and the policy document authorizes your device to interact with AWS IoT. Choose the top option, One-click Certificate Creation.

    Important:  When you create certificate you must download your keys at this stage.

  • 3
    Create an AWS IoT policy

    X.509 certificates are used to authenticate your device with AWS IoT Core. AWS IoT policies are attached to the certificate that authenticates the device to determine the AWS IoT operations, such as subscribing or publishing to MQTT topics that the device is permitted to perform. Your device presents its certificate when it connects and sends messages to AWS IoT Core.

    In this procedure, you will create a policy that allows your device to perform the AWS IoT operations necessary to run the example program. You must create the AWS IoT policy first, so that you can attach it to the device certificate that you will create later.

    On the main IoT Core page, click Secure menu. Below Certificates, click on Policies, and then click on Create in the upper right. Give it a name like "Open". In the statements section below the name, enter iot:* as the action, and * as the resource ARN. Check off Allow, and then click Create at the bottom right.

View all 10 instructions

Enjoy this project?



Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates