This is was our final week of work. Our goals for this week were to implement the EEG reading system, finish the RTC implementation, finish the alarm system including adding audio, and add a dimming feature to the screen. We were able to accomplish most of these goals and consider this week to be a very successful one.
Rich primarily worked on the RTC and alarm control system updates for this week. We were able to calibrate the RTC to a more accurate timing and further update the functionality of the clock, including setting the clock time with touch screen controls. This proved to be much more difficult than expected because of the strange format in which the the clock values are set in software–they are set in hexadecimal BCD format. We were able to do this most effectively by converting the value on the screen to a String value and then converting this string to an integer using base 16. We also encountered a lot of problems using the touch screen controls along the way, but we were able to find solutions to all of them. Rich also worked on implementing the alarm time control features using similar methods. In addition, we implemented the alarm signalling and were able turn on and off the alarm so that an audio signal was sent to the DAC whenever the real time matched the alarm time. The alarm can be turned off using touch screen controls.
Kyle primarily worked on the EEG reading aspect and was actually able to make some progress with it. The main problem he faced was the functionality of the FIFO buffer on the UART receive peripheral. The buffer was filling up and then rejecting values and we could not figure out how to clear the values from the buffer. We were able to find a way to do this and fully read and parse an EEG data packet sent out by the Mindflex headset. These data values can be printed on to the screen and were implemented as a control feature for the alarm. The alarm control checks a certain frequency band for intensity spikes once the real-time clock gets within a certain time range of the alarm-time, and if there are enough, this indicates a light sleep state. If a light sleep state is detected the alarm is triggered, waking the user up in an easy way.
Jae worked on the dimming the feature of the screen this week. He was able to get the feature worked and set 5 individual brightness levels on the screen. He worked on this aspect in parallel to the Real-time clock on a separate board. When we tried to integrate his feature with the main board we were working on, we had some issues getting the desired functionality. The screen will dim, but it will also blink with the high intensity. We are still working on a solution to this problem.
It is also important to mention that throughout this project, all members of this group helped each other with their respective tasks, other than just working on their own decided responsibility. E.G. Rich helped with the EEG headset, Kyle and Jae helped with the clock, and Kyle and Rich helped with the dimming features. Plans for the future include improving touch screen performance, improving clock accuracy, getting the dimming feature working in the fully integrated board and improving the EEG control system to better detect light sleep states.