Qiaoan’s Status Report for 04/08/2023

This week:

I tired to implement the method provided by the Madgwick paper. However, even though I tried to implement Madgwick’s method as close to the code from the paper and it can give me readings that makes sense, I still find there are many problem exists.

One problem is that the degree changes from rotation changes is not accurate. I’m still very confused about this and probably I made a mistake implementing the Madgwick filter. Based on the information I get I think Madgwick filter is a correct method to solve the problem but I still need to keep working on it.

Another major problem is gyro drift when the device is stable. When I place the gyroscope on a stable surface, the gyroscope data from the filter will still keep changing slightly. I compare the data from Madgwick’s method and the accelerometer readings when the device is placed on a stable surface, and I can see two readings starting at about the same position and Madgwick’s reading will drift from the original position. I’m not sure if I made a mistake implementing Madgwick’s method or I should apply more high-pass filter on gyro data to migitate the drift, but I will keep testing this to try to figure it out before the lab on Monday. I think Madgwick filter should be able to overcome this issue based on my understanding of the paper so it’s more likely I made a mistake.

This is a tough week for me. I wish I can have more progress on Sunday. I find a more about implementation of Madgwick code by Karlsruhe Institute of Technology here https://github.com/morgil/madgwick_py, maybe I can refer to this.

Yuxuan’s Status Report for 04/08/2023

This week I’ve been focusing on reading the data from the game and updating the data on display.  So far, I’ve been successful in reading car data such as speed and rpm from the game through it’s outgauge protocol. On the display side, I’ve found a car dashboard template implemented in HTML, CSS, and Javascript that changes once keys are pressed. I’m working on integrating the template into our own project such that when car data is received from the PC on Pi, a JS function will be triggered to refresh the dashboard page.

I’m currently on schedule as now my focus will be adjusting the GUI for the display on the controller. Next week I will continue to work on the integration and test the display effects on the second screen we bought last week.

Xiao’s Weekly Status Update (04/08)

This week for me, my work focus has shifted from electronics to 3D modeling. I have measured all the components and made rough models of them. The next step is to design an enclosure and stuff everything inside. So far on schedule.

For testing, first of all the electronics are on a piece of breadboard and functionalities can be tested. During interim demo this has already been done. Second of all, the 3d printed enclosure will be test fitted and any modifications can be made easily. After the whole assembly is complete, the battery life will be tested by keeping it connected to the computer for a long time and record time. The controls will be tested by seeing raw input values in the game and comparing that to our desired values. If anything is not working as expected, we either have the member responsible to make changes, or declare the design feature a failure.

Yuxuan’s Status Report for 04/01/2023

This week I’ve been focusing on integrating the Bluetooth connection module with the emulator mappings. RPi and laptop can now use Python via Bluetooth by sending JSON packets that encode the raw button input format. On the PC side, after receiving the packets, the program can decode the value and maps the keys in JSON to the emulator which presses or releases a button based on the values of the raw button input in the JSON packet.  I also updated the README on Github which details how to pair RPi to the laptop.

The next step for this weekend is to continue to work with my team members to integrate the hardware part, especially the button reading section into the program. Once the real button values are encoded in JSON packets and sent to laptop, we will have a full pipeline for interim demo.

Qiaoan’s Status Report for 04/01/2023

This week:

I keep working on the code for calculating the current angle of X, Y, Z axis. Currently we already have code to calculate the angle output from the accelerometer. However, this works best only if the gyroscope is not shaking too much. The current code aims to allow my partners to use the data for the demo session if possible.

The accelerometer code looks like this:

When the gyro is stable, it can correctly generate angle readings like the following rotation on z axis:

[Wordpress starts blocking me from uploading images now, I tried to remove eariler files, reduce resolution but both methods doesn’t work, I can show it during the demo session next week]

However, as I stated above, the algorithm is not very resistant to shaking. We need gyroscope data to help overcome this issue. The Madgwick paper provides a solution to combine two types of readings together. Figure 3 of the Madgwick paper provides a good explanation to its method (I cannot upload it here due to the wordpress issue). It’s clear that the method is quite complex, and I do need more time to look into this and think about how to implement the method. Luckily the paper has code appended to it, but I think I really need to fully understand it first before using it.

Here is the end of the report for this Saturday, I wish I can have more findings this weekend. I still have some questions about the paper and I will ask faculties about them if I cannot figure it out by the weekend.

 

 

Team Status Report for 04/01/2023

This week for our team has been mostly related to integration and collaboration. Hardware setup (wiring and basic hardware interfacing code) has been completed by Xiao, and hardware has been handed over to Qiaoan for further development on IMU algorithms. Yuxuan has acquired another RPi and has been doing development work on Bluetooth transmission and gamepad emulation on Windows. Both Xiao’s and Yuxuan’s parts have been demoed in our weekly meeting to all team members, and development on the gyro algorithm (Qiaoan’s part), as well as integration, is ongoing.

This weekend before our interim demo, we are all focusing on integration. After chatting with faculties on Monday, we decided that our demo should have a complete pipeline working, that is, from hardware key presses, to transferring hardware state over bluetooth, and eventually to reading hardware status on Windows and emulating an XBOX controller.

We are on schedule for now. Integration has its difficulties and quirks, but we have planned for that and have two days working on it. Current expectation for interim demo is unchanged.

Xiao’s Weekly Status Update 04/01/2023

The first half of the week I was focusing on getting a test bench style hardware setup.

The above test bench was what I ended up with. It can be connected to any wifi network for our team members to use anywhere for development. At this point, hardware setup for the preliminary demo is all complete. IMU is able to output raw data (acceleration, gyroscopic, magnetic, each with 3 dof). ADC reads raw voltage input from the potentiometer. All 16 buttons work.

On Monday I transferred this setup to my team mate Qiaoan for coding and testing of gyro algorithm. Over the course of this weekend I will coordinate with him to get the hardware control part all working as a whole.

As the preliminary demo is imminent, I think my part is right on schedule, but could have gone a little bit faster.