Embedded software reworking for noise-monitoring sensors based on TI CC1310
NoiseAware is a US-based IoT startup that provides the world’s first privacy-safe noise monitoring service for short-term rental property managers and hotel chains. The indoor and outdoor sensors of the device monitor noise levels at a property and send alerts via a dashboard or mobile app when noise levels go over set thresholds.
Due to the unstable sub-1 GHz wireless TI CC1310 channel connection between indoor and outdoor sensors, our client needed a firmware rework and new architecture for their existing code.
We improved and optimized NoiseAware’s product performance by adding more operation modes for different ranges between the indoor and outdoor sensors. Our embedded team minimized the device’s power consumption and strengthened signal reliability.
After we finished testing the ESP32-based gateway, which our engineers refactored in the first part of the project, we moved on to working on the TI CC1310 sensor controllers. NoiseAware is based on communication between an indoor gateway/sensor, containing ESP32 (WiFi/BLE) and TI CC1310 (sub-1 GHz) modules, and an outdoor sensor, containing a TI CC1310 module.
This communication is ensured by the TI MAC Stack default protocol of our development and heartbeat protocol, which work simultaneously and control the channel changing on four interchangeable radio profiles of the TI MCUs. Data transfering to the indoor sensor comes from TI CC1310 to ESP32 via the SPI protocol.
To configure the stable performance of the outdoor sensor, we worked with its operation modes. The device functions at long range by using more battery power or at short range saving the battery. For stabilization purposes, LS embedded engineers developed a tethering protocol based on the heartbeat mechanism.
In low power mode, the outdoor sensor employs only microphones, while in high power mode, it starts communication with the indoor sensor. We decided to set up configuration changes and data transmission via tethering, while at the same using the MAC protocol for delivering OTA updates and supporting legacy firmware devices in the fleet.
Our engineers also worked on LED indication in the outdoor sensor showing when the device is connected, offline, resetting, and out of order.
What's more, we managed to reduce energy consumption even further than provided by the legacy code, both for low power and high power modes. From now on, tethering and MAC protocols don't operate at maximum capacity for all ranges. Instead of one default set of configurations, we arranged four: for short, middle, more distant, and maximally long range.
LS engineers developed a state machine that allows NoiseAware devices to alternate between work modes. We made the tethering protocol one of the states and added a listener code, enabling the indoor sensor to collect information from different outdoor sensors simultaneously.
Additionally, the LS team implemented a tethering/MAC dispatcher to divide and regulate the protocols' work during data transmission. We also developed memory consumption, processing power, and comprehensive battery drain analyses for the client to obtain useful information about the device's performance and show room for further functionality development.
How it works
We found Lemberg Solutions at the perfect time in our product development: we had a big goal, lots of issues, and not enough resources. We contracted Lemberg Solutions to first audit our firmware and identify bugs and architectural inefficiencies. They delivered quickly and diligently, and we were so impressed with the deliverable that we moved to the implementation phase immediately. They were a pleasure to work with, everyone on their team was smart and effective, and our firmware is in a great place. We will definitely utilize them for all embedded needs in the future.