Jump to content

The ultimate alarmclock

When my philips alarm clock radio broke I decided it would be a fun project to build my own alarm clock radio. The plan was to build the ultimate alarmclock.

 

My ultimate alarmclock would at least have the following features:

- internet radio because the FM reception is terrible here.

- Time on a seven segment display

- A buzzer

- An additional 1,3" oled display for weather info and stuff

- Much better sound quality than normal alarm clock radios

- A rotary encoder with push button and two additional push buttons for menu navigation and general control

 

Features to add in the future:

- an RGB led to create a wakeup light thingy

- 433mhz transmitter so it can remotely switch on devices

- Act as a bluetooth speaker

- webserver to easily add and manage alarms & settings

 

 

The current state the project is in:

- Rapberry pi running raspbian

- Hifiberry miniAmp to power the speakers (The miniAmp has no hardware mixer so volume control is quite tricky)

- Speakers of an old pair of PC speakers

- wooden enclosure

 

The hardware of the alarm clock is mostly done and is not too complicated. Where it gets complicated is the software. All of the hardware has to be connected to the Pi except for the seven segment and buzzer. I have very little experience with linux and even less with python. The ideal way to build this is to program an OS like code which runs continuously and handles all the inputs and outputs. The problem is that I don't really know where to start. I have written a little console application in C# which works great(with mono on the Pi), but isn't able to handle the in and outputs.

 

Does anyone have a suggestion about the best way inputs and outputs can be controlled without python?

 

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

Umm... Scratch? Python is really the best way to do it tho.

 

Since I am to lazy to put something interesting here, I will put everything, but slightly abbreviated. Here is everything:

 

42

 

also, some questions to make you wonder about life:

 

What is I and who is me? Who is you? Which armrest in the movie theatre is yours?

 

also,

 

Welcome to the internet, I will be your guide. Or something.

 

 

My build:

CPU: Intel Core i5-7400 3.0GHz Quad-Core Processor,

 Motherboard: ASRock B250M Pro4 Micro ATX LGA1151 Motherboard, 

Memory: Corsair 8GB (1 x 8GB) DDR4-2133 Memory,

Storage: Seagate Barracuda 1TB 3.5" 7200RPM Internal Hard Drive, 

Video Card: MSI Radeon RX 480 4GB ARMOR OC Video Card, 

Case: Corsair 100R ATX Mid Tower Case , 

Power Supply: Corsair CXM 450W 80+ Bronze Certified Semi-Modular ATX Power Supply, 

Operating System: Microsoft Windows 10 Home Full, 

Wireless Network Adapter: TP-Link TL-WN725N USB 2.0 802.11b/g/n Wi-Fi Adapter, Case Fan: Corsair Air Series White 2 pack 52.2 CFM  120mm Fan

 

ou do not ask why, you ask why not -me

 

Remeber kinds, the only differ between screwing around and scince is writing it down. -Adam Savage.

 

Only two things are infinite: the universe and human stupidity, and I'm not even sure of the former. - Albert Einstein.

Link to comment
Share on other sites

Link to post
Share on other sites

2 hours ago, vincent0143 said:

snip

Why not use windows 10 iot core on the pi? you can continue to work in c# and use gpio

#killedmywife #howtomakebombs #vgamasterrace

Link to comment
Share on other sites

Link to post
Share on other sites

For all of these fancy features like web server, internet radio and etc, Raspberry Pi is probably your best bet.

 

Be aware that sound output on Raspberry Pi is just PWM signal trough R-C filter, which means sound quality is garbage. So think about getting some module/hat or an I2C/SPI DAC module for that purpose.

 

Nice thing about Linux is that every HW resource is treated as a file. So when you are toggling IOs, writing to I2C/SPI bus and etc. is actually just writing(reading) from a "file".

That is awesome because is super simple and there are tons of easy to understand examples for every programming language.

 

My suggestion would be; break this behemoth of a project into a smaller more manageable parts, for example you would write:

Small application let's call it wakeUpLight and it will take parameters like turn on/off, time it takes to go full on/off, and for how long to stay in that state.

So from some third party app you can call this one and say, wakeUpLight On, 20, 60 and  that would turn on you wake-up lights gradually over period of 20min and keep them on for 60min. Simple, right?

 

Another app that controls your 433MHz module, and when you call it can either just send the payload, or it can run in background and keep received payload somewhere in memory or in a file that you can access easily trough another app.

 

And so on and so on, you get the idea.

You can also have more software approach and have these as modules inside a single app, if you are comfortable with that.

 

I also did a simple project where I use RTC to keep time and small MCU with BLE module so I can set my alarm time. It will power up a big LED strip that has

combination of cold white and warm white LEDs to get a nice "sunny look" in the bedroom. I have to admit waking up to that thing is way more pleasant than

waking up to a alarm sound. I've posted it on my blog [http://sasakaranovic.com/blog/diy-wake-up-light-wake-up-easily-and-well-rested/] so you can take a look and see if you want to borrow anything. Also stay away from RGB led for waking you up,

either go with RGBW if you wish to have color and white, or go with cold/warm white LEDs. RGB has terrible white representation because it uses all three LEDs to

create a color and if you are close to the source it mostly looks bad, especially with cheap LED strips.

 

Maybe share with us what do you have so far and how does it work? Sounds like an interesting project where you can learn a lot and it's super useful.

Link to comment
Share on other sites

Link to post
Share on other sites

On 11/17/2017 at 4:52 PM, simson0606 said:

Why not use windows 10 iot core on the pi? you can continue to work in c# and use gpio

That would be the perfect solution. The problem is that the Windows IOT core is not supported by the hifiberry MiniAmp driver.

 

On 11/19/2017 at 5:55 AM, ColdKeyboard said:

snip

Thank you for the great post! The only thing I don't understand is what you mean with making smaller parts. How would these parts communicate? I have a solution in visual studio which consists out of multiple projects. These projects each have a folder with classes which belong to a piece of functionality. Maybe that is what you mean?

 

I will post some pictures of the project later today. The main progress lately is in the code so I will include some screenshots of the application

Link to comment
Share on other sites

Link to post
Share on other sites

Here are some pictures of the project:

 

The enclosure still needs some work but it's getting there

 

This picture shows the "bass reflex channel". Its not calculated but hey it works:

Spoiler

IMG_20171025_234023.jpg.76ec1a8c996bbbd1291de9606a7b5de8.jpg

 

 

This is the enclose in its current state:

Spoiler

IMG_20171109_121706.jpg.c21ecf112c6342be6414df6445ab9dc5.jpg


 

The alarm clock with a "mock display" and speakers:

Spoiler

IMG_20171119_212228.jpg.fd7cf29c259d245f1562ba61b0f61f4e.jpg

 

 

A screenshot of how a new alarm is created (this actually works already)

Spoiler

Screenshot_WekkerOS.png.17a7acf6b846131dbd6e634267b68dc8.png

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×