LUMOS: Smart Lamp for Better Sleep
by Jonathanrjpereira in Workshop > Science
178789 Views, 786 Favorites, 0 Comments
LUMOS: Smart Lamp for Better Sleep
There are plenty of smart lighting systems out there that let you change light colors and dim with just your smartphone (or even your voice), but this Open Source lamp called Lumos is a smart lighting system that works to benefit your health.
Lumos mimics the natural light of the sun as it passes overhead each day, generating bright blue light in the morning and warmer amber light in the evening.
Decades of research from Harvard Medical School , NASA , and leading institutions around the world have revealed a great deal of information about how light impacts and regulates our health. They explain that blue light aids in the production of cortisol, which is important to give the human body energy in the morning, and red light aids in the production of sleep-inducing melatonin.
Almost 20% of the world's population is sleep deprived & possibly spends more than 8 hours a day under an unnatural light, which can throw off the body’s internal clock and prevent it from performing at optimum levels.
The Lumos smart lamp aims to change that by pairing with WiFi and uses Machine Learning to adjust the light to match your sleep schedule.
Develop:
Are you a programmer, engineer or designer who has a great idea for a new feature in Lumos? Maybe you have a good idea for a bug fix? Feel free to grab our code, schematics & CAD files from Github and tinker with it.
Parts & Materials
Electronic Components
- 1x Raspberry Pi 3 - AliExpress
- 1x Arduino Nano - AliExpress
- 1x RGB LED Strip (12VDC,5m) - AliExpress
- 1x 7805 Voltage Regulator - AliExpress
- 3x IRF540 MOSFET - AliExpress
- 1x 5V USB Power Adapter - AliExpress
- 1x 12V Power Adapter - AliExpress
Tools
- Soldering Iron Station - AliExpress
- Solder Wire - AliExpress
Materials | Dimensions | Quantity | |
MDF Sheet |
5mm, 60cm*60cm |
1 | |
Frosted Acrylic Sheet |
5mm, 60cm*60cm |
1 | |
Mica Sheet |
1mm, 2m*1m |
1 |
Mechanical Design
Specifications:
MDF Base: Outer Radius: 26 cm, Inner Radius: 20 cm.
Frosted Acrylic Diffuser: Outer Radius: 26 cm, Inner Radius: 20 cm.
Mica Support Rings: Width: 4 cm, Thickness: 1 mm, Outer Ring Length: 164 cm, Inner Ring Length: 126 cm.
The circular lower base of the lamp is made out a 5mm MDF Sheet whereas the top circular diffuser is made out of a 5mm Frosted Acrylic Sheet. The laser cutter files for both the base & diffuser are in the PDF below. The base & diffuser are supported by two rings made out of 1mm Mica Strips. The distance between the diffuser & the base is 4cm. Using a Mica cutting blade, cut the two Mica strips which will form the Mica support rings. The inner circle from the remaining MDF sheet once laser cut can be used to laser cut the Electronics Enclosure Box.
Downloads
Mechanical Assembly
Start by marking the drill holes on the ends of each mica strip using the template attached below. Once the holes have been marked & drilled, bring both ends of the mica strip together such that the holes on each end are aligned. Do this for both of the mica strips which form the two support rings.
Using the leather string, weave a knot between the holes in order to securely join the two ends of the mica strips. Do this for both of the mica strips which form the two support rings. You will now have two Mica support rings: Outer & Inner Ring with a radius of 52 cm & 40 cm respectively.
Using a mixture of Super Glue/ Instant Adhesive & Baking Soda, stick the support rings to the inner & outer edges of the MDF Base. Drill a hole for the power & control wires at the bottom of the MDF base.
Remove the protective layer from the RGB LED Strip & begin sticking the strip to both support rings. Stick the LED Strip as close to the base as possible. This will ensure that the light is evenly diffused & that individual LED outlines are not visible. Ensure that the 4 wires (Power & Control) are connected to the LED Strip & are routed through the hole made in the MDF Base.
Electronic Assembly
The Raspberry Pi uses Wi-Fi to get the location specific time zone & also uses its internal Bluetooth Module to analyze RSSI values of a Smartphone in order to calculate proximity of the smartphone
The Arduino is used to control & test the analog values which control the intensity of the RGB LED Strip. By changing the analog value using PWM we can control the color produced by the LED Strip.
The Arduino can only supply a maximum of 5V, 20mA through its I/O pins. Whereas the RGB LED Strip generally requires a power source of minimum 12V, 1A.
The solution to this is using a MOSFET as a switch. The Gate pin of the MOSFET can be used to control the ON/ OFF state of the MOSFET. The Source pin is connected to LED Strip while the Drain pin is connected to Ground. Each Gate pin of a MOSFET is controlled by a separate PWM pin on the Arduino. The LED Strip has 4 pins: +12V, R, G & B. The +12V is connected to the +12V of the 12V power adapter. The R, G & B pins are connected to Source of each MOSFET respectively.
The Arduino makes it easy to calibrate the colors of the RGB LED Strip. Calibration of the RGB values varies with the manufacturer & model of the RGB LED Strip. If calibration is achieved, the cost can be reduced by using an appropriate Digital to Analog Converter(DAC).
The Raspberry Pi & Arduino communicate using the I2C protocol.
The Eagle CAD files & Schematics are attached below.
Software
The Raspberry Pi is used to detect the presence of a human being & monitor & track the sleeping habits of the human being. Depending on the sleeping habits of the human being, the color changing sequence will be adjusted.
The Raspberry Pi is running the latest version of NOOBS OS. It has to be configured to the location specific time zone. The MAC address of the Bluetooth Module of the user's Smartphone is verified when tracking the presence of the human being. When the human being is asleep, their smartphone should be placed as close as possible to the lamp. Hence it is recommended to place the lamp close to the bedside table. The RSSI strength will vary depending on the distance between the Raspberry Pi & the Smartphone. Once the location of the Raspberry Pi in the room is fixed, a threshold value can be set to configure the Sleep tracking.
For the first two weeks, a pre configured lighting sequence is initialized while the users sleeping habits are tracked. Once sufficient data is collected to determine the sleep & wake up times the system calculates the length & time of the Color Lighting sequence. Typically the light initializes the Sunset phase an hour before sleep is expected and Sunrise phase half an hour before a wake-up/ rising is expected.
Since there are multiple software files, the code for this Instructable can be found here:
Open Source
All the files including code, electronic circuits & schematics, CAD & design files are Open Source & are available on the Github Repository.
The software & electronics is regularly updated & modified.
The initial design, software & electronics was created with the help of two of my friends Callum & Mark.
We encourage other Engineers, Developers, Designers, Architects, etc to help us by contributing to the Repository.
If you have any alternate design layout that you would like to make, you can upload the CAD & layout files to the repository, so that others can recreate it too. If you think that we can use an alternate Microcontroller to control the lighting sequence, you too can contribute to the Electronic Circuits & Software.