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.

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.

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.