The final week ended yesterday and here is a photo of my final product, Alexagon! In the final week, I have made all the final adjustments and fixed minor details of my product. The 3D printer had made the design a little rough around the edges and therefore it needed to be filed correctly so it fitted properly with led the lid and bottom, when I put together the product.
Furthermore, I added new code into the existing code onto the node mcu for the new LED light circle, making every second light change from blue to red every other second. I used the code from here. Otherwise I kept the same code for using the DHT 11 sensor, only changing the digital pins, as I had moved to when I was wiring components together. We ended the week by showing off our products amongst other UTS students who have also participated in a summer course and built something different. The overall feedback from students was that they liked I had added LED lights and designed a Hexagon :-) My reflection on this course has ultimately been how cool it has been to built an IoT product from scratch not having prior knowledge on the topic. It's been a great learning curve dividing the weeks into sprints knowing what to focus on and being able to work autonomously and together as a team helping each other with our individual devices. Furthermore it has been exciting to learn new concepts of IT and to gain more practical experience in Python, Visual Studio Code, Fusion 360 and engineering in general of building and mechanical design. To be continued.
0 Comments
This week I have designed my final IoT product in Fusion 360. The photo above shows my final product ready for 3D printing! As you can see, I decided to design a hexagon with my temperature/humidity sensor on one side, my LED light on another side, and a switch to turn on and off on a third side! In the bottom, you can spot a round circle of LED lights, which I decided to add to my design, cause I thought it would look cool with a see through lid and transparent walls! I started out by measuring all my components to build my product and the build them separately in Fusion 360. My teammate Tim made me aware that some of the popular opponents can be found and downloaded directly into the program via grabcad.com. I therefore downloaded the DHT 11 and my battery holder. Otherwise, I build all the other components in the program. An example is below photo of the LED light versus the downloaded DHT 11. As you can see there is a bit differences in the details from the webside versus my own build component in Fusion 360. Furthermore we are able share each other's design, and I therefore used my other teammate Nick's node mcu, as he already designed this component. Additionally another team member from the other team used my build LED light :-) After I had build and downloaded all the components I needed for my device, I started trying placing them together in Fusion 360 and playing around with designs. At first I wanted to make a cylinder but quickly found I wanted to design a hexagon instead, as I wanted flat walls to place the DHT11 sensor, switch and LED light. I decided to design the breadboard as a round circle in the bottom and place my node mcu, battery holder and wire connectors to the switch, led light and temperature sensor. After having build and design my product in Fusion 360, it was time to build the product in real life. The photos above show the working process of wiring and soldering the node mcu to the breadbaord to make it fit to the round circle and my designed hexagon.
Below are some photos of when my design was 3D printed and the bottom and lid was laser cut. In this week's sprint I have focused my efforts on the programming language Python, and how to plot my data using Plotly in Jupyter Notebook, as you can see in below photo. To run Jupyter Notebook, I used Microsoft Azure and to get started I installed paha-mqtt for connecting to my database and plotly to visualise my data in Jupyter Notebook: #!conda install "notebook>=5.3" "ipywidgets>=7.2" -y #!conda install plotly -y #!pip install paho-mqtt After this I ran these lines of code using these two guideline from plotly's website: Line charts in in Plotly and Plotly Figure Widget overview in Python. This line of code got the widget showing, but in order to connect the data from our mqtt broker, I had to subscribe to my database TempM, which I created in week 2. Furthemore, to get the graphs showing humidity and temperature, I had to split them as well, as I have also done in Visual Studio Code. As you can see in my code, line 0 is temperature and line 1 humidity. The result was these photo below. The second screenshot is when I blew on the sensor, and the graphs started fluctuating. Additionally this week, I completed this 6.5 hours online course including lots of exercises to get more practical experience.
This week has given me a great learning experience, as I dived into working individually on my IoT product and working solo on the same sprint we did as a group in week 2 enabling me to better understand each step of the process. The IoT product that I have chosen to build is a temperature/humidity sensor, where I can visualise the data. I have also added a LED light that can be turned on and off, just because why not when you're playing with IoT. Additionally, I have added a rotation sensor to my device, so it can Last week as we built out infrastructure, we set up our shared MQTT broker on Vultr.com, which is the same broker I have used this week (see photo above). First of all, I started running the code in Visual Studio Code to get data from my temperature/humidity sensor, as you can see in the terminal in below photo. I used the library for the DHT11 sensor and divided it to show humidity and temperature separately. Next step was to store the data in the database we created in InfluxDB last week and do the conditioning in NodeRed to display my data from the device nicely in Graphana. As you can see in the photo below of NodeRed, I created my own table in our Database, TempM, and set that to display in Graphana. In Graphana, I created two tables for temperature and humidity each to display the data in different ways. I sat our datasource as our database and used the following query for the temperature tables: SELECT Temp FROM "TEMP".."TempM" . The first table shows the historical data over the given period of time and the second table shows the last added value, hence giving a quick overview of the current moment looking at the tables. Additionally, my team member Michala made me aware of Chonohraph, which is a great visualisation tool for exploring InfluxDB instead of using Putty to check our databases (see photo below). As mentioned in the beginning, I also decided to add on a LED light to my breadboard that can be turned on and off via terminal. After I had my sensor up and running, I therefore added the code for the LED light in Visual Studio Code and set the lamp to be on. Here after, I went into putty via my Vultr profile and used these 4 different command lines:
mosquitto_pub -h 139.180.169.188 -u tim -P "password" -t inTopic -m "0" mosquitto_pub -h 139.180.169.188 -u tim -P "password" -t inTopic -m "1" mosquitto_pub -h 139.180.169.188 -u tim -P "password" -t inTopic -m "2" mosquitto_pub -h 139.180.169.188 -u tim -P "password" -t inTopic -m "3" This made the builtin LED light on the NodeMCU and the added LED light turn on and off! The photo below shows, when the lights are turned on :-) |
Malan ChristiansenMy weekly experience of UTS summer studio 2020: IoT Product Development from a Data Perspective. ArchivesCategories |