Posted by skruglewicz in Low Power IoT Design Challenge on Aug 23, 2021 8:14:00 PM
BLOG# 3 - BPM Display - System Design
A Heart Rate Monitor Display project utilizing the PSoC 6S2 + AIROC Wi-Fi/Bluetooth Pioneer Kit
manufactured by CYPRESS - INFINEON TECHNOLOGIES (Part# CY8CKIT-062S2-43012)
This is my 3rd blog post for this Design Challenge: Low Power IoT Design Challenge
version 1.3
<<< PREVIOUS BLOG | NEXT BLOG >>> |
---|---|
Blog#4 - BPM Display - System Implementation and Testing |
- This blog post will describe the design phase of the Challenge. It will include the Hardware and Software designs, that I came up with, to implement my idea.
- I will first describe the high level design, including all the components used to implement my idea.
- Then I'll describe the Wiring Diagram used to make the connection from the Arduino breadboard project to The PSoC6
- I'll be adding 2 new wires to the wiring diagram from the Arduino design challenge.
- I'll be using the jumper wires to get the BPM value from the Heart Rate Sensor attached to Arduino, to the pins on the PsoC 6 UART.
- Then for the Software Design section,
- I'll include, UML Sequence Diagrams for the software pieces of the Design.
- I'll be adding a new Task to the Arduino Sequence UML. Diagram
- I'll include a new UML Sequence Diagram for the PSoC 6 code.
- I'll include, UML Sequence Diagrams for the software pieces of the Design.
- C/C++ and Python will be the languages used between the 2 projects.
- Python is used in a Bare Metal application on the Arduino.
- I will note software used for the PSoC 6 design.
- FreeRTOS will be used as the operating system on the PSoC 6 using C/C++
- I finish the blog post with a summary, conclusions, and references that I used in this Design Phase.
Block diagram
This section, includes a Diagram the shows the components used in my project.
Design courtesy of element14 member Jan Crumps
- On the Arduino
- Send data with a serial connection
- On the PSoC6
- Sleep
- Receive Data
- Wake Up
- Publish data to AWS MQTT
- For testing I'll be using MosQuiTTo MQTT as a broker.
I could not get this to work. I scratched it for the time being.
- For testing I'll be using MosQuiTTo MQTT as a broker.
- Sleep
System Level Flow Diagram
- The System design includes 2 decoupled designs that are connected together over a serial connection.
- One design is taken from a previous design that I did for an element14 design challenge : Design for A Cause 2021
- It uses the Arduino Nano 33 IoT Board
- Python is used in a Bare Metal application.
- The second design is based on a project by an element14 member, Jan Crumps.
- I will be using his design to implement my idea.
- I experimented with Jan's series of blogs in my previous blog Post
- These blogs turned out to be using an Arduino connected to a PSoC 6 Kit (a different kit) UART, so I decided to try and use his design.
- One design is taken from a previous design that I did for an element14 design challenge : Design for A Cause 2021
Arduino Design
- As mentioned, a Heart Rate sensor is used in this design to get Heart Rate values to calculate Beats Per Minute.
- Python is used in a Bare Metal application on the Arduino.
- My previous design can be found here Blog# 3 Beats Per Minute Nano - System Design , but I will augment section in this design blog with changes I had to ADD to the Circuit and Software in this blog.
- The design is already described in those blogs, so all I will do, is connect two jumper wires between the Arduino breadboard circuit and the PSoC 6.
PSoC6 Design
- As mentioned, this design is not my own, but is presented here courtesy of an element14 member Jan Crumps
- His design is portable and for the most part, can be used on any MCU using FreeRTOS.
- Four Blog Posts on UART, RTOS Scheduling and Message Queues, an AnyCloud MQTT Client and Low Power are presented.
- The FreeRTOS operating system using C/C++, is the RTOS used for this design.
Wiring Diagram
- This section will shows the pins used on the Arduino and the PSoC6 to make the serial connection. The pins are connected using jumper wires.
- connect a jumper wire between a 3.3 V Arduino GND to a PSoC6 GND pin
- connect a jumper wire between the Arduino TX pin to a PSoC6 RX pin
- A wiring diagram with these jumper connections is described as follows.
- This diagram was modified from the wiring design diagram from my previous design challenge.
Software Design
Arduino Design
UML Sequence Diagram
- This section, shows the logic of the flow of the Software used on the Arduino.
- I modified the sequence diagram in the Arduino design to add the task of Writing the heart rate value to the serial port
- It's a little messy, I marked the diagram by hand as the last step in the sequene.
- It comes after the BLINK action...
PSoC6 Design
UML Sequence Diagram
- This section, shows the logic of the flow of the Software used on the PSoC 6
- Derived from Jan Crumps code.
- The FreeRTOS Scheduler is used to Run the 2 major task
- UART TASK
- receives BPM values from the serial connection.
- And sends the values in a message to the queue.
- MQTT TASK
- This task will connect to the cloud
- The message is read from the queue and published to the cloud.
- UART TASK
Libraries
Arduino Design
- The libraries used can be referenced in the blog
PSoC6 Design
Conclusions and Summary
- II tried to use all my notes and diagrams that I was conjuring up during my research phase in Blog#2.
- I decided to use a big part of Jan Crumps design for most of my design.
- I'm sure, I will tweak this blog as I try and implement my idea in the next Blog.
- Now onto the implementation
REFERENCES |
---|
ResourcesJan Crumps PSoC 6 Series.
|
<<< PREVIOUS BLOG | NEXT BLOG >>> |
---|---|
Blog#2 - BPM Display - Research & Experimentation | Blog#4 - BPM Display - System Implementation and Testing |