“Wireless Made Fun!" - IoT Solutions for Smart City
With the Internet of Things, our world gets smarter. And will get even smarter as Machine Learning, Cloud and Edge Artificial Intelligence along other analytics functions get deployed in broader scale.
Sensors, actuators, connected devices are now everywhere, including in our house (Smart Home), in our working environment (Smart Building and even Smart Industry), in our neighborhood (Smart City). Even in the countryside (Smart Agriculture).
But all these objects have different purpose and use cases leading to different technical constraints in performance, range, or battery life. Different technologies will then be needed to cover these multiple applications as there is no 1 size fits all.
Some devices will also support several protocols to bridge and connect multiple ecosystems together.
Some protocols evolve always adding new features and patches to get more robust… or protect them against always increasing security threats. Others get obsoleted and simply disappear!
Here come the challenges for developers building Smart Home, Smart Building, Smart City solutions:
- Quickly adapt to always evolving standards, and complex environment
- Shorten time to market: scaling development is a must
- Wireless is a complex technologies and leads to many troubles and delays: how to mitigate them
- Vulnerability is not an option, highest cyber-security standards are required
To help you go through these challenges, Microchip Technology has built this demonstrator, integrating our state-of-the-art solutions with a focus on scalability, robustness and security. This platform manages a broad range list of technologies, illustrating multiple applications such as:
- Smart Industry, Power Plant (production)
- Smart City, Energy Management (global management from consumption to production)
- Smart Industry, Power Plant (production)
- Smart City, Street Lighting
- Smart City, Waste Management
- Smart City, Parking Management
- Smart City, tracking & geolocation
- Smart Home & Smart Building, Hygiene and Safety (disinfection & cleaning services)
- Smart Home & Smart Building, Access Control, Alarm & Security
- Smart Home & Smart Building, Smart Lock
- Smart Home & Smart Building, Lighting Control
- Smart Home & Smart Building, Heating Control
- Smart Home & Smart Building, Smoke & CO detection
- Smart Home & Smart Building, Energy Management (Solar Panel & Metering)
- Smart Agriculture, tracking & geolocation
- Smart Agriculture, sensors & monitoring
Technologies demonstrated here will be:
- Robust Star Network based on Long Range Sub GHz protocol
- LoRaWAN infrastructure supporting Class A and C with Join Server connectivity
- Wi-Fi Connectivity
- Bluetooth BLE Connectivity
- Secure Element, to build robust and secure network
And enjoy this Github session
This demonstrator is made of 3 distinct Lego blocks, each of them illustrating different applications and uses cases. They are:
- City Buildings with its 8 apartments (picture on the left)
- Street plates (picture in the middle)
- Windmill sitting on top of small hill (picture on the right
The City Building stores all the electronics boards controlling the use cases of the whole demonstrators as shown below : Smart Home, Smart Building, Smart City, Smart Industry, Smart Agriculture
There is one exception: a mouse trap from Xignal sits on a Lego street plate and illustrate the Hygiene and Safety use case. This solution from Signal typically traps rodents in buildings, warehouses or parks.
It operates as standalone Class A device, battery powered and connected to the same LoRaWAN network. More details are provided in the use case section and here www.xignal.com.
The street plates are used to hold sensors (1 light sensor and 1 magnetic sensor) and actuators (total of 6 LEDs embedded in street polls) as shown below.
We also have added 2 Mosfet drivers to boost up the intensity of LEDs (1 driver per 3 Street Polls).
Windmill is made of DC motor and LED, to simulate the production of Energy used by our Smart City. Production will show on the Smart City dashboard.
We have selected here this smart solutions from Xignal (see https://www.xignal.com/) which are proposed in many flavors:
Used by professional (building management services) as an intelligent and sustainable pest control, it detects the status of the mouse or rat trap located in a building, warehouse or outside (garden, park…): armed, unarmed or unarmed with catch. By a push notification on its mobile or tablet, online 24/7 reports are generated listing rodent activities. A big advantage for professional for intensive and efficient inspections (it saves costs). The non-tox digital trapping fits in with integrated pest management.
This end product commercialized by Xignal is based on RN2483 network controller from Microchip (www.microchip.com/RN2483) and connects to LoRaWAN network, using Class A.
RN2483 easily connects to any host MCU, driven with ASCII command interface over an UART.
In this specific product, a tiny 8-bit MCU has been used : ATMEGA328PB-AU (www.microchip.com/wwwproducts/en/ATmega328PB)
This block illustrates 3 use cases of a typical Smart Home & Smart Building environment:
- Access Control, Alarm & Security
- HVAC Control (Heating, ventilation, and air conditioning
- Lighting Control
This system is built around a central unit, interacting with several embedded sensors and actuators (thru Star wireless network or directly wired to this central point), interfacing with a smart phone (thru smart lock via Bluetooth) or interfacing with dashboard for overall system monitoring and control (MQTT connectivity via Wifi).
Overall system looks like this:
Several SAMR34 Xplained Pro Evaluation Kits (DM320111) have been used here to build this environment. Depending on the use case, these boards have been configured either as Central Unit (to say our system gateway), sensor node or actuator.
The Central unit is the master node of our system, the SAM34 MCU (Cortex M0+ with 256k Flash) managing every single block of our system.
It acts as smart gateway between the different application ecosystems:
- Smart Home Network related apartments 2, 3, 5 and 6 (lighting and heating controls). This is a Star Network protocol over Lora SubGHz radio, our central unit acting as PAN coordinator, and actuators and sensors being the end nodes (here 4 nodes in total)
- Access Control. Central unit is connected to PIC-BLE Development Board (Reference DMT100112) : a Smart Phone using LightBlue® App can now push a pin code to the gateway which would then disarms the alarm if password gets validated.
- Door Strike, Alarm buzzer and light, Alarm Sensor. All these nodes are here wired directly to the gateway although in real life some of these devices would be connected in wireless (alarm sensors).
The Central Unit is also connected to the cloud thru Wi-Fi and MQTT protocol, using the WINC1500 XPRO extension bord from Microchip (Reference ATWINC1500-XPRO). This board is based around an ATWIC1500, single-band 2.4GHz b/g/n IoT Network Controller embedding Wi-Fi and Network capabilities through SPI-to-Wi-Fi interface.
To further enhance our system, we could have added a Secure Element, pre-configured and pre-provisioned for a given cloud vendor. Customers following that path could then have a quick and easy secure authentication to several popular solutions such as AWS, Azure or Google GCP.
For more information, refers to Microchip's Trust&Go platform. Examples are provided based on same WINC1500 Wi-Fi module, used here:
Going back to our development, system data related to this application can then be displayed on a dashboard as shown below:
LightBlue App is provided by Punch Through Design and available for both Google Play Store and Apple App Store).
For more information on this solution refers to Microchip PIC-BLE Development Board (Reference DMT100112).
Connectivity brings system safety to the next level compared to standalone detectors, ensuring that any alert gets identified sooner (or simply identified at all), shared to broader audience locally, and last communicated real time to concerned safety/security departments.
Maintenance could also be automated with more frequent check-up (battery!). It increases system safety and robustness, while improving overall efficiency (less time-consuming and unnecessary inspections).
Connectivity could be implemented thru different topologies, interconnecting sensors together thru a Point to Point communication (P2P). Or connected them directly to the cloud thru LPWAN communication.
In these demonstrator, we have decided to implement this last topology using LoRaWAN Class A network and SAMR34 Xplained Pro Evaluation Kit (DM320111).
But first topology (P2P) could also have been implementing using same hardware (DM320111 kit) along our P2P/Star drivers, to get connected to our central unit. As we have focused on communication part in this Github, no real CO/Smoke sensor has been used here but a push button to fake the alarm trigger and fetch the data.
Provisioning to the LoRaWAN Network is done here through a Secure Element and based on Microchip’s Trust&GO solutions specific for LoRaWAN applications.
2 cloud versions are proposed here : 1 with The Things Industries (TTI) and 1 with Actility
There are many use cases and thus many applications making city smart.
We have implemented 3 solutions all around LoRaWan connectivity:
- Smart parking using LoRaWAN Class A device. It tells when a car is detected on our parking lot using a magnetic sensor. And push this information to the cloud and the Smart City dashboard
- Waste Management using LoRaWAN Class A device. Using a light sensor, it tells when our trash bin is full, thus service is required to empty it. Here again, it push this information to the cloud and the Smart City dashboard
- Street Lighting using LoRaWAN Class C device to control 2 clusters of street polls and thus implement Multicast control. First group is located on the upper part of the demonstrator and called “Avenue des Champs Elysées”. Second one on the lower part and called “Rue de la Paix”. These polls can be monitored and control thru our Smart City dashboard. In real life, street polls could also support some monitoring system for automated maintenance, or FUOTA over LoRaWAN (Firmware Upgrade Over the Air) in order to upgrade firmware or change the cluster definition (adding/removing street polls from the list). Such features have not been implemented here but could be added using for instance the FUOTA over LoRaWAN drivers from Microchip.
Here again, several SAMR34 Xplained Pro Evaluation Kits (DM320111) have been used to support these applications and end nodes.
In progress
- Lego 10255 Creator Expert (Building)
- La place de L'Assemblee
- Assembly guide
- Lego 10268 Creator (Vestas Windmill)
- Lego 10700 Green Baseplate
- Lego 60236 Road block
- Lego Trash Bin taken from Lego 4206-2 Recycling Truck
We assembled all the lego blocks by following the assembly guides.
And started to check the space available in order to put the boards into the apartments.
And the placement of the building on top of the Microchip support
Boards connection:
USB Hub is used to power the boards.
For software embedded on SAMR34 Xplained Pro boards, we used Atmel Studio 7.0 IDE and latest version of Advanced Software Framework (ASFv3).
- Download and install Atmel Studio 7.0 IDE.
https://www.microchip.com/mplab/avr-support/atmel-studio-7 - Open Atmel Studio 7.0 IDE.
- Then, you need Advanced Software Framework (ASFv3) v3.47.0 release or upper release.
Install ASFv3 as an extension to Atmel Studio from the menu: Tools -> Extensions and Updates … - Once the installation is complete, you must restart Atmel Studio.
Note: ASFv3 is an MCU software library providing a large collection of embedded software for AVR® and SAM flash MCUs and Wireless devices. ASFv3 is configured by the ASF Wizard in Atmel Studio 7.0 (installed as an extension to Studio). ASFv3 is also available as a standalone (.zip) with the same content as Studio extension (https://www.microchip.com/mplab/avr-support/advanced-software-framework).
Important: Until the next Atmel Studio IDE release, you have to manually install the Device Part Pack for developing with SAMR34/R35 on Atmel Studio 7.0 IDE. (all products released in between IDE releases of Atmel Studio should be manually added by user to develop applications).
- Go to Tools -> Device Pack Manager
- Check for Updates
- Search for SAMR34 and click install
- Repeat the same for SAMR35
- Restart Atmel Studio 7.0 IDE
In progress
In progress