Yo! This project is still a Work In Progress. Instructions, board layouts and BOM might change!
A smart clock
License:
Public Domain
Created:
5 years ago
Updated:
4 years ago
Views:
2841
1 Collect
2 Comments
Share
36 Download (35.35 MB)
Donate to support Open Hardware

Introduction:

This project started as an idea to make a lasercut box, and then expanded into a smart clock that should allow sending a message to. This is to avoid yelling in the house (when dinner is ready for instance).

The clock has a link to MySensors, in the sense that it can get the system-time from the controller, and you can trigger the display of a message (2 different messages in fact) via the controller. Getting system time from the controller means you get the advantage of having a clock that adjusts to summer/winter time if your controller does so as well.

The clock als works as a repeater in a MySensor network, and as a temperature and humidity sensor. You could also report the LDR value if one wanted, but that was not what I needed so it is still on the To Do list.

As the temperature within the enclosure is usually a little higher then the actual room temperature, you can set an offset to correct for this difference (showing the corrected temperature on the display). The Controller is always informed of the actual measured temperature.

There is a doppler "radar" sensor built in to detect nearby movement, and this is also reported via MySensors to the controller. This allows the display to change in function of the nearby presence of a person (or animal, as I noticed with our cats). Since detection of movement is also sent to the Controller, you could use this for other scenario's (e.g. home alarm).

It is an alarm clock, with the possibility to define 10 different alarms. Every alarm can be set on specific days of the week, or the complete week. Alarmsounds can be chosen per alarm (either the built in beep or an mp3).

The snooze time is valid for all alarms and is adjustable from 1 minute to 9 minutes.

The display background is dimmable and smart enough to notice a dark environment. You can adjust the LCD backlight intensity to a minimum, a dimmed and a maximum value.

The mp3 volume is adjustable. So is the threshold to which the LDR is compared to decide if the display should be dimmed.

You can choose to have an hourly chime (via a chosen MP3 sound), which will only sound when the environment is bright enough (no hourly chimes in dark rooms or at night).

You can adjust the values of the four color moodlights (red, green, blue and white leds are included in this design).

You can also adjust the date and time of course.

Also adjustable is the sound for message1 and message2. The actual text for those messages is still fixed via code.

The code uses different states to handle all the difference messages.

As documentation progresses, I will add more info on how to use the clock and the meaning of all possible settings.

EAGLE and Gerber files are included, as well as the sketch running on my clock. The PCB uses only through hole components for easy soldering. Except for 1 LDO. Components that only exist in SMD versions are used on modules available from our Uncle Ali's store.

For the MP3's to work, you need to upload MP3 files prior to using the JQ6500 module. How to do that, well ... Google is your friend. Do this on a Windows PC (I normally use a Mac, so this was a pain for me).

The Bootloader is the version provided via the MightyCore hardware, so be sure to included that in your Arduino hardware library. Pinout used for the atmega1284(p) is the Standard Pinout. https://github.com/MCUdude/MightyCore

The display is a 20 by 4 LCD display, you can choose any color, I only assume it is reachable via I2C.

The top of my box has three switches with built in LEDs. The LEDs are used to give some feedback, but you could work with normal switches of course.

The box is made from wood or acrylic, and the DXF file to cut them is available. However I have not figured out how to add that here to the design files (checked with the site admin, it is a new feature request).

Any questions will help in enhancing the documentation, but do read the next statement.

I have no intention of building this for anyone else outside my family, so do not ask. You get the design files, I assume you know what to do with them. Questions on the build will be answered in the form of updates to this description.

There are following parts to the design files: The EAGLE files (schematic and board) The Gerber files The Arduino sketch files The DXF file with the outline of the box I made, to use as input for a lasercutting application (do not ask to provide lasercut readyfiles, do the conversion for your lasercutter as you need). Some pictures to show how I built it, as inspiration.

I had my PCB's made in Shenzen by JLCPCB. Excellent service, I'm happy, so could you. The PCB size is 100 by 100 mm, so OSHPark would be a costly option. They do make super boards, so if you can afford that, feel free. The EAGLE brd file follows their design rules.