The Sleep Sensei

The Sleep Sensei is a device I created to help people fall asleep faster using calming breathing training. It's for people who have trouble falling asleep, due to insomnia or an active mind at bedtime.

I ended up posting the Sleep Sensei on Kickstarter and had a successful campaign.

You can read more about the Sleep Sensei here: www.getsleepsensei.com

This post is the story of the Sleep Sensei and how it came to be.

The first (very rough) prototype

This whole project started because I have trouble falling asleep at night. I was looking at potential solutions and came across a smartphone app that produced a pattern of light to follow with your breathing as you try to fall asleep. The main problem with this is that the phone screen is so dim that you can't see it without having your eyes open! This seemed counter-productive to sleep, so I sought a better way.

This is the very first prototype of the Sleep Sensei. It consisted of a breadboard with 4 blue LEDs performing a simple brightening and dimming cycle. I chose blue LEDs since the smartphone app I used performed a similar feat, and it used blue light. This was before I began researching the effects of various colors of light on sleep quality, so I didn't really know any better.

The breadboard was clamped onto a wooden base with a pivot to allow me to aim the light towards my eyes. The idea was that the light from 4 LEDs directed towards my eyes would be bright enough to be seen with my eyes closed through my eyelds. And it worked!

More prototyping, and the Kickstarter design

Standalone Prototype

I liked the idea of the Sleep Sensei enough to acid-etch a circuit board for what I breadboarded. I drilled 4 (very rough) holes into my wooden base so that the LEDs would shine through, and had my first standalone prototype!

This prototype used an ATMega328, and it has a standard potentiometer to adjust the brightness. The button would allow you to switch between 4 durations of sleep coaching.

The First Decent-Looking Prototype

I ended up enjoying using my standalone prototype so much that I wanted to try to make more of these little guys to try on friends and family. I figured if it helped me fall asleep faster, it could help others as well. So I did some research and found out that I could program an ATtiny85 (much cheaper than the ATMega328) using Arduino, and whipped up a breadboard with all the necessary connections.

A challenge I had was timing, since the ATtiny85 was running at 8 MHz compared to the ATMega328's 16 MHz. So I had to add a couple multiplication factors in the code to have the breathing pattern match what I had tuned on the ATMega-based design.

I then designed and acid-etched a new circuit board designed for the ATtiny85. I also found some nice thumb-wheel potentiometers on eBay which would allow for adjustment of the brightness without a tiny screwdriver. Here is what the prototype looked like:

I used this guy for a few weeks, and it was actually pleasant to use. This time I had red LEDs (since I had done some research), and a nice compact circuit board that wouldn't be too expensive to have professionally made. So that's what I did:

I wanted to test the product out in the wild and get feedback, so I came up with a (terrible) logo for the Sleep Sensei and made a small army of them!

The Sleep Sensei Study

At first, I gave my prototypes to a handful of friends for their feedback. They responded with things like "it seems to work" or "I think it might be helping." Although it was great to get positive feedback, I wanted results that were a little more scientific. So I came up with a study of sorts.

Using this ad, I found several people on the reddit /r/insomnia community willing to try the device and provide me data on their sleep via a daily survey and seep tracking smartphone app. I had the users record data for 3 weeks without the Sleep Sensei, and I then sent the users the sleep coach device and had them record data for 3 weeks of sleep using the device.

I ended up sending out 20 Sleep Senseis, and I got decent data from 5 users. Here is a plot of the average time it took these users to fall asleep before and after using the Sleep Sensei:

I have a detailed breakdown of each user's data here.

Here is some of the feedback I got from the users:

“I think the quality of sleep has been improving, and I think that’s the Sleep Sensei. When I start having issues again I pull it out and it does help” – Alice S, TX

“I was really impressed with the [Sleep Sensei]- it cut the amount of time it took me to fall asleep by about half … I basically don’t have insomnia anymore and it feels that way” Marijke S, MA

“The [Sleep Sensei] allows me to fall asleep in at least under 30 minutes, sometimes even as few as 7 minutes, which is great for me! I would definitely recommend this device to anyone who is on the search for something new to help them fall asleep, someone who perhaps has tried every other sleep aid without finding anything that truly helps yet. The Sleep Sensei is awesome!” – Kate B, GA

“I’ve noticed a HUGE decrease in how long it takes me to fall asleep which has been wonderful! I really like the machine. It’s easy to use and works well.” – Kelly P, LA

Of course, this was not a clinical trial or very hard-sciency, but it gave me the confidence to try to make the Sleep Sensei into a real product by launching a Kickstarter!

The First Kickstarter

With a bit of confidence under my belt, I decided that I wanted to launch a kickstarter for the Sleep Sensei to get it into more hands.

I was tired of having to make my own wooden bases by hand, so I started working on a new design that could be fabricated by a vendor. I ended up trying out a bunch of concepts, such as:

Split laser-cut design

3D Printed minimalist

And what ended up being the winning concept, a laser-cut hinged design.

I decided to set my Kickstarter launch date as the same day as Houston Mini Maker Faire. This gave me a deadline, and I figured the Maker Faire would help me attract some backers.

I made some business cards...

And set up a booth at the Maker Faire.

And I launched my Kickstarter page! However, it didn't end up reaching the goal. I think several reasons factored in:

  • I made little effort outside of the Maker Faire to market the Sleep Sensei
  • I asked for way too much money. I had planned to have a vendor make and assemble all the PCBs, but this required a large volume of orders. I didn't get anywhere close to what I needed.
  • The design was still rough around the edges

But, the failure of the first Kickstarter didn't stop me, since Bay Area Maker Faire was just a few months away, and I had a couch to crash on in San Francisco. So I decided to improve the product and try again!

The Second Kickstarter

The New Strategy - Think Small

I figured that I still wouldn't be able to get $25,000 for mass production, so I had to rethink how I would make the Sleep Sensei. I decided that if a reasonably small amount (less than 250) of Sleep Senseis were ordered, I would order the bare PCBs and solder the components myself. If quantities ordered exceeded these expectations, then the volume would be sufficient to put in a bulk order.

For example, I was quoted $8.27 per assembled PCB if only 100 were ordered, but the price went down to $3.57 each if I ordered 1000. The laser-cut bodies cost around $9 each shipped, and the mechanical components (knob, hinge) cost around $2. Adding in shipping, packaging, taxes, and Kickstarter fees, and the Sleep Sensei would sell at a loss at low quantities if I didn't fabricate the boards myself!

The New Design

For the second Kickstarter, I wanted to have a finished improved design for the Sleep Sensei. One bit of feedback I heard from several people was that the default breathing pattern wasn't right for them. Some complained the breathing rate was too slow, while others couldn't keep up.

So, I wanted to allow the user to customize all aspects of the breathing pace: how long the breaths are at the start and end of the coaching session, and how long the session lasts. I had to rethink the design, since I wouldn't be able to add all this functionality with just a button and a potentiometer. So, I switched up the design and opted for a rotary encoder with a built-in button.

This gave me 3 forms of digital input: two directions of the knob and a button press. With this, I modified the code to include "menus" the user could activate in order to change the settings, and I made someinstructional videos to clarify how the process is done.

I also stared making the Sleep Sensei out of bamboo, since I liked the look and found the price to be comparable to using plastic.

Updating the Kickstarter

I also knew I needed a new logo and Kickstarter video. My girlfriend pitched in and came up with a sketch for a logo that I really liked:

I sent this over to a logo designer I found on Fiverr, and voila!

 

My girlfriend also helped me shoot the new video, with directing and writing help (and use of her Mac for some much-needed premium editing software).

I also found a reasonably priced professional product photographer on Fiverr, and had some nice shots of the Sleep Sensei taken.

All in all, I wanted the new campaign to be more polished and professional, all while staying on a shoestring budget.

Marketing

This time, I wanted to be more proactive with the marketing of the Sleep Sensei, so I contacted Ponoko, the laser-cutting shop that produces the Sleep Sensei shell, and told them about the new Kickstarter. They were quite interested and ended up interviewing me and writing a post about it.

I also paid a couple of organizations that claim they will get you a bunch of backers through social media, but I did not get a single new backer as a result of their facebook posts and tweets. This seemed mainly because they sell the same service to hundreds of others, so your product is just one in a sea of many posts each day.

In the end, the Maker Faire ended up being the most valuable form of marketing, since I was able to show people the product and have them try it out in person. Most of my backers ended up coming out of the Bay Area, and I can assume that most of those backers were visitors to my Maker Faire booth.

After the Kickstarter

Once the Kickstarter was funded, I ordered all the things:

And got to work assembling the PCBs by hand:

With my girlfriend's help, we got all the lasercut components organized and ready to pack:

After a few weeks of assembling, packing, and shipping, all the Kickstarter rewards were out! I then did some research for a place to sell the Sleep Sensei going forward, and created a Tindie store.

Conclusion - You can't do it alone

All in all, making the Sleep Sensei was a valuable experience. I got outside of my comfort zone to try to be a salesman, marketer, designer, video editor, photographer, web designer, electrical engineer, and mechanical designer. And I found that it was a lot of work!

I learned that if you want to be truly successful, you can't do it all by yourself. For my first kickstarter, I tried to do it all on my own, and failed.

But the second time around, I had help from my girlfriend (logo designer, camerawoman, and great supporter), my brother Mark (editing of Kickstarter page, test subject, and Maker Faire booth hand), and paid help such as a professional photographer, a logo designer, and a music writer (for the video). I also was boosted by Ponoko's newsletter piece about the new Kickstarter, and family and friends helped to share the Sleep Sensei on Facebook and Twitter. I even got some board design help from an electrical engineer friend at my workplace, and his feedback helped make the board smaller and more efficient.

I'm glad I was able to turn an idea of mine into an actual product, and I learned a lot along the way. Until the next great idea strikes, I'll keep on tinkering!

Interlocking Laser-cut Pieces – An Experiment in Design

When I was working on my Sleep Sensei project, I designed the housing out of interlocking parts to form the case.

IMG_4886

Initial Design

When designing the interlocking portions, I arbitrarily chose that the "notches" would be as wide as twice the material thickness and as tall as the material thickness to provide a good amount of interlocking without being excessive. For example, bamboo from Ponoko is available in 3mm thickness, so the notches are 3mm x 6mm (see diagram below).

Lasercut Notch Size Largetext

Click above image to enlarge.

This worked fairly well when the parts were glued together, but if not the whole thing would just fall apart. Since I was designing this product to be a kit to be assembled by my customers, I wanted to make it as easy as possible with no glue required.

Adding Nodes to the Design

When looking to improve the design, I came across this Ponoko article about adding "nodes" to interlocking laser-cut parts to provide a tighter interface. The concept I came up with was to add nodes to both the "male" and "female" notches to create an interference fit:

Node Diagram

The problem was, I didn't know what dimensions to choose to make the fit tight enough without being too tight to assemble. I also had to make a design that is tolerant of inconsistencies in the laser cutting process. So I did a simple experiment to choose the best node size.

Node Sizing Experiment

I decided to make the width of the nodes 1/2 of the material's thickness, or 1.5 mm in the case of the bamboo I was using. But I didn't know how "tall" to make the nodes.

Node Dimensions Diagram

So I used AutoCAD to create a test piece that would test both the 90 degree connections of the corners as well as inserting into a series of holes (such as on the sides of the Sleep Sensei). The test pieces could be inserted into each other to test different combinations of node sizes. A sample test piece is shown below:

Indiviadual Test Piece

I created a series of test pieces with varying node heights, and I made 4 of each piece to account for variability in manufacturing. I etched each part with its node height so I could keep track:

All Node pieces

For example, the below test piece has a node that is 0.03 mm high:

Node Dimensions

When the parts came in, I tried all the combinations of node sizes, and I found that the fit was best with 0.05 mm nodes on both pieces. So I modified the Sleep Sensei design to include this node size:

New Sensei Design

Notches Up Close

And the design works quite well! If you check out the assembly video, you'll see that the parts snap together quite nicely.

I used the same node size for my valentine's day count-up box, and that also worked out quite well. The parts work like lego pieces: firmly snapped together but easy to take apart if needed.

Count up Box – A Valentine’s Day Gift

The Count up Box

Front

For Valentine's day 2016, I decided to make a device to count up how much time has passed since my girlfriend and I first met.

What I came up with is a fairly simple design utilizing an Arduino nano, a real time clock, an LCD screen, and a rotary encoder.

As I have some decent experience with laser cutting from my Sleep Sensei project, I decided to have the project laser cut.

Demo Video

Photos

Side Back IMG_2620

Technical Details

The knob on the top of the box is attached to a rotary encoder with a built-in momentary switch. I use this to change the unit display on screen and allow the user to adjust the date and time.

Getting the screen working was the largest challenge of this project. It is a 1602 16x2 HD44780 screen from aliexpress, and it uses an I2C converter to allow me to send it commands via an I2C interface, simplifying the wiring significantly. However, it was hard to find the correct arduino library to interface with it. After much searching and testing, the LiquidCrystal_I2C library was the one that worked for me. The documentation for this library isn't the greatest, but the commands can be found in the LiquidCrystal_I2C.h file.

The whole project is powered directly from the Arduino nano. This allows for easy code swapping and prototyping since the power cable is also the communications cable, and it simplifies the design of the circuit board since I can use the nano's on-board power supply.

The code, lasercutting files, board schematics, parts list, and more details can be found on my GitHub:

https://github.com/jerwil/Count_Up_Time

Circuit Board Design

Count Up Box Schematic Production_pcb  IMG_2618

The circuit board was designed in Fritzing, and the design files can be found on the GitHub page.

Heart PCB – A Valentine’s Day Gift

Heart Card Animation Compress

I started dating my girlfriend at a pretty awkward time. Just three weeks into dating her, Valentine's day reared it head, and I wasn't sure what kind of gift I should give her, if any. I mean, it had only been three weeks!

The Idea

At the time, my workplace just got a new circuit board mill, and I was excited to make new boards with it. So I came up with a plan that was low on cost, but would still produce an awesome gift (to those nerdy enough to appreciate it). I had already made a "camera show" device that had a series of LEDs that lit up in a pattern, so the idea was to translate that design into a heart-shaped "card" milled out of a copper board, complete with her name etched on the front.

The Execution

Since the basic board layout and Arduino code were already available, I just had to figure out how to translate it to a heart-shaped design. I followed the Fritzing guide for making a custom board shape and found a .svg heart shape online to use as the board outline. I used Inkscape to make the modifications required to import the file, and moved the LEDs around to follow the outline of the heart. I also swapped the AA battery holder for a coin cell battery holder to make it more "card-like."

Camera show to heart

I etched her name by adding a machining process step in the PCB mill software, CircuitPro. Although I did get her name a bit wrong by only including the first portion of it! Hey, remember that we were only dating for three weeks at the time.

The Gifting

I'm happy to say that she loved the card when I gave it to her, and she even framed it to put on display!

Heart Card in Frame

And as a followup after posting my count up box valentine's day project, 13 months in and she still has it on display!

More Information

You can find the board design Fritzing file and the .svg file used on my GitHub page. The Arduino code was pulled straight from my "camera show" project repository.

View of the back of the board:

IMG_7997

ATtiny85 Flashing Shield

This was a quick and simple project mainly intended to test creation of a dual-sided board on a PCB mill I recently acquired access to. It will also make it easier and quicker to flash programs onto an ATtiny85, especially when flashing many of them at a time.

I followed this guide to determine which pins should be connected to what in order to flash a program onto an ATtiny85. Photos of the completed board can be seen below:

The board was tested, and it works quite well. It certainly cleans up a bunch of wires!

The board design in Frizting:

ATtiny85 Flashing Shield_bb ATtiny85 Flashing Shield

As usual, the schematic can be found on my github.

Ikea Lantern LED Lamp – One Day Project

I've been working on a bunch of projects, but I haven't been doing a good job of updating the site. To correct this, I am posting my simplest recent project. More projects to come in the next few weeks!

I recently hung up some lanterns from Ikea, and I noticed that the bottom of each lantern could have some room for some tinkering. Lighting up the candles is great for subtle illumination for watching movies at night, but I wanted a little more light out of the lantern. This inspired me to turn the lantern into a lamp using LEDs.

I used fairly simple materials for this project, mainly:

  • Foam board
  • White LEDs
  • 220 ohm resistors
  • Masking tape
  • White paper
  • 5 V regulator

I started out by cutting a piece of foam board to fit in the bottom of the lantern. I then cut a square out of the foam board:

image_2

I then started inserting LEDs into the foam board. I used a push pin to start each hole, and I then fed the LEDs through:

image_3

I soldered a 220 ohm resistor to the anode of each LED, and then hooked up all of the resistors to a power source in parallel. Here is me testing out all of the LEDs:

image_4

As you could see in the previous photo, I simply used masking tape as an insulator. It works, and it is fairly easy to work with. I then added the voltage regulator to enable the lamp to be powered by a 9V wall wart. I also glued on some pedestals on the corners for the paper to rest on:

image_5

I then wrapped the whole thing in a sheet of white paper to diffuse the LEDs. I super-glued a switch onto the lamp to turn the power on and off. This is what the lamp looks like in the daylight:

image_6

This is what the lamp looks like with the candle lit and the lamp turned on:

image_1

This is what both lamps look like:

image

I do not currently have any plans to turn the other lantern into an LED lamp since it is fairly close to my television and has nothing under it to illuminate, but if the asymmetry gets to me, I probably will end up upgrading it as well!

This was a fun, simple project to do. I have been using this lamp for a few weeks now, and  it works great as a night light. It is the perfect level of illumination for watching a movie, providing subtle yet useful light. A main goal of this project was to ensure that it is not obvious that the lantern is a lamp until it is turned on. With the light switch as small and subtle as it is, and the paper diffusion flush with the bottom of the lamp, I think I have accomplished this. This was also a test of LED diffusion for my largest project yet, coming soon...