Nathan’s Status Report for Nov 13 2021

What did you personally accomplish this week on the project?

This week, I worked with JJ to connect the data hub and the public API endpoint of our backend. I also made the post requests of create_hub, create_seats, update_seats, delete_hub, delete_seats, get_free_seats more robust.

Specifically, I fixed a bug when a hub is instantiated without seats. This would make the filtering of seats have an index out of bounds error.  Thus, I fixed this by adding a check for the edge case of empty hubs.

Then, I made 15% more progress on the frontend of the project. My idea is to make it very simplistic and easy on the eyes for clients. The demo showcasing all of this went very well.

Is your progress on schedule or behind?

I am on schedule with my parts and feel confident moving forward, after our demo. I expect that as we move further into the implementation part, we will have a lot more roadblocks, so I will be working hard in the weeks to come.

What deliverables do you hope to complete in the next week?

This week, my task it to work on the web application frontend. Specifically, 15% this week would keep me on track with respect to the schedule. I can also help JJ and Will on their parts, which currently pose more of a risk, as the software stack basic functionality is stable. I can’t wait! 😁

 

Jonathan Cheng Status Report for Nov 13 2021

This week there was a slight lull in progress, due to two main factors (shipping delays, and external coursework). Despite this, I still made some meaningful steps towards completing the Data Hub. One crucial component, the XBee breakout board, did not arrive until Wednesday, meaning we couldn’t work on configuring the XBees until then. So, at the beginning of the week, I worked on testing the Data Hub’s connection to the backend, making sure all the schemas were aligned and verified for seamless communication. This was successful, and the Data Hub can now communicate with the deployed backend API.

Once the breakout boards arrived on Wednesday, Will and I got to soldering the XBee’s to the breakout boards, so that they can be plugged into regular-sized breadboard inputs. After that, we configured both XBees by using the Arduino as a serial converter.

At the start of next week, we expect that we will be able to begin testing of XBee communication, which is the final big step in our development. Once this is complete, finishing the capstone project will just be a matter of recreating another Data Hub for multiple-workspace use cases. Exciting!

Nathan’s Status Report for Nov 6 2021

What did you personally accomplish this week on the project?

This week, I finished the deployment of the backend server. Now, the backend server is able to handle post requests of create_hub, create_seats, update_seats, delete_hub, delete_seats and the important get request of get_free_seats from the public endpoint of:

https://freeseats-a3.herokuapp.com/

I used Heroku, due to low-costs (free), and focus on deployment of an MVP. However, Heroku has capabilities to handle large load, which will be important if we wanted to scale our project.

This is for use of the data hub component. For integration, I wrote a quick API docs for use of the backend API: https://github.com/FreeSeats-Team/freeseats/blob/web-deploy/web_app/README.md

I made a frontend that is a basic skeleton to simply display data in a list form with elements:

Data_Hub_ID: #_of_free_seats

This will be extended upon to include location and aesthetics.

Is your progress on schedule or behind?

I am on schedule with my parts and feel confident moving forward, for our demo. I expect that as we move further into the implementation part, we will have a lot more roadblocks, so I will be working hard in the weeks to come.

What deliverables do you hope to complete in the next week?

This week, my task it to work on the web application frontend and polish out the backend if issues arise. For the demo, I hope to have MVP functionality of the frontend with backend integration with the hardware components. After the demo, I will polish out the frontend’s aesthetics and add more robust database entries (with locations, etc.). I can’t wait! 😁

 

Jonathan Cheng’s Status Report for Nov 6 2021

This week, my time was half spent on flashing the RPi with the proper OS and configuring hardware settings to accept GPIO data. Overall, this was a successful endeavor, and I got my data hub code installed on the machine, with all dependencies as well. The second half was spent with Will, helping him with whatever he needed to do to get the sensor connected to the XBee. Fabrication generally takes more time than writing code, so any help I could give, I did.

The work we did this week sets us up well for next week’s interim demos. All three of our components have developed decently, and though we are far from done, we are well on our way. Upon looking at the initial setup for the XBee, it seems like the configuration is going to be fairly straightforward. If everything goes according to plan next week, we should be able to get a full integration test by the middle of the week.

After running an integration test, the next thing to do is fabricate more chairs and one more data hub, to move towards more real-world situational tests. This will put us towards the end of the development cycle for our capstone project.

Team Status Report for Nov 6 2021

