GithubHelp home page GithubHelp logo

tomasero / opensleep Goto Github PK

View Code? Open in Web Editor NEW
428.0 72.0 59.0 58.98 MB

platform for sleep hacking and research

JavaScript 31.83% CSS 1.05% HTML 3.78% C++ 0.28% Swift 9.53% C 0.42% Jupyter Notebook 51.68% Dockerfile 0.01% Python 1.30% Pug 0.11%

opensleep's Introduction

OpenSleep

The development of the hardware and software for this system started and most of it was done during my first semester at the Fluid Interfaces Group of the MIT Media Lab. This technology was used for many projects, Dormio being the most notable. This project is part of a larger iniatiative called Engineering Dreams, which seeks to build technology that interfaces with the sleeping mind.

Dormio


The following is deprecated. We are about to release a new tutorial. Thanks for your patience!


Hardware

Components

Qty Value Device Where
2 .1uF CAP_CERAMIC0603 Digikey: 399-1095-1-ND
1 1uF CAP_CERAMIC0603 Digikey: 399-5090-1-ND
1 1K R-US_0503 Digikey: YAG1237CT-ND
2 100K R-US_R0603 Digikey: YAG1235CT-ND
3 1x2 1X2-SMD-HEADER Digikey: S1113E-36-ND
1 1x3 1X3-SMD-HEADER Digikey: S1113E-36-ND
1 1x5 1X5-SMD-HEADER Digikey: S1113E-36-ND
1 RFD22301 Digikey: 1562-1016-ND
1 SPDT SLIDE-SWITCH Digikey: 401-2014-1-ND
1 Color LED-1206-SMD Digikey: 516-1436-1-ND
1 HR-SENSOR Adafruit: 1093
1 FLEX-SENSOR Adafruit: 1070
2 EDA-ELECTRODE-CABLE OpenBCI
2 EDA-ELECTRODE OpenBCI

PCB

Design

Schematic

Schematic

Layout

Layout

Fabrication

You can either mill the PCB yourself using a CNC mill, or buy one from a PCB manufacturer.

Mill it

The original PCB for Doormio was made using a Roland MDX-20. All the PNG files used to mill the board can be found in the following folder:

/hardware/PNG
Order it

Oshpark!

Software

Web App

Run the app:

node web_app/app.js

Open the app:

http://localhost:3000

Mobile App

Acknowledgements

Adam Horowitz led the experiment design and execution to validate the system, Oscar Rosello the interaction and form factor, and Eyal Perry the iOS app development, signal processing and classification (and great mustache). Matthew Ha continued the development of the iOS app and analysis of biosignals for sleep staging.

opensleep's People

Contributors

abyjain avatar ahorowitz avatar eyalperry88 avatar imwithsam avatar matthewha123 avatar tomasero avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

opensleep's Issues

Latest XCODE crash Fix.

I was trying to build the app,
It was getting crashed.

From iOS 13 we need to add bluetooth settings in info.list.

I added the same and it ran.

Just for other people.

Add this in info.plist app will run quite good.

<key>NSBluetoothAlwaysUsageDescription</key> <string>Suva mate karvu pade </string> <key>NSBluetoothPeripheralUsageDescription</key> <string>Suva mate karvu pade</string> <key>NSMicrophoneUsageDescription</key>

Parts duplicated and others no longer available.

The 1X2-SMD-HEADER, 1X3-SMD-HEADER, and 1X5-SMD-HEADER, all link to the same Digikey page. Is this intentional?
There doesn't seem to be links on that page to differentiate the headers.

Additionally the RFD22301, is no longer available from the link provided.

running app.js on Mac

(opening and closing issue just for having it on record)

  • After a LOT of fiddling around, I had to use this response: sandeepmistry/node-xpc-connection#24 (comment) to get xpc-connection to work. Not sure how stable it is tho...
  • I also had to chmod 755 the web_app/node_modules folder.
  • Lastly, noble = require('noble') worked for me, rather then var noble = require('../noble').

Unable to Program sleepduino Firmware to nRF52832 Chips from Makezine Build

After following the steps in the Makezine article for the Dormio up through the step of burning the bootloader onto the nRF52832 with a J-Link board, I've gotten stuck trying to upload the sleepduino sketch. The chip seems to refuse to communicate over serial, even after resetting the board with the "DFU" switch closed during reset and then releasing it.

The board is electrically sound: all of the connections and pin voltages seem correct when probed with a DMM.

Some additional details to help with debugging are described below, and refer to the two screen captures included in this post.

  • Screenshot [1] below shows the system dialogue from the successful flashing of the chips with the "feather_nrf52832_bootloader-0.6.2_s132_6.1.1.hex" bootloader (left) and the settings for the serial port I attempted to program the Arduino sketch with (right).
    1  Bootloader Programmed   Serial Port Settings

  • Screenshot [2] shows the Arduino IDE terminal output when I pressed the "Upload" button to program the chip with the "sleepduino_nrf52.ino" sketch. Regarding the three "possible causes" listed:

2  Adruino Sketch Programming Error

  • The bootloader I flashed to the chips is the one listed in the Makezine article; I also tried flashing two other bootloaders to the chips and got similar error messages when programming with them.
  • The serial port settings seem to match the ones requested by the program (115200 baud, no flow control) and I validated the Sparkfun FTDI Basic 3.3V board I'm using by programming a different Arduino device with it beforehand.
  • I pressed the switches for both the RESET and DFU pins before pressing the "Upload" button, and I tried programming the chips after releasing them at a variety of different times and intervals. I don't know how to confirm if the chip is in DFU mode independently.

I HAVE been able to upload a sketch to the chips by changing the bootloader and programmer to "J-Link for Bluefruit nRF52", then uploading the sketch using the "Upload Using Programmer" command in the Arduino IDE. However, the sketch uploaded in this way does not seem to function correctly: the chip does not broadcast a name, may not be broadcasting at all, and refuses to connect to the "serverless.html" program.

Where to get the sensors?

Sorry this is a beginner question but I am trying to figure out how one could build this. So the board itself can be orderered from an external company, but what about the sensors that go on the fingers and wrist and so on? How much would all of this cost and is it hard for a person without any previous hardware tinkering experience to build?

Current state of project

Was just wondering what is the state of v2?
Are the parts cheaper?
Is the software in a functioning state?
Anyone using it successfuly and has some experiences to share of using it?

Up to date

Hi everyone !
I’m completely new to this : I discovered dormio on the mit’s site a week ago. I was wondering if someone could explain me the whereabouts of this repo !? πŸ€”
I am an engineering student way better at programming than electronic but I’m willing to try πŸ™ƒ

Thank you so much if you have the time !

Setting up Nodejs for web app

First off, awesome project, looking forward to getting this up and running.

Secondly for those having issues setting up node for running the web app I had to follow these downgrading instructions to install Node's bluetooth-hci-socket package: noble/bleno#440 (comment)

Where is the battery level indicator?

I managed to get the web app working but without the device and I noticed there is no battery level indicator, so if I build this device, where would I check the battery level? This is important to know since lipo batteries can explode if they get over discharged or over charged.

Where is the signal processing code for dormio

Friends, you mention that the software for your biosignal tracking is on Github. I've had a look, I can't find what I'm expecting, which is something to take measurements from your sensors then smooth and threshold them and reach a determination about whether the participant is asleep. Any pointers?

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.