Introduction: Sunrise Alarm Clock

Picture of Sunrise Alarm Clock

Many people find the beep of an alarm clock to be a very unpleasant way to wake up. One alternative is to use lights to wake you up. For instance, a "sunrise alarm clock" gradually increases the brightness of a light near your bed at the set time. This helps some people to wake up more gently. 

So in this project I am going to show you how to build a light alarm circuit from a outlet timer and a hand full of basic electrical components. 

Step 1: Materials

Picture of Materials

Here are the materials that you will need to make the circuit:

AC Light Timer
USB Cable
USB AC Adapter
1 Mohm Resistor
4 X 100 ohm Resistor
10 kohm Potentiometer (Variable Resistor)
1000 µF Capacitor
Printed Circuit Board
Jumper Wires
Extension Wire (optional)
Momentary Switch (optional)

You will also want to have the following tools at hand:
Soldering Iron and Solder
Wire Strippers
Wire Cutters
Non-Conductive Tape

Step 2: The Circuit

Picture of The Circuit

This circuit is essentially just a resistor/capacitor timer with a transistor amplifier. The capacitor is initially discharged. When the power is turned on, the capacitor begins to charge through the 1Mohm resistor. As this is happening, the output voltage of the capacitor slowly increases. This voltage signal is sent to the transistor which sets the transistor's output. This causes the LEDs to gradually increase in brightness over several minutes.

The potentiometer (variable resistor) is used to adjust the starting voltage of the capacitor. This effectively lets you set the initial brightness of the LEDs. Without it, the LEDs would be off for a long period of charging before the output would be high enough for LEDs to begin to emit light.

The values of the 1000 µF capacitor and the 1 Mohm resistor were arbitrarily chosen for convenience. Increasing either of these values will slow down the charging process and cause the LEDs to brighten more slowly. Decreasing either of these values will have the opposite effect.

The IRF510 MOSFET was chosen for the transistor because it requires very little input current and is capable of driving a large number of LEDs.

Optionally, you can connect a normally open momentary switch to the two terminals of the capacitor to act as a snooze button. Pressing the button will drain the capacitor and restart the charging cycle.

Step 3: Assemble the Circuit

Picture of Assemble the Circuit

Following the circuit diagram in the previous step, I prototyped the circuit on a breadboard. When testing the circuit, remember that you need to discharge the capacitor between each trial. The LEDs brighten as the capacitor charges. If it is already fully charged then they will stay at a constant brightness.

After testing the circuit to make sure that everything was functioning properly, I soldered the circuit together on a printed circuit board. I decided to add a few more LEDs to make it a little brighter. Then I trimmed the circuit board to fit. Depending on how you plan to mount the lights, you may wish to add additional wire so that you can reach areas that are further away from the outlet.

Step 4: Mount the Circuit

Picture of Mount the Circuit

There are a lot of ways that you could mount the light. The simplest way is to just place it next to your bed on your night stand. This can work but it is less effective if you are facing the other direction. Another option is to mount it over your bed in something like a hanging lantern. If you want the light to be more directional, you can mount it in an adjustable lamp that can be pointed at your pillow. If all else fails you can put the lights directly into a pillow, such as "Bright Light Pillows." Do whatever works best to wake you up.

Step 5: Set Up the Timer

Picture of Set Up the Timer

Plug the timer into the wall outlet. Plug the USB AC adapter into the timer. Then plug the USB cable into the adapter. Set the timer to turn on about 15 minutes before you want to wake up. When the timer goes off, it will activate the circuit. The LEDs will then gradually turn on and hopefully wake you up. 

Step 6: Finished Sunrise Alarm Clock

Picture of Finished Sunrise Alarm Clock

Now you have your own DIY sunrise alarm clock. When you are first trying it out, you may wish to have a regular alarm as a backup just in case the light doesn't wake you up reliably.


JoshuaA42 (author)2017-10-02

Hi. If I would add, say 5 more LEDs, what value of resistor should I put in series with each led. I dont have any idea of the computation that I should do. Thank you for the response.

SanneA1 (author)2016-10-25

