Getting Started
This guide walks you through setting up NeuroFocus V4 from scratch.Prerequisites
Hardware
- Seeed Studio Xiao ESP32-S3
- NeuroFocus V4 PCB
- USB-C cable
- EEG electrodes (Ag/AgCl recommended)
Software
- PlatformIO IDE (VS Code extension) or PlatformIO CLI
- Git (for cloning the repository)
Installation Steps
1. Install PlatformIO
Option A: VS Code (Recommended)- Install VS Code
- Open VS Code Extensions (Ctrl+Shift+X)
- Search for “PlatformIO IDE”
- Click Install
2. Clone the Repository
3. Configure Communication Mode
Opensrc/config.h and set your communication mode:
- Wireless data collection
- Mobile app integration
- Remote monitoring
- Development and debugging
- Direct USB connection
- Smaller firmware size
4. Build the Firmware
5. Connect Your Device
- Connect ESP32-S3 to your computer via USB-C
- The device should appear as a serial port
6. Upload Firmware
7. Monitor Serial Output
Using the System
Serial Commands
Send these commands via Serial Monitor:| Command | Action |
|---|---|
b | Start streaming |
s | Stop streaming |
v | Reset device |
BLE Connection
On Computer (Linux):Start Streaming
- Attach electrodes to your scalp
- Send command
bvia Serial or BLE - Data will stream as raw ADC values
Hardware Setup
Electrode Placement
For basic testing:- Channel+: Forehead (Fp1 or Fp2 position)
- Channel-: Behind ear (mastoid)
- Reference: Opposite mastoid or forehead
Power
The board can run from:- USB power (5V)
- Battery connected to BAT pins (3.7V LiPo)
Troubleshooting
ADS1220 Init Failed
Problem: “ADS1220 init failed! Check connections.” Solutions:- Check SPI wiring between ESP32 and ADS1220
- Verify 3.3V power supply
- Try power cycling the board
BLE Not Advertising
Problem: Can’t find NEUROFOCUS_V4 in BLE scan Solutions:- Check
ENABLE_BLEis set to 1 in config.h - Rebuild and upload firmware
- ESP32-S3 must support BLE (some clones don’t)
No Serial Output
Problem: Serial monitor shows nothing Solutions:- Check baud rate is set to 115200
- Try different USB cable
- Press reset button on ESP32
Noisy Signal
Problem: Data values jump around a lot Solutions:- Check electrode contact (use conductive gel)
- Keep away from AC power lines
- Use shorter electrode wires
- Enable 50/60Hz filter in firmware
Next Steps
Now that your system is running:- Read Architecture to understand how it works
- Check API Reference for firmware functions
- See Hardware for PCB details
- Try the BLE Web Interface for visualization
Communication Modes
Switching Modes
Editsrc/config.h:
BLE Auto-Start
When BLE is enabled, streaming starts automatically when a client connects. It stops when the client disconnects.Serial Manual Control
In Serial mode, you control streaming with commands. Nothing happens automatically.Building from Source
Project Structure
Dependencies
All dependencies install automatically through PlatformIO:- ESP32 Arduino framework
- ADS1220_WE library
- ESP32 BLE Arduino library
Custom Board Configuration
If using a different ESP32 board, editplatformio.ini:
board to match your hardware.