IT - RaspberryPI Alarm Clock
by Acmecorporation in Circuits > Raspberry Pi
20857 Views, 35 Favorites, 0 Comments
IT - RaspberryPI Alarm Clock
Hello guys
In this instructable i'll show an alarm clock project based on RaspberryPi and GrovePi+ Starter Kit.
Its name is "IT", that's the shortening of "It's Time". Version instructabled is 1.3, youtube video shows 1.0 .
It's a standard alarm clock that can be configured at your pleasure.
Once you have completed this project, you'll never need: keyboard, monitor, remote controllers, etc to configure current time and alarm time setting. You have just to press the button and turn the knob to set alarm time data. Current time is taken from a wifi connection but you can customize with a RTC module.
Feature that i love is that, once you have selected your preferred alarm time, the clock doesn't loose alarm time dates in case of power failure.
Last but not least display shows current temperature and humidity. LCD backlight decreases proportionally with the ambient light.
The enclosure selected is a Tupperware pasta box. It's very hard to cut so try to find something of poor quality.
What You Need
Hardware:
- Raspberry Pi mod.B
- 5V power supply
- WIFI dongle or RTC module
- GrovePi+
- Grove - Temperature&Humidity
- Grove - LCD RGB Backlight
- Grove - Buzzer
- Grove - Light sensor
- Grove - Button
- Grove - Rotary angle sensor
- Grove - Led
- Enclosure box
- Knob
Consumables:
- Screws
- Double-side adhesive tape
- Rubber washer (hole diameter 1.2 mm, highness approx 0.6 mm)
- n.4 rubber or plastic supports
- Glue for rubber and plastic
- felt pad
Tools:
- screwdriver
- cutter
- file
- candle
- grip
- drill
For this project i've used sensors of GrovePi+ starter kit :
http://www.dexterindustries.com/site/?product=grov...
The enclosure box can be something like this:
Let's Start
Connect GrovePi+ to Raspberry and connect sensors as follow:
- lcd display to I2C-1
- rotary sensor to A1
- button to D3
- buzzer to D2
- DHT to D4
- light sensor to A0
- connect led to D6
Download Dexter Ind. modified "wheezy" image from the following locations (*):
http://sourceforge.net/projects/dexterindustriesra...
and copy to your SD card.
Insert SD card into Raspberry Pi and power on.
Expand to the full size of your SD card running the command:
sudo raspi-config
You can update your configuration:
sudo apt-get update sudo apt-get upgrade
create two empty text files in your /home/pi directory as follow:
touch sveglia.txt touch onoff.txt
copy in your /home/pi directory the file grove_rgb_lcd.pyc
It can be found inside directory ./pi/Desktop/GrovePi/Software/Python/grove_rgb_lcd
(*) My Raspbian version downloaded: Linux raspberrypi 3.18.7+ #755
The Code
copy file itstime.py inside directory:
/home/pi
now you can try it running:
sudo python itstime.py
if everything it's ok, autostart the process as follow:
sudo crontab -e
add, at the end, the following line:
@reboot sudo python /home/pi/itstime.py
Downloads
Cutting the Box
Draw on the plastix box shapes for LCD display and button.
Then use cutter after heating it(be careful!) to cut.
Drilling the Box
With a drill make three holes. First one at the right side of LCD display and its diameter must be 6-7 mm for rotary angle sensor size.
Make other two holes on the back side of the box, one for the power cable and one for the sensor cables. For an easy fitting of these cables, make two cuts from the edge to the holes.
Fixing
Screw LCD display at its place.
Stick the rubber washer inside the box, then screw rotary sensor to it.
Screw DHT and light sensors on the backside of the box.
Screw Led and buzzer to internal backside of the box.
The Button
Now you have to file the upper side of two screws. To do this you have to hold the screw with a grip.
Place the button and screw it. Try it pressing several times, if you hear "click" each time is pressed, it works.
With double-side adhesive tape stick the felt pad on button.
Final Step
Find a rotary sensor compatible knob then connect cables as explained at the step 2.
RaspberryPi & GrovePi+ are placed inside the box on four rubber washers sticked with double-side adhesive tape.
Bye bye!