This week was a productive week for the team. Not only did we all individually make great progress on our components, but have started making steps towards integrating all three together. Most of the week was spent working on our individual components in parallel. For details on each component’s progress, please refer to the responsible team member’s weekly status report.

The chair sensor has been prototyped and tested, with promising results. In addition, the hardware connecting the XBee module and the arduino has been completed, and configurations are underway. On the software side, the Data Hub python code has been installed on a RPi 4, and updated to include the GPIO and serial libraries and functionality. For the web application, the backend has been connected to the database, deployed, and a public API endpoint has been published for Data Hub interaction.

In terms of our schedule, we are slightly behind, but have also realized that our original schedule was slightly ambitious. Despite being behind according to our initial gantt chart, we may still be able to complete integration and testing before Thanksgiving, as planned. This is mainly due to our underestimation of fabrication times, and overestimation of testing difficulty.

Next week, we hope to finish connecting the XBee modules, and complete one integration test, sending data from the chair to the data hub, and finally pushing data to the web app.

William Foy’s Status Report for Nov 6 2021

This week I spent my time on to get the Xbee modules up and running. This was mostly spent configuring hardware to connect an Xbee to the Arduino Pro Mini. In order to program the Xbee with XCTU it has to have a serial interface. We discovered that we could program the Xbee through the Arduino. So if the Arduino is connected to a computer through the serial module and then the Arduino is connected to the Xbee, the Xbee can be programmed as long as the Arduino is running a blank sketch.

We ran into some challenges connecting the Xbee modules due to the non breadboard compatible pins. We had to wire wrap and solder some wires onto the 4 pins we needed on the Xbee. We then connected these pins to the Arduino (power, ground, tx, and rx). By the end of the week we were able to successfully have XCTU discover the Xbee through the Arduino and we can program it. I also worked a bit more on the chair sensor code to be more robust and correctly check occupancy every few seconds. We also ordered some breakout boards that allows the Xbee to be breadboard compatible, so we will use those once they arrive.

Going forwards we need to wire up another Xbee on the Raspberry Pi so that we can correctly configure the two Xbees on the same network and test the communication. We also need to ensure we are prepared for the demo this upcoming week. I think we should be good to show the chair sensor and possibly the RPi to website communication. We might try to get Xbee working by the demo too but that is undetermined.

I think I am making good progress and on schedule. Getting zigbee communication working between the Arduino and RPi is the last big hurdle which we should be able to accomplish this week. We will make a new schedule for the last few weeks based off of our current status. I think we are on track to have a functional product that meets our requirements by the end of the semester.

Nathan’s Status Report for Oct 30 2021

What did you personally accomplish this week on the project?

This week, I finished the CRUD operations of the backend server. It interacts with MongoDB Atlas as discussed last status report. Now, the backend server is able to handle post requests of create_hub, create_seats, update_seats, delete_hub, delete_seats and the important get request of get_free_seats.

A major change that I implemented was in the database schema. The updated one is as follows:

const Seat = new Schema({
_id:String,
occupied:Boolean,
}
)
const Hub = new Schema({
_id:String,
seats: {
type:Map,
of:Seat
}
}
)
The most significant change here is that the seats are in a Map, rather than an Array. This needed to be done to increase efficiency of indexing / getting a given seat. The Map allows for id-based retrieval in O(1), while the Array is limited to a find of O(n), where n is the number of seats in a datahub.

I ran into many challenges during this stage, as there is a lot to implement and get working with the cloud database. Specifically, I had errors with the routing and retrieving parameters from the request correctly, as well pushing well-formed data to the cloud database. All these errors were solved this week.

Is your progress on schedule or behind?

I am on schedule with my parts and feel confident moving forward. I expect that as we move further into the implementation part, we will have a lot more roadblocks, so I will be working hard in the weeks to come. We are gradually receiving our ordered products, and so far they all seem to be on schedule!

What deliverables do you hope to complete in the next week?

This week, my task it to continue working on the web application. The main task is to get a public endpoint up and running so that the datahubs can act as the clients interfacing with the server. Additionally, I aim to get 25% progress on the frontend of the website. I can’t wait!

 

William Foy’s Status Report for Oct 30 2021

