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.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: What You Need
- Raspberry Pi mod.B
- 5V power supply
- WIFI dongle or RTC module
- Grove - Temperature&Humidity
- Grove - LCD RGB Backlight
- Grove - Buzzer
- Grove - Light sensor
- Grove - Button
- Grove - Rotary angle sensor
- Grove - Led
- Enclosure box
- 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
For this project i've used sensors of GrovePi+ starter kit :
The enclosure box can be something like this:
Step 2: 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 (*):
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:
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
Step 3: The Code
copy file itstime.py inside directory:
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
Step 4: Cutting the Box
Draw on the plastix box shapes for LCD display and button.
Then use cutter after heating it(be careful!) to cut.
Step 5: 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.
Step 6: 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.
Step 7: 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.
Step 8: 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.
Participated in the