Raspberry Pi Pico - Alarm Clock Project

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 พ.ค. 2022
  • This is a basic alarm clock made with the Raspberry Pi Pico and a few modules. The clock is based on the ds1302 RTC module, and display the date and time through the 16x2 character LCD.
    If you have any questions let me know, and I appreciate your feedback as it helps me improve the content I put on the channel. Also thanks everyone for all the support.
    Discord: / discord
    Code + Files and Libraries:
    github.com/Guitarman9119/Rasp...
    If you are new to the Raspberry Pi Pico I have made a Getting started video:
    • Raspberry Pi Pico Tuto...
    Check out my channel for other videos on the Raspberry Pi Pico, as I will regularly upload tutorials and projects related to the Raspberry Pi Pico.
  • แนวปฏิบัติและการใช้ชีวิต

ความคิดเห็น • 51

  • @NerdCaveYT
    @NerdCaveYT  ปีที่แล้ว +3

    In the schematic diagram there is a small mistake, the CLK of the RTC is connected to ground and not GP18

  • @jimmy21584
    @jimmy21584 2 ปีที่แล้ว +3

    I like the LEDs along the bottom! I use a similar lcd clock to time my work hours, but I used an esp8266 which connects to a time server via wifi to set itself, and 4 cherry keyboard switches and 3d printed case.

    • @NerdCaveYT
      @NerdCaveYT  2 ปีที่แล้ว +1

      I saw a lot of people connecting the esp to pico for external wifi have not given it a try yet, it seems most people set the clock that why then you don't need the RTC.

  • @AndrewGearhartA
    @AndrewGearhartA 2 ปีที่แล้ว +1

    I've been overthinking and under actioning a project like this for quite some time. The differences for the project in my head are
    * to use a pico 2w
    * allow the device to set it's own clock automatically via NTP
    * allow for an API to flex the alarm time based on outside conditions (for example if a system is down, the alarm wakes you up, or if the weather is looking like your commute is predicted to take longer, then it wakes you up 30 minutes earlier to account for the longer commute). The idea is that the alarm clock could just accept the new alarm times via the API and pre-shared tokens/keys, but something else that holds the keys could be programmatically smarter to figure out the new alarm time. Another example that I thought would be cool was if, on a school snow day... I wouldn't have to sneak into my kid's bedrooms to turn off/change their alarms.
    Great project! Awesome execution! Thank you for sharing with the community.

    • @NerdCaveYT
      @NerdCaveYT  2 ปีที่แล้ว +2

      That does sound like a lot of work, my programming is not up to standard as it should be struggled hours just to get the formatting correct on screen, but have the clock connected to online and having connecting to an API to change alarm based on conditions sounds cool. I think to change the alarm in this project I made easiest might be to add a Bluetooth module to set the alarm instead of the buttons. Also thank you for taking the time to comment and I am glad you liked the project. I am making PCB's for this for my students so that I can have them build it on breadboard then give them a PCB, then they can focus on making their own case etc.

  • @vahidmollaie3760
    @vahidmollaie3760 ปีที่แล้ว

    Nice. I wil make all your project. They were great

  • @rodrigodemarchi1184
    @rodrigodemarchi1184 ปีที่แล้ว

    great vid! very explanatory!

  • @theadventurousprogrammer6449
    @theadventurousprogrammer6449 2 ปีที่แล้ว

    Awesome job!

  • @colinmurphrey6448
    @colinmurphrey6448 ปีที่แล้ว

    Super random comment, but I came across this video and noticed that it was uploaded on my birthday! :D I think this is telling me to build a Rasp Pi clock now lol

    • @NerdCaveYT
      @NerdCaveYT  ปีที่แล้ว

      happy belated birthday, I think so. I made a pcb for it to do a version 2, which I should maybe do this weekend.

  • @nimasadeghi58
    @nimasadeghi58 ปีที่แล้ว +1

    hi, im trying to make an alarm clock like the one with pico but i will be using a raspberry pi 4 is there any way to avoid using ds1307

    • @NerdCaveYT
      @NerdCaveYT  ปีที่แล้ว +1

      Hi Nima, first question is will the Pi be connected to the internet if so, it will be much easier since you can access a website through API then get accurate info about weather etc. to display.

  • @uzumakiruperto
    @uzumakiruperto ปีที่แล้ว

    great project!, i want to set it like a temporizer... or set the alarm in a particular date... how can i do that?

    • @NerdCaveYT
      @NerdCaveYT  ปีที่แล้ว

      You are going to have to write another function to set the date and if it the set date is equal to the date set by user the alarm will go off

  • @armand9910
    @armand9910 2 ปีที่แล้ว

    Awesome! :)

    • @NerdCaveYT
      @NerdCaveYT  2 ปีที่แล้ว +1

      Glad you like it!, for the next video suggest a decimal to binary converter 😉

    • @armand9910
      @armand9910 2 ปีที่แล้ว

      @@NerdCaveYT Can you please do a video on a decimal to binary converter? :)

  • @NukeFinity
    @NukeFinity 4 หลายเดือนก่อน

    Could you build the alarm clock with the internal pico rtc?

    • @NerdCaveYT
      @NerdCaveYT  4 หลายเดือนก่อน

      The only problem using the internal RTC, is that the Pico does not have a battery on it, so every time it is turned off you will have to set the time where as with a RTC module it keeps the time as long as it has power, or if clock has access to Wi-Fi then Pico W is better since you can quickly grab time from online. If you want to use the internal RTC with micropython as follows:
      rtc = machine.RTC()
      rtc.datetime((2020, 1, 21, 2, 10, 32, 36, 0))
      print(rtc.datetime())

  • @user-no4eb8xs2l
    @user-no4eb8xs2l 8 หลายเดือนก่อน

    Great job , i want to set 2 different alarm (06:00 and 17:00) how can i do????

    • @NerdCaveYT
      @NerdCaveYT  8 หลายเดือนก่อน +1

      The code will have to change for that to add two functions or to set two alarms

    • @user-no4eb8xs2l
      @user-no4eb8xs2l 8 หลายเดือนก่อน

      @@NerdCaveYT Can you help me to do it thanks ☺️

  • @queithai9035
    @queithai9035 11 หลายเดือนก่อน

    Would this work with a raspberry pi 3 too?

    • @NerdCaveYT
      @NerdCaveYT  11 หลายเดือนก่อน

      it would but the code shown here would not work, as you will have to use libraries specifically for the pi 3. I would also suggest not use the ds1302 if Pi has wifi because can get date and time from any website providing that info through there API

  • @christianmarcos5797
    @christianmarcos5797 ปีที่แล้ว

    Is it possible to connect it to a 9v battery as a source?

    • @NerdCaveYT
      @NerdCaveYT  ปีที่แล้ว

      No. Safe operating voltages are between 1.8V and 5.5V. If you want to I would suggest you get a buck converter module that will step 9V down to 5V or a voltage regulator.

  • @marcelocorrea7916
    @marcelocorrea7916 2 ปีที่แล้ว

    If got light on the buttons you could also build a Simon Says Game :) congrats.

    • @NerdCaveYT
      @NerdCaveYT  2 ปีที่แล้ว +1

      What a great idea did not even think about it, should add that to the code.

  • @PrinceSharma-hk7wv
    @PrinceSharma-hk7wv ปีที่แล้ว

    sir getting error in main file line 39 please help

    • @NerdCaveYT
      @NerdCaveYT  ปีที่แล้ว

      so few things it could either be the connections to the pico or:
      I2C_ADDR = 63
      I2C_NUM_ROWS = 2
      I2C_NUM_COLS = 16
      which there is a chance that your I2C address is not correct.

  • @MahBor
    @MahBor ปีที่แล้ว

    I've had problems with DS1302 not showing correct time after 1 year

    • @NerdCaveYT
      @NerdCaveYT  ปีที่แล้ว +1

      I have so far not experienced anything but then again the clock only been on few weeks

    • @MahBor
      @MahBor ปีที่แล้ว

      @@NerdCaveYT yeah. It's just a few min per year so not a big deal considering how cheap and accessible they are.
      Btw I learn so much from your videos, keep up the great work!

    • @NerdCaveYT
      @NerdCaveYT  ปีที่แล้ว +1

      @@MahBor thank you this long break from making videos was awful but settled in the new city so can't wait to start again

  • @TheUnofficialMaker
    @TheUnofficialMaker 2 ปีที่แล้ว

    can you set the time?

    • @NerdCaveYT
      @NerdCaveYT  2 ปีที่แล้ว +1

      The time you have to set in code unfortunately, you set the ds1302 time here: ds.date_time([2022, 5, 24, 0, 18, 24, 00]) then run the code then the ds1302 will start keeping the time then you have to uncomment the line of code and run the program again. This will then make sure the time is not reset but still using the correct time from the ds1302. That is why I only made the set alarm functionality because once time is set the battery on the ds1302 can last up to 20 years of keeping the correct time.

    • @TheUnofficialMaker
      @TheUnofficialMaker 2 ปีที่แล้ว

      @@NerdCaveYT I see, thanks for the fast response, love the projects. Great job.

    • @NerdCaveYT
      @NerdCaveYT  2 ปีที่แล้ว

      @@TheUnofficialMaker Thank You

  • @pouceo
    @pouceo ปีที่แล้ว

    How about an Amazon Echo Clock? Maybe with a Pico W, but probably with a Zero W.

    • @NerdCaveYT
      @NerdCaveYT  ปีที่แล้ว +1

      I have not heard about Amazon Echo Clock before will check it out, recently I made a clock with the 8*32 rgb matrix using the pico W have not recorded the video yet

    • @pouceo
      @pouceo ปีที่แล้ว

      @@NerdCaveYT I just mean an Echo that also has a clock. I've seen builds for an echo, but not a combination one with an alarm clock 😉

    • @NerdCaveYT
      @NerdCaveYT  ปีที่แล้ว

      @@pouceo I checked now what it is, we don't really have amazon back home and currently I am living in China so all the smart home things are xiaomi projects and of course all in chinese

    • @pouceo
      @pouceo ปีที่แล้ว

      @@NerdCaveYT ha! okay, thanks for looking into it.

    • @pouceo
      @pouceo ปีที่แล้ว

      @@NerdCaveYT My son and I are making him an alarm clock based on your build with a pico W. This way I can set the time pulling from the internet. I'll be interested to see your pico w build when it is finished.

  • @JonnyBaggs
    @JonnyBaggs ปีที่แล้ว

    This guy makes no sense! Is he speaking English? Why does he have a beard? This is insanity! 10/10

    • @NerdCaveYT
      @NerdCaveYT  ปีที่แล้ว

      Take of your jacket right now