Olivia’s Status Report for 4/20

This week I added the Manual Adjustment page to the GUI which will allow users to adjust both angle and height of the stand using button clicks that send serial commands to the Arduino similar to the system used for automatic adjustment.

I also created a focus tracking program using OpenCV that tracks the direction in which a user is looking to determine whether they are looking at their screen. This program keeps track of variations of both horizontal and vertical distances between key facial landmarks to periodically check the user’s head position, and if they have been consistently looking forward at the screen for 20 minutes, not including small breaks or movements, then they will receive a notification in the GUI reminding them to take a break to prevent eye strain. I also wrote a similar, simpler program that periodically detects whether a face is detected in frame which will be used to send notifications via GUI when a user should get up to stretch after long periods of sitting in front of their screen.

I was also able to begin testing the automated adjustment process using the linear actuators on our stand and adjusting the height of the stand manually. I tested the angle adjustment by opening my laptop to several different angles, undergoing calibration, running the angle adjustment code in the integrated subsystem, and tuning the time needed between feedback checks in OpenCV/Python. I found that 250 ms is the smallest delay that can be used between checking landmark distances before the angle adjustment becomes noticeably inaccurate.

I am currently on track, and next week, I plan to integrate the focus tracking aspects to the GUI. After we are able to supply enough torque for the platform jack’s screw rotation, I will more thoroughly test the height adjustment with the automated system.

New Tools and Knowledge:

Over the course of this project, I learned how to use OpenCV and other computer vision tools such as trained models for object classification and detection. To learn about these topics, I used many online tutorials, videos, and the OpenCV documentation to learn the basics of CV programs, and I wrote a bunch of smaller test programs to test out and learn about new features and how I could use them in our project.

Mary Rose’s Status Report for 4/6

This week I finished the serial communication between the laptop and the Arduino. While there are still some minor syncing issues with the current implementation, it is reliable enough to achieve MVP. In addition, I rewrote the code for the height and angle motors so that it will be compatible with the new motor driver. This includes a function that will allow the two linear actuators to move at the same time.

As of right now, I am a little behind schedule. Because of issues with the motor driver not providing the stepper motor with enough power, I was not able to get the hardware completely integrated, which would have allowed me to move on to integrating the Bluetooth setup. This week, I plan on finishing the hardware integration (with serial communication) and creating the top for the stand (with slots for the linear actuators) in Solidworks.

Olivia’s Status Report for 4/6

This week I continued working on the GUI and added additional pages and features. I added a new page that allows a user to choose whether to calibrate their stand for the first time or to adjust the stand based on prior calibration data. This way, users can skip the calibration after they’ve gone through the process once. I was able to integrate the height and angle adjustment program with the Arduino via serial connection, and we are able to automate the motor and linear actuator movement.

I have done some testing with the height and angle adjustment to make sure that the algorithm we use is able to determine the correct height and angle for a user when starting from different heights and angles. I will continue testing this when we integrate the software with the stand in order to tune and make some adjustments to the time between feedback checks and speed at which we turn the motors in order to reach the ideal height and angle within our desired time limit.

I am currently on schedule. Next week I plan to add more pages to the GUI to display posture tracking data as well as implement eye tracking to the software in order to send users notifications when they have been focusing on their screen for long periods of time.

Mary Rose’s Progress Report for 3/30

This week I created the parts that will hold the motor stable while it raises the laptop stand. This required precise measurements of our current design. The final pictures of these pieces are shown below. I also re-worked the motor code for both the height motor and the linear actuators so that it will work with the new library. In addition, I got started on implementing serial communication between the laptop and the stand as this is part of our MVP for the interim demo. Using serial communication will make it easier to communicate between the software and the stand for the demo, but we will rework this using the Bluetooth code i wrote earlier for the final product. I plan on having the serial communication finished and tested by next week, as well as the code for the stepper motor and the linear actuator fully tested, and I am back on schedule.

Olivia’s Status Report for 3/30

This week I wrote the Python code that would carry out the height and angle determination of our system. The process will first need a calibration stage in which the user’s landmark data will be captured when their laptop is at the ideal height. Then, any time the user uses the device again, this data will be used as reference for determining whether to increase or decrease the height and/or angle of the laptop. The program uses an iterative process of incrementally increasing or decreasing the angle of the laptop until the vertical distance between landmarks is approximately the same as the reference distance from calibration, and then switching to adjusting the height of the laptop until the y-coordinate of the landmark at the center of the face is within threshold of the position determined at calibration. This method proved to be pretty accurate even when starting at different heights and angles.

I am also working on a method that uses position of key landmarks on the frame’s coordinate system in order to determine the height and angle adjustments that will be needed. In this method, we wouldn’t need a calibration stage for the user which may be more convenient and faster, but it seems to be less accurate in my testing.

I am currently on schedule and will continue working on this software next week and am planning to have this height and angle adjustment code integrated with the Arduino firmware in order to move the motor and linear actuators according to which adjustment is needed.

Team Status Report for 3/30

This week, we met to work on integrating the mechanical aspects of our project with our software. We worked on putting together the mount that will be attached to the stand to hold the motor and tested the motor code with the Arduino and the motor which proved to be successful. We are continuing to work on integrating the OpenCV programs and height adjustment process with the firmware for the interim demo.

Currently, the most significant risks we are facing with our project is the mechanical design and making sure that the modifications we made to the screw of the jack will allow the platform to raise smoothly and not break. Additionally, the mount we created to hold the motor will need to be sturdy and securely attached to the beams of the jack to allow the motor to be joined with the screw in order to automate the height adjustment process. To mitigate these risks, we have thought of modifications that may need to be made to our CAD designs in the case that there are issues with the stability and size of the mount.

Due to the incompatibility of the Arduino Uno Rev4 with the L293D motor driver that we had previously purchased, we made a change to the design of the system by switching the Arduino with an older version, the R3. This is a component that we already had on hand, so no additional charges are incurred.

Mary Rose’s Status Report for 3/23

This week I worked on designing the connection between the screw and the motor, as well as the stand and the motor. I included a sketch of the design for the block that connects the motor to the screw. This block will then be attached to the motor, allowing it to turn. The other component will attach to the bar of the platform jack to stabilize the motor while it turns the screw. My sketch for the block, and my inspiration for the motor stabilizer are shown below. The second picture is from:  https://www.thingiverse.com/thing:6161381/comments

Because of the need to create these new components, I am running a little behind in testing the code for the motors. However, I let my teammates know, and they are prepared to help if they need to.

Next week, my goal is to have these designs ready to print, and finish testing the motor code.

Olivia’s Status Report for 3/23

This week I continued working on our automatic height and angle adjustment software. After discussing with the team, we decided to do a multiple iterations of height and angle adjustment to incrementally reach the correct position rather than calculate the exact height and angle needed for adjustment. The method I am considering is to use both the vertical distance between landmarks and the y-coordinate of the facial landmark in the middle of the user’s face to determine whether the screen is positioned at the correct height and angle. Using these two measurements, we can switch between incrementing height or angle by an interval and checking these measurements until we reach an acceptable threshold of vertical landmark distance and position of the face on the screen.

I also worked on creating the GUI for our system and added the front page with buttons to choose between opening a window to use the adjustment functionality or to view the posture tracking data. When a user clicks the adjustment button, the calibration and height determination program will run.

I am currently on schedule and am aiming to finish the iterative adjustment cycle and have it coded and tested by next week.

Mary Rose’s Status Report for 3/16

  • This week, I worked on finishing the Bluetooth implementation from the laptop’s end. I also tested it by connecting to each characteristic and checking that the outputs were correct via printing from the serial monitor. I also began working on a function that given the number of rotations the motor needs to make, the motor will run. I may need to re-write this function, as our team is working on selecting a new motor, however as we will still be using the same motor shield to interface with it, this code will be useful.
  • I was able to catch up to where I am supposed to be on the schedule.
  • Next week, I plan to have the code for both motors (the height motor and the linear actuators) fully finished and tested.

Olivia’s Status Report for 3/16

This week, I worked on a function that get the real life distance a laptop would need to rise based on the distance in pixels. To do this, I’m using the camera calibration as described in the OpenCV documentation to find the focal length of my camera and used these in my calculations assuming the distance from the screen is constant.

I also integrated the calibration setup for gathering facial landmarks with the current landmark distance calculation, so that we are using the calibration data points to calculate the reference difference and compare them to current landmarks. I’m able to detect if the camera is at a height lower than the one determined at calibration, higher, or within threshold.

However, when neither the height or pitch of the laptop are known, it is difficult to determine whether the correct course of action for the system will be to raise the height of the stand or to angle to the laptop using the linear actuators since either a change in height or change in angle can produce similar results in vertical landmark difference. In order to solve this issue, I’m working on using a few vectors between landmarks to measure the skew of certain sections of a user’s face to be able to decide if the camera is at an angle or at a height difference.

I am currently on schedule, and next week I will continue working on this height vs. angle determination. I also hope to begin creating a starter GUI to display basic functionalities such as calibration and setup.