Week 3

This week was Thanksgiving, so time to work was limited.  We demonstrated that each individual module was working.  Our central Bluetooth chip also arrived and we began working with integrating that into our design.  The central unit was able to connect to all of the peripheral chips, but we are currently limited by the fact the central and peripheral chips have different baud rates.  We have ordered another set of Bluetooth chips as a backup in case we are unable to change the baud rate on either of the current chips.  They should arrive by the end of the week.  We no longer plan to create our own seven-segment display due to time and budget concerns, but we are still planning to solder the parts to a PCB and put it in a case. There are also a number of small things that need to be polished, such as cleaning up the LCD display.

Week 2 Status Update

This week our goal was primarily to implement the alarm clock control system. We wanted to get the alarm button working to see the alarm time, be able to change the alarm time, and be able to turn the alarm on and off. In addition to this, we wanted to be able to set the time of the normal clock. Second, we wanted to begin testing the capability of the EEG headset we were planning to use and begin trying to read data off of the headset. The goal for us was to get the data in a somewhat functional format.

To address our first goal of implementing the alarm clock control system, we did not fully implement the alarm system yet, however we did make a lot of progress implementing the Real-Time Clock (RTC). We have the external oscillator wired up and we are managing to use it to control our clock value. We are also able to set the clock value at anytime. We should pretty easily be able to fully implement the alarm system in the coming week with the RTC working and all of our touch screen buttons and time setting controls working perfectly. Rich primarily worked on this portion of the project.

week2Oscillator

We also managed to make a lot of progress with the EEG headset. Kyle primarily worked on this part of the project. We found that the headset was working as expected and we still believe that the headset will be useful in our system. This week we soldered some connections onto the chip in order to get packaged data off of the chip. We connected the data lines to the set RX pin on the PIC-32 and began trying to read the data from the headset using the UART functions in the PIC-32 peripheral library. We based the code to package the data in our system off of the Brain project to read data onto an Arduino board. Link to GitHub project: https://github.com/kitschpatrol/Brain

Unfortunately, we still have not been able to package the EEG data correctly. We believe this to be an error in the way we are using the UART functions. We plan to attempt to learn more about the UART functionality on the PIC32 this coming week.

Week 2- Joe

After two weeks of working on the project, we realized that our project might be too complex to complete in the given time frame. In order to make the project more manageable, we proposed that the criminal database portion of the project be dropped. This was decide upon because the two main functionalities of the project, the fingerprint scanner and the SD card reader/sound production, have been taking a considerable amount of time thus far and still need large amounts of addition effort to complete. In addition, we could run into difficult down the road with transferring and comparing fingerprint files on the PIC as the details of this have not yet been worked out. Instead, we’d like to have the fingerprint scanner handle all fingerprint comparisons for the time being. This way, the focus of the project could be redirected to the two main elements. The terms of the project were renegotiated with the professor, and he accepted the exclusion of the criminal database.

I attempted to set up UART communication with the fingerprint scanner. This is being done with the aid of a pre-made code on GitHut in C++ for an Arduino. According to the fingerprint scanner datasheet, the scanner takes 12 bytes of data for every command packet, so twelve bytes are sent from the PIC to the fingerprint scanner per action. It has been verified on the scope that this data is being transmitted correctly. At the moment, the fingerprint scanner is having trouble receiving the data. The signal, for some reason, is being pulled down when the TX from the PIC is pulled into the RX of the fingerprint scanner. It was thought that the fingerprint scanner needed more power, but after supplying 5V to the power supply of the scanner instead of 3.3V, it was clear that this was not the case. Further troubling shooting will be completed in lab.

Plans for this coming week include getting the fingerprint scanner to communicate properly and creating methods to carry out the necessary communications between the PIC and fingerprint scanner.

Week 2 Status -Austin

This week, I focused on creating a TCP client using the TCP/IP stack that Microchip supplies in their MPLAB Harmony package. I have not yet been able to send data from the PIC32 client to a server on my personal laptop, but I’m nearly certain the problem just lies with the code and not how the hardware is connected. Unfortunately, my efforts will be redirected to the Fingerprint Scanner and Interface for the time being. I hope that we resolve the issue with the Fingerprint Scanner so that we could potentially re-implement the TCP client/server.
Over Thanksgiving, I will try to work on a control interface for our system. The interface will display components such as who has recently used the fingerprint scanner and at what time they used it. After break, I will work on the Fingerprint Scanner with Joe. I will initially help decode the C++ library that Joe started using for the Fingerprint Scanner.

Week 2 Status -phil

A lot of time was spent working on the SD card and FAT32 interface. Both are now complete. A few weird bugs were discovered while working on reading the SD card, one of which took hours to resolve and still does not have a solution, but has been worked around. Once the SD card interface was deemed satisfactory, work was started on accessing the FAT file system of the SD card. Most of the libraries for FAT were very lengthy (at least 1000 lines) and were difficult to understand for someone who is fairly new to C. A fairly simple FAT16 library was used as a guideline for creating our own FAT32 accessing code. The code can interpret the boot sector, go to the root directory, then read data one sector at a time and follow cluster chains. WinHex, a memory viewing software, was very useful for verifying what data should be read at certain data locations.

The next step is to work on using DMA to output buffered data to the DAC in parallel to reading new data. Timing may be an issue because the data has to be read and formatted for the DAC before a DMA transfer finishes. Also a 12 bit DAC is being used for 16 bit data samples, so the sound quality will be decreased in downsizing. If the quality sounds poor, we may need to upgrade to a 16 bit DAC.

Week 2

We added addresses and sources to the UART protocol we’ve been using for both debugging purposes and looking forward to when we will have more than one player.  Also we encountered a problem regarding our Bluetooth implementation.  LE Bluetooth requires both central and peripheral modules to operate but we only have a chip for the peripheral half.  On Friday we ordered a chip so that the host can act as the central hub of the peripheral Bluetooth modules, but it has yet to arrive.

Nick Falco continued to work on the player module, refining and improving it.  It now is battery powered and has three working single digit seven segment displays that draw voltage and current from the battery pack as opposed to the PIC. Bluetooth has been added to the player module and has been tested via bluetooth terminal.  The visitor module also will take direct commands from the host module when hard wired together.

Brandon Smith continued working on the host module.  The touchscreen is fully functional and the module is now running off of a battery pack as well.  A C++ compiler was found and added to the development environment to potentially make use of C++ libraries for the Bluetooth chips and a C library for running Arduino-based code on a PIC device.  The UART portion of the module is working when used on its own.  It also appears to work over Bluetooth, using one of the peripheral chips we have to test it.

The Bluetooth situation has caused significant delay to our progress.  While we have the peripheral module working we do not yet have the central module.  Other than that though we did manage to catch up to our schedule otherwise.  We still have some extra time to play around with but if we can’t get the central chip to work out we will start to fall dangerously behind.

Week 1 Status- Austin

This week, my goal was to create a TCP server that could open a socket and listen on a specified port. It needs to be able to accept multiple types of data. The server will distinguish what the data is via op-codes sent by the client. Types of data the server must be able to receive: time of fingerprint, if the authentication was successful or not, and if yes, who’s fingerprint it is.

Status- Server is works fully, all operations work as intended. Mock client can connect to server, send multiple data types (and receive data too, if necessary), control certain functions of server, and disconnect from the server. Server side code implemented in Rust. I don’t believe there would be a problem have the server in Rust and the client in C/C++, but I’ll need to implement a client using Microchip’s PIC32 TCP stack in order to test.

 

Goals for next week- Implement the TCP client using Microchip’s TCP stack.

Week 1 Status -phil

Week 1 mostly consisted of figuring out the steps needed to interface with an SD card from the PIC. Multiple sources were found that discussed and gave example code about SPI transfer and the inner workings of the file system on the card (FAT32). Initially a C++ library was going to be used for interfacing with the SD card peripheral, but this was dropped in favor of a simpler C library. The C library is currently being adapted to work with the PIC32 and the SDHC card being used. The SPI module was the first area looked at and was successfully modified to work with our devices. There was a troublesome reading issue with the PIC where the SD card would send a signal and the PIC would not accept it into the SPI receiver buffer. This was due to an overflow flag, which prevented new information from entering the buffer. The overflow register was reset before every read event in order to fix the error.

Status Report Week 1- Joe

For this week, my goals were to make the schematic diagram for the system as well as to do research on how the fingerprint scanner will interface with the PIC. I’ve completed the schematic which is included below. This involved looking up how each device will communicate with the PIC and detailing what pins would be used for each device. It has been arranged so that the SD card reader and the Ethernet Module are on one SPI channel, and the LCD and the DAC are on the second SPI channel. The fingerprint scanner will communication via UART connection. In addition, I’ve found a library for the fingerprint scanner on Github.com which is in C++. I also soldered wires to the SD card reader so that it could be plugged into the breadboard and taught Phil how to solder while doing so. For next week, I will be working on converting this library to C and setting up the fingerprint scanner.

Schamtic

Week 1

We began programming the player and host modules.  Brandon worked on the host module, and currently has the touch screen and scoring mostly functioning, but the UART communication has a few bugs that need to be dealt with.

Nick worked on the player module using a borrowed micro stick.  The buzzer input-capture and LED’s are in full operation and are controlled and communicate via UART.  The players score can also be controlled via UART.  The only problem is with the seven segment displays.  When outputting the values on the oscilloscope they look perfectly fine, but the results from the actual board tend to differ.  I believe and also hope that this is a current restriction on the PIC that we will be avoiding in the final product by using the battery packs and a MOSFET arrangement.

We were not able to start running the modules off batteries because the battery packs have not yet arrived.  Our Bluetooth modules have arrived, but still need to have their pins soldered to them, be attached to the circuits and be configured.  That is our plan for next week.  We also need to finish programming the modules.  If the batteries and voltages regulators arrive, we will also try to start running the modules from them.