Finishing Wiring and testing. Issues with the parts we ordered. Parts connect and work well but the circuit is not reading correctly (Jacob)
Start Printing the fusion model. Will be taking multiple attempts because there may be many errors with how the print comes out (Diego)
Pre processing and real time processing (Jeremy)
Weekly Report. Learn to bluetooth (Vihan)
Construct and test
Coordinator and Fusion Specialist
This week, I worked on the EEG placement on the head and continued developing the helmet. My focus was on positioning the EEG components accurately to ensure proper functionality while also refining how they fit within the helmet structure. I made adjustments to improve stability, comfort, and overall integration. This stage helped strengthen the design and marked an important step forward in combining the technical components with the physical build.
Electronics Specialist and Lead Designer
This week, I focused on testing everything out. I identified the location of the filament and continued developing the posterior part of the head. I worked on improving how the components fit together and made adjustments to increase stability and comfort. Throughout the process, I tested different parts of the design to make sure everything functioned properly and reliably. This helped strengthen both the structure and overall performance of the project.
Researcher and Historian
This week, I helped wire the RC car and tested it to see if the wheels began spinning properly. I also worked on troubleshooting the ESC and motor connections to ensure everything functioned correctly. In addition, I researched Bluetooth chips and explored how they could be used to enable wireless control of the car for future improvements to the project.
Lead Coder and Technical Documentation Lead
This Arduino program reads brainwave (EEG) signals through an external ADS1220 using SPI communication, alternating between two channels to collect voltage samples. It converts the raw 24-bit data into normalized voltage values and stores them in arrays. Once enough samples are gathered, it uses the ArduinoFFT library to perform a Fast Fourier Transform (FFT), which converts the signals from the time domain into the frequency domain for analysis of brainwave patterns. The program continuously outputs the sampled voltage data to the Serial Monitor while repeatedly collecting and processing new data.
// Fast Fourier Transform Setup
const int FFT_Size = 32;
const int Sample_Rate = 1000; // 5000 Hz
double lastSampleTime = 0;
double vReal_1[FFT_Size];
double vReal_2[FFT_Size];
double vImag_1[FFT_Size];
double vImag_2[FFT_Size];
int Sample_index = 0;
ArduinoFFT<double> FFT_1 = ArduinoFFT<double>(vReal_1, vImag_1, FFT_Size, Sample_Rate);
ArduinoFFT<double> FFT_2 = ArduinoFFT<double>(vReal_2, vImag_2, FFT_Size, Sample_Rate);
/* Will have an output pin and input one */
void setup() {
// Serial Monitor
Serial.begin(9600);
// SPI Setup
pinMode(Slave, OUTPUT); // Sets the slave select as an output
digitalWrite(Slave, HIGH); // Disables the selected slave
pinMode(DRDY, INPUT); // Sets the data ready pin as an input
SPI.begin();
delay(100);
SPI.beginTransaction(adsSPI); // Begins transaction
digitalWrite(Slave, LOW); // Initializes communication
SPI.transfer(CMD_RESET); // Resets the ADS 1220 to its default settings
digitalWrite(Slave, HIGH); // Stops communication
SPI.endTransaction();
delay(10);
writeRegister(0, 0b00000110); // Default Settings with 8 gain
writeRegister(1, 0b10000100); // Normal operating mode, continuous conversion mode, 330 SPS
writeRegister(2, 0b00110000); // 60 Hz rejection
writeRegister(3, 0b00000010); //
}
/*-----------------------------------------------------------------------------------------------------------*/
void loop() {
unsigned long now = micros();
if (now - lastSampleTime >= (1000000 / Sample_Rate / 2)){
lastSampleTime = now;
if(Sample_index % 2 == 0){
if(digitalRead(DRDY) == LOW){
int32_t Sample_1 = Read_Channel();
double Volt_1 = Sample_1 / 8388608.0; // Normalizing Voltage
vReal_1[Sample_index / 2] = Volt_1;
vImag_1[Sample_index / 2] = 0; // Imaginary voltage can be 0 because it is not required to find the frequency
Serial.print("Voltage Value of 1:");
Serial.print(Sample_1);
Sample_index++;
writeRegister(0, 0b01010110); // Switches to second channel
delayMicroseconds(200);
}
}
if(Sample_index % 2 == 1){
if(digitalRead(DRDY) == LOW){
int32_t Sample_2 = Read_Channel();
double Volt_2 = Sample_2 / 8388608.0; // Normalizing Voltage
vReal_2[(Sample_index - 1) / 2] = Volt_2;
vImag_2[(Sample_index - 1) / 2] = 0;
Serial.print("\t");
Serial.print("Voltage Value of 2:");
Serial.println(Sample_2);
Sample_index++;
writeRegister(0, 0b00000110); // Switches to first channel
delayMicroseconds(200);
}
}
}
if(Sample_index >= 64){
Sample_index = 0;
FFT_1.windowing(FFTWindow::Hamming, FFTDirection::Forward);
FFT_1.compute(FFTDirection::Forward);
FFT_1.complexToMagnitude();
FFT_2.windowing(FFTWindow::Hamming, FFTDirection::Forward);
FFT_2.compute(FFTDirection::Forward);
FFT_2.complexToMagnitude();
memset(vImag_1, 0, sizeof(vImag_1));
memset(vImag_2, 0, sizeof(vImag_2));
Sample_index = 0;
}
}
/*-----------------------------------------------------------------------------------------------------------*/
// Writing byte information to a specific register
void writeRegister(byte reg, byte value) {
SPI.beginTransaction(adsSPI);
digitalWrite(Slave, LOW);
SPI.transfer(CMD_WREG | (reg << 2));
SPI.transfer(value);
digitalWrite(Slave, HIGH);
SPI.endTransaction();
}
/*-----------------------------------------------------------------------------------------------------------*/
/* Reading data from a channel of the ADS 1220 */
int32_t Read_Channel(){
SPI.beginTransaction(adsSPI); // Begins transaction
digitalWrite(Slave, LOW); // Initializes communication
SPI.transfer(CMD_RDATA); // Arduino begins to read the data
uint8_t Byte_1 = SPI.transfer(0x00); // Reads the 24-bit signal using three 8-bit integers
uint8_t Byte_2 = SPI.transfer(0x00);
uint8_t Byte_3 = SPI.transfer(0x00);
digitalWrite(Slave, HIGH);
SPI.endTransaction();
int32_t value = ((int32_t)Byte_1 << 16) | ((int32_t)Byte_2 << 8) | Byte_3;
if (value & 0x800000) value |= 0xFF000000; // Preserves the value by making bits 28-32 1111 if it were originally negative
return value;
}