I was wondering if you could help me ‘translate’ your 5V ‘Sunrise Alarm Clock’ into a 12V setup?
My goal is to make an LED strip I have (with 45 LED’s 12V) ‘fade in’ in somewhere between 10-20 minutes, like yours.
This is what I have on hand, based on your list:

-IRF510 MOSFET (effect: 100V-5.6A-43W) - should be fine for 12V?
-1 Mohm Resistor (effect: 1 Mohm / 1W) - Would this go with a 12V supply?
-4 X 100 ohm Resistor - didn't get them since resistors are built into LED strip.
-10 kohm Potentiometer (Variable Resistor) - Would this go with a 12V supply?
-1000 µF Capacitor (effect: 1000uF / 10V) - I couldn’t find any capacitors with 12V, would this 10V work? If not, could I use it together with an extra capacitator I have, with 2200µF / 10V? (I’m guessing no, but I’d love to hear your suggestion).

I’ve read all the comments, looking for answers, and I’m impressed how helpful you’ve been to everyone, hope you wont mind answering a few more questions!
Thank you

TurkuQ (author)SanneA12016-11-30

Alternatively, if you have two 2200uF / 10V capacitors, you can put them in series to act as one 1100 uF / 20V capacitor.

All of those parts should work fine. You just need to make one small change in the design for the capacitor. You don't want its voltage to get above 10V. The terminals of the capacitor are connected to the 1Mohm resistor and the center pin of the potentiometer. So its voltage will be the difference in the voltage between those points. The 1Mohm resistors will eventually let the positive lead of the capacitor reach the full voltage of the supply voltage. But the voltage of the center pin of the potentiometer depends on the setting. The potentiometer makes a voltage divider.

Its voltage can range anywhere from 0 to the supply voltage. In order to prevent the capacitor's voltage from going above 10V, you want to make sure that the center pin of the potentiometer never goes below 2V. You can do this by adding a fixed resistor (at least 2.2Kohm) between the bottom pin of the potentiometer and ground.

If you have any other questions let me know.

Kdep (author)2016-11-01

Will this setup work on an AC power supply (no AC adapter)? I am planning on wiring an AC plug where the LEDs are located with the objective of being able to plug in a bedside lamp that would otherwise be plugged into a wall socket. Common sense tells me no, but I thought I would ask.

If you just want to have the lights turn on with the timer, you can plug the lamp directly into the timer and it will work. But if you want to have the lights fade in, then you will need an AC dimmer circuit. To be honest, I am not sure of the best way to make one of those.

Thanks for the quick reply. I've looked into them, they just seem a tad more complicated.

nashanator17 (author)2016-08-11

I was wondering if instead of using an AC light timer, is it possible to use the RTC library in Arduino to set the time for the alarm?

That could work. I was just using the parts that I had on hand at the time.

ChantelleC5 (author)2016-05-27

I am using this for a college project to gain a qualification in C&I and complete my apprenticeship.

I was hoping you would be able to tell me a few things about the project for my PDS:

- The weight of it.

- Approximate product life span.

- Quality and Reliability.

Thank you.

The circuit itself is really light. Most of the weight will be from whatever you mount it in. It should last for the life of the LED that you use. It is a simple system. So it is pretty reliable. There is not much to break or do wrong.

Thank you. Could you also tell me the make and kind of potentiometer you have used? After building I realised I used one that you have to adjust, which is wrong.

Any kind of potentiometer can work. It is just used to set the initial brightness when the light turns on. If you want you can replace it with a fixed resistor or just leave it off. It isn't critical.

Vthartigan1 (author)2016-01-30

Can you please share steps on how to do this on a breadboard? 8 year old really wants to do this as his school project, we are in the thick of it right now. Would be amazing to get materials list and steps.

Step 3 has a picture of the circuit assembled on a bread board. The circuit board used is also in the same configuration as a bread board so all the components can be placed in the same location.

Abhi909 (author)2016-01-31

great project

can i place your project on my website.

i'm working on a website which is related to electrical projects.

i also mention your name, link and other info.

plz reply

This project is posted under Creative Commons Attribution. So you can feel free to repost it as much as you want as long as you include the proper attribution.

DanielM287 (author)2016-01-20

Hi, what PCB plate type (number ) you use to build it ?

