Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sensor Node 2 (SN2)

Firmware for Sensor Node 2 (SN2) in the ELEC4740 Internet of Things design project. SN2 is responsible for environmental monitoring and actuation, and operates as a Bluetooth Low Energy (BLE) peripheral.


Project Context

  • Course: ELEC4740 – Internet of Things
  • Platform: Particle Photon 2
  • Device OS: 6.3.4
  • Language: C++

SN2 communicates with other nodes using a shared BLE protocol defined in a separate protocol module.


Hardware

The hardware design is documented in this repository.


Responsibilities

Part 1 (Standalone Operation)

In Part 1, SN2 is responsible for:

  • Temperature sensing and calibration
  • Sound detection and thresholding
  • PWM control of a fan actuator
  • Local user interface:
    • Help button
    • Status LEDs
  • Periodic telemetry generation
  • Event detection and reporting

Part 2 (System Integration)

In Part 2, SN2 will additionally:

  • Communicate with a BLE control node
  • Transmit telemetry and events over BLE
  • Accept override commands for fan control

BLE Protocol

All BLE communication conforms to the shared protocol contract defined in:

protocol/ble_protocol.hpp

This file defines:

  • UUIDs
  • Packet layouts and sizes
  • Scaling rules
  • Event semantics
  • Control behaviour

Repository Structure

├── src/ # Application source code
├── protocol/ # Shared BLE protocol definition
│ ├── ble_protocol.hpp
│ └── README.md
├── project.properties # Particle project configuration
└── README.md # This file

Build and Flash

This project is built using Particle Developer Tools.

Typical workflow:

  1. Open the project folder in VS Code
  2. Select the target device (Photon 2)
  3. Compile and flash via USB
  4. Monitor logs using the Particle Serial Monitor

Status

  • Hardware bring-up
  • Sensor drivers
  • Local UI
  • PWM actuator control
  • BLE advertising and characteristics
  • Telemetry transmission
  • Event transmission
  • Control override handling

Calibration of NTC

cal start
cal set r_series_ohms 100000
cal set ref_mv 3300

cal point set 1 500
cal point capture 1

cal point set 2 2500
cal point capture 2

cal point set 3 4500
cal point capture 3

cal solve
cal save
cal show

Authors

  • Ryan Hicks

License

MIT

About

Firmware for Sensor Node 2 (SN2) in the ELEC4740 Internet of Things design project.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages