DIY Dodow Clone Arduino Sleep Meditation Machine

8.5K3833

Intro: DIY Dodow Clone Arduino Sleep Meditation Machine

Sync your breathing to the glowing lights to decrease your breath rate and hopefully fall asleep easier.

After possibly my hundredth thousandth sleepless night I was searching for anything that could help make me fall asleep quicker when I stumbled across the Dodow. It's basically three flashing LEDs that gradually slow over time with the intention of trying to relax you so you can fall asleep easier. Kind of like those meditative breathing exercises.

To me this seemed like a great project to recreate with an Arduino. I've tried to recreate as much functionality as the original; you can choose between an 8 or 20 minute mode, you have an on/off switch and a reset button. You could also play around with the code and tailor it for yourself.

STEP 1: What You'll Need

x1 Arduino Nano $3.46 from banggood.com

x3 LEDs Around $0.34 each

x3 220 Resistors Around $0.13 each

x2 SPDT Switch buy 100 here for $2.76

x1 pushbutton switch buy 100 here for $3.25

x1 4AA Battery Holder $2.17 from banggood x1 small bit of perfboard to solder components on.

You'll also need wire for connections (I used 22awg), a soldering iron, solder, maybe heat-shrink tubing if you're a perfectionist. Possibly screws depending on what sort of case you make? Oh and maybe LED holders.

You could use an Arduino Uno if you don't have a spare Nano (the pins are the same), but you won't get as good battery life with the Uno.

STEP 2: Upload the Code

Now upload the code to the Arduino. It'll run on a Nano or Uno without changes, however you'll get much better battery life from the Nano. If you know a little about programming you might be horrified at this code... Please feel free to improve! You can also increase/decrease the time between flashes etc.

Direct link to Github here

STEP 3: Construct the Circuit

You could breadboard the circuit first and play around with the code, or just solder it up permanently.

LEDS:The shorter legs of the LEDs have the 220 Ohm Resistors connected to them, after this they go to ground.

The longer LED legs go into the following pins; D9, D10, D11

RESET SWITCH: One edge side of the reset switch goes toto the RST pin, the middle pin goes to ground. The third pin is unused.

8 MIN / 20 MIN SELECTOR SWITCH: One edge side of the switch goes to D2, the middle goes to ground. The third pin is unused.

POWER: The positive lead of the battery goes to one end of the slider switch, the middle pin goes to the ArduinoVin. The third pin of the switch is unused.

STEP 4: Put the Circuit in a Case

I used a mitre-box and some spare wood to create the case, then I secured the LEDs with LED Holders into some black project DIY sheet. The back was just fibreboard with a few screws to keep it all in place. Finally I hot-glued the battery pack to the board and added some rubber feet.

Hopefully you should now have a working Dodow clone. Sleep well!

25 Comments

I have the arduino uno and i have some trouble following your DIY, can you show a picture of how to do the connection between all objects .... i'm a beginner and i didn't suceed connected the Uno to the led with the wires and the resistors
Thanks for the inspiration! I built an ATTiny85 based version with new software and 3d printed shell - https://github.com/dshiffman/dodowDIY - it works great!
No on/off switch needed as the CPU goes into sleep mode after the cycle and only draws a few micro-amps.
Hey! Looks great, congratulations!
Isn't it even better if you use other colored LEDs? Blue makes you stay awake longer than red I believe...
This is what I actually thought... Like the red lights used in submarines that don't interfere with your vision as much. However there are a lot of sleep machines that use blue, with the explanation that they aren't strong enough to produce the melatonin to keep you awake, conversely there are many articles stating that blue light before bed is bad for you. Maybe it's a sales thing? I used blue to keep it close to the original, but any colour could be used.
there is the same question on the amazon comments. according the seller reply, the blue color is to cool down and relax. I understand this color in the dark slow down our brain flow. I assume a blue mode and a red mode can be an advantage depending on your state of mind.
Great idea for a project!

Like others I looked for a way of tailoring the breath rates and the duration of each run. I found the code a little difficult to alter - there are a lot of so called "magic numbers" which would need to be recalculated every time, so I hope you don't mind but I took the liberty of cloning your GitHub repo and re-writing the code.

The code I've written (https://github.com/yknivag/Arduino-Dodow-Clone) can be be used with up to 3 potentiometers to vary the initial breathing rate, the final (target) breating rate and the length of time to slow down over. There's also a provision to set a switch to run everything at half brightness if working in a dark room.

All of these are optional and can be commented out with one line each and instead breath rates can be specified in the "#define DEFAULT_*" statements at the top of the code.

I hope this helps others who also wanted to vary timings.

Would you have a schematic of your version?

You can find the schematic here https://easyeda.com/yknivag/DowDowClone

It's a little rough but it shows how to wire it up. The schematic there uses an ATTiny85 instead of an arduino - if you wish to use a standard Arduino then the pin conversion is as follows to use my code as-is (you can change the pins if you prefer in the #define statements in the code).

ATTiny Pin --> Arduino Pin

1 --> RST

2 --> 14 (A0)

3 --> 15 (A1)

7 --> 16 (A2)

6 --> 2

5 --> 6

Hope this helps

Cheers mate. I'll give it a go :)

I've added a breadboard layout for Arduino Uno to the EasyEDA page, hopefully that will make up for my lousy schematic!

Hi, I only have it on breadboard at the moment as I am still looking for a suitable box. I'll post a picture when I have it finished.

Wow that's great and I think it's fantastic that you've improved the code (and extra thanks for not laughing at my version!) I'm going to print it out and have a proper read through and hopefully improve myself. Thanks again :-)

Wow, my gf discovered the dodow few days ago and thanks to you I could quickly build one to try if it works on her sleep. Thanks very much man!

I'll also have a look at yknivag's version but yours is already working very well.

That's a pretty neat idea, I haven't seen one of those before! I wonder if something like this would help my nephew get to sleep easier. :)
It actually does help me sleep, so fingers crossed. It's really crying out to be a phone app, perhaps one day soon, best
Hi gary ! Actually a phone app rxist called nightwave or something like this
More Comments