Need help for my project

Hi, I'm pretty much a complete beginner with Arduino, and I am making a project. The idea is that when you press a switch button, the current time gets said through a speaker. What components would I need, and how do I program it all to work?

There are several ways you can do this, but the most realistic approach IMO would be to take any Arduino of your choice, a real time clock (RTC) module, a button, an SD-card/MP3 module ("DFPlayer"), a small power amplifier and a speaker.

Programming it would involve setting up the RTC and programming its time. You may want to devise a way of setting its time without having to use a computer; to this end, you may want to add a few more buttons and a small display. There are convenient and cheap modules with a couple of buttons and a 16x2 LCD.

Then you prerecord (or download from somewhere) a number of audio files for all the numbers you'll need (one through twelve for the hours, 1-10 and twenty, thirty etc. for the minutes) and words like "hours", "minutes" and "pm"/"am" and place them on the SD card in MP3 format. Then, when the button is pressed, you break apart the time into hours and minutes and play each of the associated numbers-files consecutively.

That's the gist of how I'd approach it, but start with a simple project like blinking an LED, then work your way upwards to interfacing an Arduino with a real-time clock module and playing MP3's from an external module etc.

3 Likes

DFplayer Mini can drive a small speaker directly and is quite loud. I used one for a clock which chimes the hour and it can be heard clearly all through the house.

s-l400 (31)

@arduin565 if you use an Arduino compatible board based on ESP chip, you will not need an RTC and no display or buttons to set the time will be needed. The ESP chip can connect to your WiFi and to Network Time Servers on the internet regularly to keep the time correct. It can even deal with daylight savings time if you have that in your country.

A simple ESP-01 module could be used, but a Wemos D1 mini may be easier for a beginner to work with.

1 Like

@arduin565

Another +1 for the DFR Player module.

My version of a similar project delivers spoken details of current, max and min outdoor and indoor temperatures, etc. Time of day is on its LCD 1602 display, but today’s sunrise and sunset times are spoken.

Capitalising on its use of an RTC module, for fun I also added an ‘imminent events’ feature: spoken reminders of birthdays, public holidays, personal anniversaries, etc.

Recording was done to a 32 GB uSD card using GoldWave; alternatives like Audacity are popular.

1 Like

Does it also remind you of rubbish collection day and you have a hole in your shirt? :):

A work colleague of mine did exactly that, using a Raspberry Pi and an Alexa voice assistant. He could never remember whether it was green bin or grey bin collection this week. The RPi scraped the local authority's website using his postal code and then Alexa was somehow able to access that data so it could answer questions about which bin to put out.

wife-e.

Your colleague's code would make a useful, although intrusive, "meds reminder" (any reminder). Just do not try "Alexa... fa.rt 37 times."

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.