This guide provides step-by-step instructions for assembling the EEG signal acquisition system. The setup includes an Arduino Uno, an AD620 instrumentation amplifier, EEG electrodes, and the necessary wiring for signal processing and transmission.
- Arduino Uno – Used to process EEG signals and communicate with a computer.
- Dry or wet electrodes (minimum of three: signal, reference, and ground).
- Alligator clips for secure electrode connections.
- AD620 Instrumentation Amplifier – Used for signal amplification.
A single resistor placed on the breadboard for signal stabilization.
- Jumper wires – For connecting the amplifier, electrodes, and Arduino.
- Breadboard – Used for assembling the AD620 circuit.
- Placed on E6, E7, E8, E9 (left side) and F6, F7, F8, F9 (right side).
- D6 to G6 on the breadboard.
###Connections to Arduino Uno
Breadboard Pin | Arduino Uno Pin |
---|---|
D7 | 5V (Analog) |
D8 | A0 (Analog Input) |
D9 | Negative Bus strip |
GND(Arduino) | Negative Bus strip |
Breadboard Pin | Electrode Connection |
---|---|
G7 | Signal Electrode (Alligator Clip) |
G8 | Signal Electrode (Alligator Clip) |
G9 | Negative Bus strip |
Upload the following code to the Arduino Uno to read and transmit EEG signals:
const int SIGNAL_PIN = A0; // Pin connected to the EEG signal
const int SAMPLING_RATE = 100; // Sampling rate in Hz (matches Python code)
const int SAMPLING_INTERVAL = 1000 / SAMPLING_RATE; // Interval in milliseconds
void setup() {
Serial.begin(9600); // Start serial communication at 9600 baud rate
}
void loop() {
// Read the raw EEG signal
int rawValue = analogRead(SIGNAL_PIN);
// Convert the raw value to voltage (assuming 5V reference and 10-bit ADC)
float voltage = rawValue * (5.0 / 1023.0);
// Send the voltage value to the Python script
Serial.print("Voltage: ");
Serial.println(voltage, 4); // Send voltage with 4 decimal places
// Wait for the next sample
delay(SAMPLING_INTERVAL);
}
- Attach the signal electrode to the scalp (e.g., forehead).
- Attach the reference electrode to a neutral location (e.g., earlobe).
- Attach the ground electrode to a location with minimal electrical activity (e.g., another earlobe).
- Connect the Arduino Uno to your computer via USB.
- Ensure the AD620 amplifier receives power from the Arduino (5V).
- Open the Arduino IDE.
- Copy and paste the provided code into a new sketch.
- Select the correct board (Arduino Uno) and port.
- Upload the code.
-
Open the Serial Monitor in the Arduino IDE (set baud rate to 9600).
-
Observe the EEG signal values being printed.
-
Ensure the values change when focusing or relaxing.
- Check all electrode connections and ensure they are properly attached to the skin.
- Verify that the AD620 amplifier is powered and correctly wired.
- Ensure the ground electrode is properly attached.
- Keep wiring away from power cables or other sources of electrical interference.