Jason’s Status Update 11/20/2021

This week, I worked on integrating the code from Albany into the STM32 library, and trying to interface with Emily’s LED code by sending LED codes to the LED arduino.

Code integration worked well, as the requirements were communicated well and ahead of time, and Albany left a clean interface to device memory for me to implement. However, interfacing with the Arduino proved much more difficult than usual. My initial idea was to use I2C, but through hours of debugging, including trying different pull-up resistor resistances and using the oscilloscope to debug, I still haven’t been able to get it working. SPI also fails to display any message on the oscilloscope.

My next plan is to work with Emily to interface directly with the STM32 registers without the hardware abstraction library (HAL) that some say is problematic, and if that fails I will fall back onto the inelegant but effective solution of using 6 separate digital pins to output the LED codes directly through GPIO. Before this is done, however, I am able to get the LED codes to output through USB serial, so debugging and optimizing Albany’s code can continue.

Team Status Update 11/13/2021

This week before class time, our team prepared for the interrim demo by finalizing the work we’ve done separately and present them in a working form. This includes the LED circuitry worked on by Emily, the data collection and signal processing by Albany, and the software interface with sensors by Jason. Overall the demo went well, with no major problems.

After the demo, Emily and Albany went to Schenley park to take some measurements with the sensor as part of the next round of testing, with the goal of getting more detailed data. The results showed us that the specs given by the manufacturer of the microwave sensor were not correct, as we were only able to get about 10m of usable range, which we will investigate this week.

Progress has also been made to the power circuitry, enabling the lights and the microprocessors to be run off battery, and the software, fixing a problem with data alignment and enabling the I2C master bus to communicate with the LEDs. We will work to start integrating the components next week, and iron out any bugs that appear in the process.

Emily’s Status Update 11/13/21

Changed the LED code so that the different zones update concurrently. Before, each LED set would update in a serial fashion, but now they all update at once. Did some testing yesterday with Albany and my car and the sensors in an empty space so that we could get some data with less interference.

Been working on the power stuff. The Arduino and the STM can now run off the battery power. I just need to select the proper inductor size for the LEDs, and those will be ready to go as well. I’m thinking of switching the microwave sensors to run off of 5V rather than 8V because it seems unnecessary to have specifically 8V for it when it can run off of 4-8V. However, some of the data that we got from the sensors seem to suggest that the output range might be proportional to voltage and not power, so that would be a problem. I’m going to do some testing on Monday to make sure that this isn’t the case before switching over to only 5V converters.

Jason’s Status Update Nov. 13

This week, we successfully demoed the components of our project separately as part of the interim demo. To prepare for this, I expanded the STM32 code to read both microwave sensors through separate UART busses, adding alignment to data headers so that the sensor data would be in the correct locations of the buffer.

Unfortunately some problems arose during the demo, in which the Python program printing out data received by the STM32 was coalesced, and was shorter than what was expected. I investigated this error through the STM32 debugger and concluded that the problem stemmed from the timing of the Python program itself, since the internal data arrays were all aligned correctly without problem.

I also did some basic profiling and benchmarking to assess the feasibility of the STM32 that we chose, and concluded that the UART reads, although slower than what we expect, exceeds our user requirement for 250ms update time (4Hz). I also found out that the time difference between two reads is negligible for our use case, and that one spectral data array occupies less than 1% of the device memory. According to Albany’s code, I have verified that the STM32 is indeed capable of running our workload well.

In the next week, I plan to start integrating the code from Emily and Albany. First I plan to write a test program to control the LEDs using the 7-bit LED codes that we agreed on, and then a ring buffer for storing data necessary for Albany’s signals code. After that, I will integrate that with the signal processing routine that Albany has written and start testing.

Albany’s Status Update 13 NOV 2021

Following up on last week, Emily and I did agree to use the communication format mentioned in my last status report to communicate between the LEDs and the SP code and a function to handle this transformation and combine data from two sensors was implemented. It also turned out that the data collected from the top of the East Campus garage was very hard to analyze, I believe largely due to the fact that a metal guard rail was running next to us during the entire time of testing. To get a new data set, Emily and I took some stationary measurements in a turnaround in Schenley Park (see picture).

This data was clearer, but worrying, and a simplified summary can be seen in the following chart.

The y = 11.35x + 11.917 equation gives a to predict the location (index) in the spectral line data in which the first peak occurs at x meters from the car. This is worrying for two reasons. The manufacture specifications indicate that a peak one spectral line index later should be 0.126m further away which would correspond to a slope above of about 8. The slope of 11.35 means that the distance between each spectral line index is only 0.088m. With 126 spectral lines this would mean we would only expect our maximum range to be 11.1 meters, but the relatively high y intercept when means that for y = 126, we really only see a max range of 10m. We plan to, in the lab on money, use a multimeter to measure the current being pulled by the sensor from the arduino to see if we are providing enough power. I would also note that all measured testing thus far has been done with one of the sensors, so it might make sense to see if this range problem exists with the second sensor as well. Theoretically, from the manufacturer, we should be able to get a range of about 20m. It is possible that the y intercept problem is introduced by us measuring from the license plate of the car while the larger metal engine block is slightly recessed, though this wouldn’t affect slope. All of the above calculations are made using the spectral lines since they are necessary for multiple object detection and are what our code uses, but I also plan to look at the 16bit distance data, though a cursory look does not seem to present an any more promising story. I am also curious, the Emily and I stopped recording data once it fell off the spectral lines, if the distance data would track for the latter half of the 20m.