Miykoll made it! (author)2016-01-06

Yeey, I made it, but I still don't understand how it works with the capacitor and the mosfet. I understand that the voltage increases due to the capacitor, but how does this increases the brightness of the LEDs? At a certain voltage, a threshold is reached which will "activate" the mosfet. 5v is then running through the LEDs. The only way I see to decrease LEDs brightness is use of lower voltage, but the LEDs get a static 5V.

So my question is, how does this circuit changes the brightness of the LEDs?

The capacitor is discharged at the start with a voltage of 0V. When power is connected, the capacitor begins to gradually charge and the terminal voltage increases. The capacitor is connected to the gate of he MOSFET. When the gate terminal reaches a certain threshold, it begins to conduct electricity between the source pin and the drain pin. As the gate voltage goes up, the LED's gradually brighten. When the maximum voltage is reached, the LED's are fully on. This is how the LEDs gradually turn on once activated.

I still didn't understand it, so I asked a friend. Now I understand it. This small sentence "As the gate voltage goes up, the LED's gradually brighten." has the solution. I thought MOSFET behaved like a switch, either closed or open, so I was wondering how PWM was created to create the dimming effect of the LEDs. But as explained by you, the MOSFET will slowly open, which will let the voltage rise and increases the brightness. Thank you for your explanation!

Bill Jates (author)2015-12-19

I'm a total beginner in electronics. Would working through the popular book Make: Electronics: Learning Through Discovery be adequate to understand this project? If not, what else would it take to get my knowledge up to speed?

There are a lot of good books out there. I personally love anything by Forrest M Mims.

duc_d_arkansas (author)2015-10-04

Hey man! This is a great idea! Thanks for posting this.

Suppose I wanted to replace the LEDs with a 60W LED lightbulb. What changes would I have to make to the setup then?


You would need a completely different circuit to work with a 60W bulb. Regular light bulbs are designed to use 120V AC.

You can always use a relay, Can't you?

Yes. But a relay just switches from all off to all on. If you just wanted to turn on a light, you could just plug a lamp into an outlet timer.

turgsh01. (author)2015-11-11

Both me and a close friend of mine are interested in making a sunrise clock and I personally really like the simplicity of this one since it doesn't require software. Unfortunately, I doubt 7 LEDs would be enough for someone like me (unless maybe I made more than 1 which would look quite tacky). I was thinking more along the lines of losing the USB power limitations and going with a 120v output and powering a 6 - 10 watts LED light bulb, and I know it would require a completely new design but the principle would still be the same, right? The problem I have is figuring out the specifics in capacitors and stuff... google isn't helping me out at all on this one since no one seems to have done this before / shared the details. It's been about 10 years since I was in college, and I only skimmed the surface in this kind of stuff for computer circuitry, so I feel like I'm biting more than I can chew here. I know this is a lot to ask, but would it be at all possible to maybe make another tutorial on this but for a 120v LED light bulb version? Or alternatively, you said you can add many LEDs to this design, what would be the limit before the LEDs don't receive enough power to reach full brightness?

Well, the simplest solution is to simply plug a lamp into an outlet timer. You lose the fade in effect, but you can use any light that you want and you can make it very bright.

Another option is to use a larger power supply. The USB plug can only output a max of 5 watts usually. Then get larger brighter LEDs. Just make sure that you don't overload the Transistor. Check the rating of the transistor and use multiples if they aren't strong enough. If you use higher power LEDs, don't use resistors. The resistors will fry. Just put multiple LEDs in series until you get to the voltage of the power supply.

Bought all the parts listed in bulk so I have plenty of room for error. Went with the 10.5 watts USB adapter (5v, 2.1A) for the extra power. I assume any voltage rating over 5v for the capacitor is fine (I went with 10v). I'm hoping to be able to manage at least double the quantity of LEDs you got for yours. IRF510 MOSFET transistor is said to be rated for 5.6A, so that should be fine. Hopefully I don't run into too many problems though. I kind of feel like Tim the Tool Man Tailor... more power! lol.

But what's this about resistors frying with higher power LEDs? The ones I'm getting are: 0.5w, 3 - 3.6v, 100-120mA. Is that unusual? Or did you mean if I went with a 120v LED light bulb socket type?

Something I'm currently confused about is whether or not I need to go with a USB 3.1 Type C cable to get the full 2.1A output or will a standard USB 2.0 cable use the full power just fine. Because I'd like to mount a USB port to the PCB so that it's plug and play but I also don't want to waste money if I don't need to since USB-C ports are a bit pricey right now. I do have a tester to verify the output, so I guess I can find that out later when the parts come in.

In about a month from now, when I get all the parts and can put them together, I'll post again with pics of my results. Thanks again.

That all sounds like it should work. With the resistors, you have to keep in mind the wattage rating. Most resistors are either rated for 1/8 watt or 1/4 watt. This refers to how much power is dissipated in the resistor itself. To choose a resistor you use: R = (Vsource - Vled) / Current(led). So R = (5 - 3.6) / 0.120 = 20 ohms. To find the wattage dissipated in the resistor: W = (Vsource - Vled) x Current(led). So R = (5 - 3.6) x 0.120 = 0.288 watts. This is close enough to the 1/4 watt rating that it will be fine with a 1/4 watt LED. But if you were using higher wattage LEDs, then they could over heat.

The only difference between cables is how thick the wires are. Really the cable doesn't matter as long as it doesn't get too hot.

You can always add salvaged mini heat-sinks if you have any

Yonatan24 (author)turgsh01.2015-11-25

You can buy 10W LED's on eBay for less than a dollar each, They're extremely bright!

FelixM17 (author)2015-11-01

Would it be possible to just resize this whole thing up to 30 LEDs with the same transistor and capacitor? Im mean like just adding a few more LED and resistor combinations in the line...

The power transistor is strong enough to drive 30 LEDs. Just make sure to use the appropriate resistors so that the LED aren't over loaded.

i think 100ohm should be sufficent right?

That is what I used. with a 5V USB power supply.

Which i'll use as well. 2A USB charger should be sufficient

RileyPatton (author)2015-10-05


"Jumper Wires" is just a term used to describe a short piece of wire that is used to connect one component to another.

RileyPatton (author)2015-10-05

would it be able to use some sort of buzzer along with the LED lights so that it buzzes and lights up? If so, can you give me a link to a sort of buzzer that might work?

You can easily add a buzzer. Just find a piezo buzzer that can work at 5V. Then wire it in parallel with the LEDs and their resistors (between the positive supply voltage and the transistor).

RileyPatton (author)2015-10-04

So I am brand new to this and I have ordered all of the parts, but the video does not explain how to literally make the clock. Could you make a video or send pictures of the front and back of the breadboard so that I know what pieces connect to what? Also, what do you connect the wires from the USB cable to?

I would also like to use a mini solar panel to power this. Any suggestions on how to do this?

Here is a tutorial on how to read circuit diagrams. And step 3 has pictures of the front and back of the circuit board. The USB cable provides the power. The red wire is the positive supply voltage. The black wire is the negative. This design is not easy to use a solar panel with because it uses a 120V outlet timer. But you could make a timer circuit that runs on DC.

GabrielC34 (author)2015-09-17

This is awesome! Here's a more complicated version of the same idea that i put together:

joona (author)2015-09-15

Would this work with a 12V 2.5A 5m LED strip assuming I'd change the power source to one that is capable of producing 12V and atleast 2.5A?

In theory it could work with the right parts. A single power transistor would not be able to handle that big of a load. So you would probably need to multiples or a different kind of controller.

Tharnden7 (author)2015-09-03

What wattage are all your resistors? I am by no means electrically inclined. If I wanted to double the time it takes to fully come on, what capacitor and resistor combination should I use?

I used 1/8 Watt resistors. The time it takes for the lights to come on is proportional to the resistance times the capacitance. So double either the resistor or the capacitor or some middle combination.

About This Instructable




Bio: My name is Jason Poel Smith I am a Community Manager here at Instructables. In my free time, I am an Inventor, Maker, Hacker, Tinker ... More »
More by DIY Hacks and How Tos:36 Things to Cook in a Coffee MakerHow to Make a Festivus PoleAdd Wings to an Infant's Halloween Costume
Add instructable to: