Code Monkey home page Code Monkey logo

flicker's Introduction

flicker

Summary

During a lucid dream, the dreamer can control their physical eyes by performing directed eye movements within the dream. We built a closed-loop device, flicker, to be worn during sleep that monitors for intentional horizontal saccades (i.e., “flicks”). Upon flick detection, the device plays audio back to the dreamer via bone conduction. Bone conduction plays audio by vibrating bones in the skull rather than the conversion of sound waves through the ear, which results in a sensation of audio playing from “inside the head.” Because the audio can be triggered within the dream, a benefit of flicker is that one can perform external sensory stimulation experiments without an experimenter triggering the stimulation. See usage.

The hardware is primarily a combination of Arduino microcontroller, MyoWare muscle sensor, and Adafruit audio amplifier (see parts list). Outside of the Arduino code placed on the Teensy board, all software is in Python (see conda environment file for requirements) driven largely by PyQt, PyQtGraph, and a custom "flick detection" algorithm using the SciPy stack.

Usage

  1. Secure sensor near right eye and stimulator on forehead.
  2. Start listening for flicks. $ python runall.py
  3. Go to sleep, become lucid, send a flick signal, and listen for audio.
  4. Wake up and end the session by X'ing out the flicker GUI.
  5. Check the log file (using any text editor) to see if your flick was detected.

How to flick

See section 9.1 of Baird et al., 2019 for in-depth discussion about signaling with eye movements from within a lucid dream. Here, we adopt their suggested set of instructions for sending a signal from a lucid dream:

When making an eye movement signal, we would like you to look all the way to the left then all the way to the right two times consecutively, as if you are looking at each of your ears. Specifically, we would like you to look at your left ear, then your right ear, then your left ear, then your right ear, and then finally back to center. Make the eye movements without moving your head, and make the full left-right-left-right-center motion as one rapid continuous movement without pausing.

The EOG signal typically results in something like this:

But because of the MyoWare sensor's on-board processing, in flicker's case it should look something like this:

Parts list

The circuit board was designed using Autodesk EAGLE and ordered through OSH Park. Design files/specifications are available in the design directory. Custom casings for the controller and sensor were designed using Onshape and 3D printed locally. The USB isolator case design was pulled from cyrusdreams on Thingiverse.

part description price
Teensy 3.6 microcontroller board 30
MyoWare muscle sensor EOG sensor 38
Adafruit TPA2012 audio amplifier 10
Soberton E-12041808 bone conduction speaker 3
Adafruit USB isolator safety 35
Miscellaneous   20
    $136





xkcd

flicker's People

Contributors

remrama avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.