Jason’s Status Update Nov. 6

This week, I focused on getting the sensors to work with the STM. So far, I have initialized both of the microwave sensors and written interrupt handlers to write data into a shared buffer. I have also  verified that it is working by reading from the STM from the Python terminal. Finally, on the STM, I initialized the I2C ports to communicate with the LED controller in the future. For the demo, I will be preparing a demo with Python to showcase the reading of microwave sensors on the STM, after which we are ready to start integrating. I also taught Albany how to use my Python code to read the microwave sensor on an Arduino, which she will be using to test the sensors on the weekend.

I have run into an issue by discovering that neither the Arduino nor the STM32 has an accelerometer, which Albany will need for signals code, but thankfully I had one on hand from Build18 last year. It provides 9 degrees of freedom, which is much more than we need. I will start integrating it next week, while providing Albany with the format of data it provides.

Team Status Update 6 November

We started the week as a team by making sure that having two sensor running next to each other would not create interference by running a quick test of them on Frew street though without particular measurements as it was just for proof of concept. We have gotten some data back for single data testing in measured conditions, but the metal railing of the parking garage seems to have created a fair amount of interference so it is hard to isolate the data from the car alone. Between Emily and Albany the LEDs have been soldered together and tested to make sure they were controllable and I believe the driver for STM is also close to being stood up. Further we have most of our 3D printed mount parts to start assembling everything into a more compact format once, though it was discovered that we would need to make an extension for the LED signaling lights as the was erroneously excluded from the print plans.

Albany’s Status Update 6 NOV 2021

This week I removed the memory management from the signals processing code and changed the functions so they used passed in arrays that could be stored on the stack to prepare the code for integration. Theoretically code integration should have happened last week, but we did have an extra integration week and refinement week built into the schedule before Thanksgiving to allow for some flexibility. I also took one of our sensors to the roof of the East Campus parking garage and recorded data from it from a selection of distances while stationary and also while walking towards and away from the target car. Finally, I also spent a couple hours in the lab learning how difficult it is to solder very small LED contacts to connection wires. Things sped up significantly after I found some better solder, and I ended up making the two side rear groupings of three LED strips each. I also hotglued over the connections for those grouping and for the handlebar and brake light strip Emily soldered to protect the connections and provide support given the small contacts. Next week I plan to discuss with Emily my current plan for passing information to the handlebar LED controller. I’ve been told we have 7 bits to control the 3 sections we have with 4 states each so each section could be controlled by two bits, leaving to possibly be flipped to indicate a new object and flash the bar. I believe Jason is also ready to integrate the signals processing code so I want to walk through the simplified version of it that currently exists with him and make sure we have remained on the same page for the interface between our code and that something hasn’t been lost in translation.

Emily Clayton’s Status Report 11/6/2021

This week I initially re-soldered some of the LEDs, and then passed that off to Albany to finish off. Last week I had created the testing code for the LEDs, and this week I made and tested the functions that the Arduino will use when receiving data from the STM. Now Albany and I had to finalize what kind of inputs the Arduino will receive from the STM, then the LED portion will be done aside from hooking them onto the bike. I uploaded this code and the CAD files that were on my W drive into our git repository.

My plan for next week is to work on getting the battery power going for the whole system so we can start testing the entire thing in real world environments. I had to rework some of the capacitor/inductor selections for the 5V and 8V buck converters, since my values from last time were wrong. Even though we have the demos on Monday and Wednesday, I would still like to get everything for the battery power sorted by then, so by next week we can start testing with the batteries.

Jason’s Status Update 10/30/2021

This week, I kept working on the Arduino to test communication with the sensor. Through some debugging of my Python client, I was able to fix the issues mentioned in last week’s status report and start streaming data to the computer in the correct format.

This enabled us to do some testing with one of the sensors, from which we observed that although the distance data may not be correct, the spectral lines seem to be outputting reasonable values from which we are able to determine the distance.

I also wrote some code to store the spectral data arrays into a .csv file for further analysis, although we did not yet get data of actual scenarios. That is planned for next week, when Emily’s bike mount will be completed.

My plans for next week also include streaming the sensor data to the computer using the STM32 to verify the device drivers, and extending the Arduino’s code to support dual sensors, so that we can test interference between sensors. If more time is present, I will also enable the built-in accelerometer on the STM32, and start writing the drivers to control LEDs.