This week I spent all my time on getting the capacitive sensor working. The first part of the week was spent experimenting with the Arduino Pro Mini and soldering on header pins. I also did research on how the Capacitive Sensor Arduino library works and how to use it. We also struggled to find and bring aluminum foil to the lab but once we did were able to configure the hardware for the sensor. We first tested the sensor with a small piece of foil and different resistor values. We first tried 10MΩ but then upped it to 30MΩ which worked better. We also used a 100pF capacitor to smooth out any noise which worked well.

After getting the small piece of foil to pick up a human hand we wanted to try using foil underneath a chair. We used a chair from the common space outside the lab and taped some aluminum foil to the bottom of the chair. A wire was run from the foil to the Arduino. We used the same setup with 30MΩ resistance and 100pF capacitance which worked very well. The capacitance that the library output with this setup resulted in the capacitance at least doubling when someone sat in the chair. This large difference was detected by the foil underneath the chair. We were very pleased with the performance and the solution since we can hide the aluminum foil underneath chairs without the user even noticing.

A video of the sensor working can be seen here: https://18500f21.slack.com/files/U02B5N4M0AH/F02KFNDMF9Q/image_from_ios.mov

I think my progress is on track after getting the sensor to work. I will work on the Arduino code a bit more to start building a module that will continually detect changes in occupancy and using some sort of hysteresis method to stop changes from being reported when they shouldn’t be.

This next week I plan to work on the Xbee configuration to get Zigbee communication working. This will entail wiring the hardware together and using XCTU to program the Xbee modules. I hope to get Xbee communication working on the Arduino side by the end of the week and hopefully get communication with the Raspberry Pi functional.

Team Status Report for Oct 30 2021

Going into this week, the largest risk for our project was the capacitive sensor and getting it to work to detect occupancy in a chair. Without a functional sensor our entire system becomes worthless. We worked outside of class time this week to configure the hardware for the capacitive sensor to see if our current plan of utilizing the Arduino Capacitive Sensor library was viable or not.

For the capacitive sensor we developed a working proof-of-concept! We put a piece of aluminum foil underneath a chair with a wire attached from the foil to a digital pin on the Arduino. We also used three 10MΩ resistors to form a 30MΩ resistance between the receive pin and send pin that the library utilizes. We were able to sense a large change in capacitance using the library when someone sat in the chair and then stood up. We will work to refine the sensing and add some hysteresis for the sensor to be more robust in the future. A video of this proof of concept can be seen on slack here:

https://18500f21.slack.com/files/U02B5N4M0AH/F02KFNDMF9Q/image_from_ios.mov

Our other risk factor going forwards is the Xbee communication. We are fairly certain we can get Xbee to work between the Arduino Pro Mini and the Raspberry Pi, but this is a vital part of our project and if something goes wrong we will need to do a large pivot to get communication working. Zigbee is the route we want to go, if the Xbee’s we bought lead to issues we could consider other modules that support Zigbee communication.

The only design change we made this week was the battery we will need to use. After talking to Joel we think we will order a high capacity LiPo battery which should be better for our needs than using 6 AA batteries. We still need to order a battery and test it out, which we will focus more on once we get the Zigbee communication working.

No major changes were made to our schedule, we are on track now especially after getting the capacitive sensor to work.

Jonathan Cheng’s Status Report for Oct 30 2021

This week was a productive week for the myself and for the team. I spent the earlier half of the week drafting the Data Hub project code, making sure to focus on readability and modularity. The end result should be something that is portable and easy to maintain. In addition, I wrote unit tests for the python functions that I drafted, and ran them with PyTest.

I also was in charge of creating the data schemas that our components will interface with each other through. I used a protocol called Json Schema to define the chair-to-hub schema, as well as the hub-to-backend schema. Furthermore, I wrote validators for the schemas, which will take a json object and validate the data structure against the schema definition. I also tested these validators with PyTest.

Towards the end of the week, I paired up with Will Foy to get the chair sensor up and running. This was not part of the plan, but we saw that the sensor was the top priority of the week, and needed to be fabricated as soon as possible. As such, I helped Will in any way I could, but I was mindful to defer to his instruction, as this was his project component. Fortunately, together we got the chair sensor up and running on an actual chair, and initial testing shows that it can indeed detect a human sitting on the chair, which is promising.

Next week, I hope to set up a raspberry pi with the python code that I wrote, and wire up an XBee to it, and see if communication between the chair module and data hub is possible. While this is a simple task, I predict that uploading the code to the RPi, with properly managed dependencies, as well as making reliable hardware connections, will be easier said than done.