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.

Team Status Report for Oct 23 2021

This week, we were able to reflect together on some of the ethical problems that came with our project. These include:

-Someone viewing FreeSeats to steal things when people aren’t there.

-Finding a single person in the library alone as a target for theft or violence.

-Exclusionary to people in wheelchairs.

We thought of solutions to remedy these issues, such as displaying only range of available chairs instead of specific values. Also, we can extend our project to account for those with disabilities with weight sensors if time permits. We will continue to keep these ethical problems in our minds as we implement our project.

What are the most significant risks that could jeopardize the success of the project? How are these risks being managed? What contingency plans are ready?

Progress with the team has been excellent. This week, we focused on the initial implementations of our project. We have been communicating extremely well and feel confident as a team moving forward.

Some risks we face moving forward is the workload of our other courses. As the semester picks up, we all have more auxiliary work to complete. However, we are all on the same page about keeping our Capstone project a high priority. This way, we stay on top of the schedule and make good, incremental progress.

Another is the risk of delayed shipping of our parts. We are gradually receiving the hardware parts we ordered as expected. This includes batteries and Raspberry Pi. However, some of the parts may be delayed this week. We have accounted for this risk by incorporating “slack” time in our schedule so that there is buffer time available. Right now, we feel confident we have enough work to do before the incoming parts arriving which is excellent.

The biggest risk is our hardware capacitance sensor not working. The professor raised this concern to us. Though we feel confident that it will work based on our research , we have accounted for this risk by having a backup plan with the weight sensors. This “backup” plan time is allocated within the slack time for this portion of the implementation.

Were any changes made to the existing design of the system (requirements, block diagram, system spec, etc)? Why was this change necessary, what costs does the change incur, and how will these costs be mitigated going forward?

No design changes were necessary this week. The amount of prior time spent designing is beneficial, as now, as a result, the implementation part is smoother.

Nathan’s Status Report for Oct 23 2021

What did you personally accomplish this week on the project?

This week, I worked on the ethics portion of Capstone, and reflected a lot on some of the ethical problems that came with our project with the group. These include:

-Someone viewing FreeSeats to steal things when people aren’t there

-Finding a single person in the library alone as a target for theft or violence.

-Exclusionary to people in wheelchairs

I will continue to keep these ethical problems in mind throughout the implementation and create guards in software to remedy them (ie. range of available chairs instead of specific values).

This week, I continued to work on the web application. I continued to bootstrap the cloud storage, MongoDB, which I chose due to accessibility and ease of use within a JavaScript stack. I setup MongoDB Atlas, to store all of our data in the cloud. This was chosen based on my research of cloud storages with the idea of a scalable MVP as a priority.

My basic database schema is as follows:

const Seat = new Schema({
id:String,
occupied:Boolean,
}
)
const Hub = new Schema({
id:String,
seats: [Seat],
}
)

 

I decided to follow a one-to-many hierarchy to match the nature of a study space having multiple chairs. Each seat has a boolean of occupied or not. I implemented this schema to contain the minimal amount of information needed for functionality, as that makes it simpler for our MVP stage.

I also implemented the server skeleton and client skeleton that are able to interface with each other. This is using Express.js, Node.js, and React,js, which is part of the MERN stack. For the server, it supports CRUD operations, as this is the functional minimum of a database server. The client can then interface freely with the MongoDB Atlas cloud database during the development phase.

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. I have to make 25% more progress on the server-side, and get a public endpoint up and running so that the data hubs can act as the clients interfacing with the server. I can’t wait!

 

William Foy’s Status Report for Oct 23 2021

Last week (10/10 – 10/16) I spent most of my time contributing to the design review doc. We split up the doc between the three of us and I was responsible for the system overview section and the tradeoff section.

This week (10/17-10/23), I spent the first couple of days on the Ethics assignment, in preparation for Wednesday’s guest lecture. I enjoyed Wednesday’s lecture and it was nice to get an outside perspective on the ethics of our project.

In addition to the ethics assignment, I spent this week making sure all necessary components were ordered. We had to pivot to using a different type of battery, a 3.7V LiPo with a large capacity close to 5000 mAh. I think all of our components are set to go right now.

I also started setting up an Arduino to test our capacitive sensor. We haven’t yet received our Arduino Pro Minis so I used an Uno which was available. I started getting familiar with the CapSense library and figuring out how to connect the aluminum foil to the board.

I think I am slightly behind on schedule. I need to pick up the pace in terms of getting the proof-of-concept for the capacitive sensor working since that is a vital part of our project. Next week I hope to fully test the sensor and tune it with appropriate resistors in order to pick up human presence. If I can get the capacitive sensor to a good state next week I will be back on pace.

Overall our team is moving ahead nicely and we are collaborating as a team. JJ and Nathan have both made great progress on their respective parts of the project as well. After we get all components delivered and the capacitive sensor working we’ll be in good shape going forwards.

Jonathan Cheng’s Status Report for Oct 23 2021

This week, I spent the first couple of days focusing on the Ethics assignment, in preparation for Wednesday’s guest lecture, which was enlightening and provided me with some valuable insights about our project’s ethics.

After the Ethics assignment, I started drafting up the Python code that would run on the Raspberry Pi. Specifically, I set up the team’s github repository, as well as the project structure. Then, I used jsonschema (a standard for defining json data models) to flush out the exact data structures being transmitted to and from each of our project components. Each component should use these schemas to validate all data sent and received, as the jsonschema standard has implementations in many languages. I then wrote my own validators for the schemas in Python, and tested them with my own PyTest tests, marking the beginning of the Raspberry Pi test suite.

After this, I begun writing the main script that will operate on the Raspberry Pi. The main logic involves reading the GPIO pin data for XBee-received information, processing that data into JSON, validating it, and modifying internal program state to reflect the received updates. In addition, I’m using the Python Time library to embed a countdown timer to program the 15-second timed backend API updates.

Next week, I hope to finish this program, test it on my local machine, and then load it onto an actual RPi, and see how it performs on the target machine.

Jonathan Cheng’s Status Report for Oct 16 2021

This week was focused entirely on completing the design review, which was a challenge because of midterm exams and projects all due at the same time. However, our group did manage to get the Design Review Report done by the end of the week. After completing my part of the report earlier on in the week, I focused on submitting purchase and borrow requests to the ECE department, and also researched on which models of the hardware components would suit our use case the best. The conclusions I made are reflected in the bill of materials, as well as the research results of my teammates.

For the Design Review Report, I was originally tasked with the Design Requirements and Architecture Overview sections, but also contributed to the System Design and Testing sections of the report, due to a time crunch we were facing.

This weekend I hope to finish the Ethics assignment early. Then, I plan to pick up the borrowed raspberry pi’s from the ECE inventory desk, and start implementation of the central data hubs.

William Foy’s Status Report for Oct 9 2021

This week was mostly spent listening to other groups’ design review presentations and giving feedback. I also helped JJ prepare for our presentation and he did a fantastic job. For our project, I continued to do some research for the chair module regarding the Arduino code that will interface with the capacitive sensor and the Xbee. I have been exploring XCTU and how we need to set up the Xbee modules. We also need to start ordering components, specifically Xbee modules. The ECE department should have RPis and Arduino Nanos that we can use. I also put in a request to get AWS credits for our cloud-based web app.

I think we are on schedule still. We will finish up our design review this week and then can dive right into implementation. Everything on the preliminary research end should be wrapping up soon.

Next week I plan to work on our design review document for submission Wednesday. I also want to get all of our components figured out, whether ECE already has them or we need to order them. Finally, I want to start testing the capacitive sensor with an Arduino as soon as we get on.