How to make an Arduino-based light alarm

    Hello, Habr!

    Work and life constantly throw up new tasks, their number is multiplied every day. Will it be easier? Not. This is life. It remains only to come up with a suitable solution or to adopt the existing experience. Articles and notes about effective work, time management and other things were published on Habré more than once. I use some tips, some fail. In principle, a more or less clear day regimen helps to be effective and alert. But it’s not always possible to start the day at the scheduled time. One of the reasons - in the dark, our brain secretes the sleep hormone - melatonin. To wake up easily and to be awake, you need light, which helps to reduce the amount of melatonin in the body. And then you wake up awake and rested. But in the fall and winter it dawns late, and in the summer blackout curtains do not let the sun's rays into the room. Yes, and before the planned, too, I would not want to get up, if we talk about the summer. So we take control of the topic and manage the dawn in our own house on our own, according to an individual schedule, i.e. make a light alarm. And here's what happened:

    What we need

    The Master Kit has an EK-004A kit - a constructor for assembling an Arduino-based FM radio, which it was decided to use to create a light alarm clock.

    To the standard kit EK-004A add:

    • RTC Real Time Clock - MP1095
    • IFC remote control with receiver - MP1094
    • Powerful lighting LEDs (connect according to the scheme described in the article )
    • Driver for LEDs (connect according to the scheme described in the article )

    Connect the MP1095 to a special connector on the central board, as shown in the figure:

    MP1094 connect to a special connector on the central board, as shown:

    Inside the case / box: The


    LEDs are glued to the bottom wall: The

    new version of the EK-004A radio software will turn your radio receiver into the light alarm clock:

    Download firmware / sketch


    PinChangeInt MP1092

    description and purpose of the remote control buttons:

    buttons - adjust the volume of the
    rewind button | <<, >> | - tuning stations
    buttons 1, 2, 3 - go to the stations set by the corresponding (wired) buttons connected to the radio board

    “clock” button (second from top to first from left) - time setting:
    - rewind buttons - hours
    - volume buttons - minutes
    - exit - repeated pressing the "clock"

    button SEL button - setting the brightness of the LEDs:
    - volume buttons - adjusting the brightness
    - exit - pressing the SEL

    button again, the on / off button (first on top and left) - on / off. LEDs (turn on with the current brightness value, default 0)

    MODE button - alarm setting:
    - first press - setting the alarm time:
    - rewind buttons - hours
    - volume buttons - minutes
    - second press - setting the brightness of the LEDs: volume buttons - adjusting the brightness
    - third pressing - setting the radio station and volume: rewind buttons - setting the station buttons 1, 2, 3 - switching to the recorded stations
    - volume buttons - setting the volume
    - fourth pressing - setting the time “dawn” start time in minutes, maximum 30 minutes, minimum –1. (For example, if set: alarm time is 6:00, dawn start time is 10, then the LEDs will light up at 5:50 and will light up with the set brightness (second step) 6:00)
    - the fifth depression - you od of alarm settings
    - button "arrow" (first from top, second from left) - activation / deactivation of the alarm (0 is off, 1 is on)

    Also popular now: