Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe

Using Brainwaves to buzz alarm after achieving a certain level of Meditation (Part 8/13)

By Arpit jain September 28, 2016

Using Brainwaves to Buzz Alarm

SUMMARY

Previously in the brain waves series we used GSM with the brain waves to detect if the person is sleeping. The same experiment can be extended further with a different perspective. Now presently in this article, I am planning to explore more applications of Brain waves.
Nowadays I am trying to meditate to keep myself calm. Since meditation helps a person in many ways, I thought to give it a try and it proved to be very helpful. However, while meditating I observed that I could not guess as to how well I am doing the meditation. As a result, I decided to use brainwaves to develop a device which could inform me if I achieve a certain level. It can also be helpful for practitioners and meditators in future. 
Image showing Meditation Level Detected using Brainwave Sensor
Fig. 1: Image showing Meditation Level Detected using Brainwave Sensor 
DESCRIPTION
you know that we are getting the values of all the Brain wave types from our Arduino, here, our task is just to find the wave which is most affected by meditation.  Now alpha waves again show us a lot of variations according to our meditation.  So, we first check out the values of alpha waves at different alertness levels. I have tried my meditation level and then have recorded them for testing purpose.
Image showing Meditation Level Detected using Brainwave Sensor
Fig. 2: Image showing meditation Level Detected using Brainwave Sensor
While testing it on myself, I found that the values of alpha waves crossed 2 Lacs very rarely and only when my concentration was the highest. So I set the level of 2 Lacs in my arduino coding. This value can be set by person to person. Since the values from mindflex vary from 1Lac to 7  Lacs, so we set a level at 2 Lacs and whenever the values were more than that we started sending signals to the speaker so as to make a sound .
Block Diagram of MindFlex Brainwave Sensor based Meditation Level Detector
Fig. 3: Block Diagram of MindFlex Brainwave Sensor based Meditation Level Detector 

Hardware:

Please find the attached circuit diagram of the connections that we need to establish. We have taken a pin from T pin of the mindflex sensor and connected that pin to the Rx pin of our Arduino UNO. Also, we have shorted the ground of both Sensor and UNO by a wire. Please take special care while soldering anything to the Mindflex sensor as pins are very close to each other. After this, we have connected the 11th and 12th pin to a small 4ohm speaker.
Software:
Let us come to the software part. We have been receiving the values from the sensor to our arduino via T pin. Once we have received the value at any particular point, we just need to check when the values cross a particular limit. As soon as the values cross a particular limit, we raise the alarm by sending high and low values to the 11 and 12 pin of arduino. A loop of 100 has been provided to make a wave which is sent to the speaker to bell the alarm.
 if (num1>309999)
       { for(int j=0;j<100;j++)
        {
          digitalWrite(11,HIGH);
          digitalWrite(12,LOW);
          delay(100);
          digitalWrite(12,HIGH);
          digitalWrite(11,LOW);
          delay(100);
        }
Few points to Note:
The sensor usually gives the strength from 60 – 80 % due to its orientation and the spot where we place it. Try to keep the metal sensor exactly above your left eye.  I have also applied salt water at my forehead for better connectivity to the sensor. The signal strength also disrupts about how we solder the wire to the T pin. Try to shield this wire and also make sure that the references probes are correctly connected.
If you have any wire connected to the EEG pin of the sensor, please disconnect that wire as that will create a lot of disturbance in the sensor values. Try this experiment and share your experiences with us. Next, we will be working on controlling an appliance using relay.

Project Source Code

###

//Program to 

// Arduino Brain Library - Brain Serial Test
 
// Description: Grabs brain data from the serial RX pin and sends CSV out over the TX pin (Half duplex.)
// More info: https://github.com/kitschpatrol/Arduino-Brain-Library
// Author: Eric Mika, 2010 revised in 2014
 
#include
 
// Set up the brain parser, pass it the hardware serial object you want to listen on.
Brain brain(Serial);
//char a[400];
String a,a1;
int v = 0;
int z=0,output;
uint32_t num=0;
uint32_t num1=0;
void setup() {
    // Start the hardware serial.
    Serial.begin(9600);
     pinMode(12, OUTPUT);
     pinMode(11, OUTPUT);
}
 
void loop() {
    // Expect packets about once per second.
    // The .readCSV() function returns a string (well, char*) listing the most recent brain data, in the following format:
    // "signal strength, attention, meditation, delta, theta, low alpha, high alpha, low beta, high beta, low gamma, high gamma"    
    if (brain.update()) {
       // Serial.println(brain.readErrors());
       // Serial.println(brain.readCSV());
        //sprintf(a, "%c",brain.readCSV());
        a = brain.readCSV();
        v = a.indexOf(',');
        v = a.indexOf(',',v+1);
        v = a.indexOf(',',v+1);
        v = a.indexOf(',',v+1);
        z = a.indexOf(',',v+1);
        
        a1 = a.substring(v+1,z);
        num = a1.toInt();
         
        v = a.indexOf(',',z+1);
       
         
        a = a.substring(z+1,v);
         
        num1 = a.toInt();
        //Serial.println(num);
        Serial.println(num1);
         
        
       if (num1>309999)
       { for(int j=0;j<100;j++)
        {
          digitalWrite(11,HIGH);
          digitalWrite(12,LOW);
          delay(100);
          digitalWrite(12,HIGH);
          digitalWrite(11,LOW);
          delay(100);
        }
 
 
 
       
       }
       // analogWrite(12,output)
        
        //brain.readCSV().toCharArray(a,200);
    }
}
 

###


Circuit Diagrams

Circuit-Diagram-MindFlex-Brainwave-Sensor-Meditation-Level-Detector

Project Video


Filed Under: Brainwave, Electronic Projects, Tech Articles, Tutorials

 

Next Article

← Previous Article
Next Article →

Questions related to this article?
👉Ask and discuss on Electro-Tech-Online.com and EDAboard.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

EE TECH TOOLBOX

“ee
Tech Toolbox: Internet of Things
Explore practical strategies for minimizing attack surfaces, managing memory efficiently, and securing firmware. Download now to ensure your IoT implementations remain secure, efficient, and future-ready.

EE Learning Center

EE Learning Center
“engineers
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EE professionals.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


RSS EDABOARD.com Discussions

  • Reducing "shoot-through" in offline Full Bridge SMPS?
  • High Side current sensing
  • How to simulate power electronics converter in PSpice?
  • Voltage mode pushpull is a nonsense SMPS?
  • Layout IRN reduction in Comparator

RSS Electro-Tech-Online.com Discussions

  • Back to the old BASIC days
  • Parts required for a personal project
  • PIC KIT 3 not able to program dsPIC
  • Failure of polypropylene motor-run capacitors
  • Siemens large industrial PLC parts

Featured – RPi Python Programming (27 Part)

  • RPi Python Programming 21: The SIM900A AT commands
  • RPi Python Programming 22: Calls & SMS using a SIM900A GSM-GPRS modem
  • RPi Python Programming 23: Interfacing a NEO-6MV2 GPS module with Raspberry Pi
  • RPi Python Programming 24: I2C explained
  • RPi Python Programming 25 – Synchronous serial communication in Raspberry Pi using I2C protocol
  • RPi Python Programming 26 – Interfacing ADXL345 accelerometer sensor with Raspberry Pi

Recent Articles

  • What is AWS IoT Core and when should you use it?
  • AC-DC power supply extends voltage range to 800 V DC
  • Infineon’s inductive sensor integrates coil system driver, signal conditioning circuits and DSP
  • Arm Cortex-M23 MCU delivers 87.5 µA/MHz active mode
  • STMicroelectronics releases automotive amplifiers with in-play open-load detection

EE ENGINEERING TRAINING DAYS

engineering

Submit a Guest Post

submit a guest post
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • Battery Power Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • EV Engineering
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • Subscribe to our newsletter
  • About Us
  • Contact Us
  • Advertise

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy

Search Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe