Text

3D Printed Arduino MEGA/DUE protector

image

image

image

This is my first printed object that I have actually designed myself. I made this because I like to work on the Arduino and I thought it would be best to protect it from shorting out on whatever I placed it on. Originally I was thinking about making a full enclosure, but I realized that that would really require more plastic than is necessary. Personally I really like the skeleton look.

Plans for the future:

  • One of the pegs is off by about 0.1mm, I need to fix that
  • Make the 4 shafts a little thicker and add little wire clips/organizers to them.
  • Make it stackable
  • Standardize the 4 shafts into a more rectangular/symmetrical shape
  • Create some add on holders for additional Arduinos and common sensor/expansion boards
  • Make the backbone a little more artistic
  • Add support for the Uno sized Arduinos
  • Parametric python script (I need to learn python first)

After I revise the design a bit had have some of the add-ons above I’ll post it to thingiverse. As always I’m open to suggestions for features/improvements.

—Jeremy J.

Tags: arduino
Text

Small Update

Ok, so i have been a bit absent from this project page because I have not had much time for projects. I ordered a new Arduino Due to replace my Arduino Mega in my Zeo project. I’m doing a ground up rewrite of the code to accommodate more features while using programming standards that are a little easier to understand. Some of the features I’m implementing:

SD Card Support - store data, summaries, and settings locally. Will als implement a state file in case the zeo looses power temporarily during the night. Also will support mp3 or wav based custom alarms and lucid dream triggers.

Dynamic alarms:

Reimplementation of Zeo’s smart wake

Day/time alarms (get up earlier during the week and later on weekends)

Alarm override - for days you needs to get up later or earlier than usual

Alarm on sleep quantity - trigger alarm after 6 hrs of sleep, or after 2.5 hrs REM, etc…

Artificial sunrise

I have some more features planned, so stay tuned

Tags: zeo arduino
Photoset

Overall I am pretty happy with my new printer. I need to get ReplicatorG working properly on my machine, right now it is giving me problems, but the printer prints from the SD card just fine. Looking at my first print I need to do a little bit of calibration work. there are a few areas that are a little off. and of course this printed w/out supports so there are a few problems supports would fix.

Photoset

Sleep Data

all charts generated from samples taken 5s apart w/ a 12 sample rolling average.

Photoset

Sleep Lab Update

Ok, so I got my motion sensor and temp/humidity sensor in and wired up. I grabbed example arduino sketches and confirmed that the sensors worked. I have wired them up in my room. I just need to add a few lines of code to my arduino/zeo sketch to sample the sensors and output the data w/ the rest of the stream. I will probably need to do some experimentation over the next few nights to calibrate the sensitivity of the motion sensor but other than that expect a post w/ some sleep graphs this time next week.

Photoset

Workshop Update

I have have been procrastinating publishing my updated Arduino code until I am able to add the ‘Optional Serial Port’ feature. I have also been diligently collecting nightly sleep data for analysis. I’m trying to find a balance between producing an easier to read graph and a more accurate graph.

Anyway, I got my first of two shipments in from China. This one included a bunch of jumper wire/ribbon cables (FF and MF). These will allow me to do more experimentation with my DE0-Nano FPGA.

I also got four RS-232 to TTL converters. I basically saw them, for only a few dollars, and I realized that I run a lot of computer equipment that is configured through a serial terminal interface (Cisco routers, Power Connect Switches, Disk enclosures, etc…). I think it would be really cool to build out an Arduino Mega to dynamically alter the configuration of my network based on say a series of physical switches and buttons. You could have an internet kill button that admin disables the internet interface, or read state information from the router and play audio alerts such as “We are under attack” when a syn flood is detected. Anyway, I’m pretty excited about them.

My motion sensor also came in. I’m going to wait until the temp/humidity sensor comes in before I connect it and program it.

Finally, I was able to find my good soldering iron. It’s not really an improvement or anything, I was just getting a little frustrated that I couldn’t find it.

Text

More Sleep Data

I managed to do another data capture last night. Instead of capturing every 10 seconds I set it to capture every second(which is what the Zeo outputs). I did have a bit of sleep onset insomnia (Performance anxiety???) last night so I had to trim the data down to meet Excel’s 30,000 data point limit for charts. Below is a sample of the raw frequency bins, as output by the Zeo, overlaid with my sleep stage.

As you can see it’s not pretty. I decided to take the 300 second average and produce a new chart. I then skewed the sleep stage by 150 samples so that it would properly match the graph.

This graph, link to full, actually gives us something useful and I’ve been staring at it quite a bit. I find it interesting to see which groups of brainwaves group together to form the various stages of sleep.

Some time in the distant future I would like to create some code that can calculate this data in real time and give me real time bio-feedback both for meditation and for sleep engineering experiments.

I currently have some parts on order (from China because I’m being cheap) that will enable me to sample the external environment and plot the data in real time along with the sleep data the device already provides. Sensors that I’m integrating include Digital Temp/Humidity sensor and an infrared motion sensor (detect restlessness).

After those devices are integrated I want to look into measuring body temp through a wireless device. I remember reading on one of the sleep blogs that muscle paralysis in REM sleep causes a drop in body temp [source] which can lead to the individual waking up during REM sleep. It would be incredibly trivial to program the Arduino to kick on an electric blanket whenever it detects that the user has entered REM sleep and is experiencing a temperature drop.

I had a bit of a setback with my LED light string. Basically I overloaded a power supply  crossed some wires, and now it’s broken. This weekend I’m going to try and cut the string in half to see if only the first few were effected, but I doubt that. My plan is to use an LED string to emulate a NightWave. Then have the string flash red when you are in REM sleep to promote lucid dreaming. If you wake up in the middle of the night it can kick on a very low power nightlight. Then in the morning act as an artificial sunrise.

Anyway, that’s it for now. This weekend I hope to upload the updated version of my Arduino code (Now 100% Arduino Uno compatible).

—Jeremy

Tags: Zeo
Photo
Attached pic is my sleep data from last night. The legend is incorrect as far as I can tell. I need to check the developer resources to figure out what order the device is spitting out the waves in. The actual data are sampled at 10sec intervals and then I apply a 1 sample rolling average to get the chart above. The rectangular lines indicate sleep stage. From top to bottom we have Awake, REM, Light, and Deep sleep. Tonight I plan on capturing at 1sec intervals with the same 10 sample rolling average.
I find the transition points interesting. you can see that I enter REM sleep whenever the orange line jumps down to the purple line. The Zeo device actually uses a NeuralNetwork to determine what state you are in and only updates it every 30 seconds (Probably with whatever the average output of the network was over that time). 
—Jeremy

Attached pic is my sleep data from last night. The legend is incorrect as far as I can tell. I need to check the developer resources to figure out what order the device is spitting out the waves in. The actual data are sampled at 10sec intervals and then I apply a 1 sample rolling average to get the chart above. The rectangular lines indicate sleep stage. From top to bottom we have Awake, REM, Light, and Deep sleep. Tonight I plan on capturing at 1sec intervals with the same 10 sample rolling average.

I find the transition points interesting. you can see that I enter REM sleep whenever the orange line jumps down to the purple line. The Zeo device actually uses a NeuralNetwork to determine what state you are in and only updates it every 30 seconds (Probably with whatever the average output of the network was over that time). 

—Jeremy

Tags: Arduino Zeo
Text

Intro

I have finally decided to get a tumblr of my own to document the various projects that I work on in my spare time. Expect a post this weekend covering progress on my Arduino <- ZEO project that I am working on.