EC1515S Instructions for the Use of Electronic Clocks
Because this clock has many functions, please read this manual carefully. Thank you for your cooperation.
Table of Contents
I. Brief Introduction to the Principle of the Clock
The time read by the MCU from the clock chip and the temperature collected by the thermistor are displayed by a digital tube. The parameters displayed during setting are also shown. Sixty light-emitting diodes display the seconds of the clock. The parameters of time and clock are set by keys. The clock chip is powered by backup batteries, so the clock can still run normally after power off without needing to reset the time every time it is powered on. The single-chip computer collects the brightness of the environment through the photoresistor and controls the time when the digital tube turns on and off, thus realizing automatic brightness display. The MCU reads the internal music data, converts it into a frequency signal, and outputs it to the buzzer, allowing music to be played.
II. Introduction of Functions
1. Digital tube display
There are red, green, blue, and white digital tubes to choose from. Users can also switch to other color digital tubes themselves. Power-on defaults to showing time, temperature, year, month, day, and week. Through the button, it can be set to show only time or only time and temperature (set in the "time display settings").
2. LED Display
There are three combinations of red-green LED, red-blue LED, and blue-white LED to choose from. Users can also switch to other color combinations of LEDs. There are 13 kinds of display, which can be switched by keys. It can also be set as automatic switching display (set in "LED automatic switching display settings"). When the switching display parameter x is less than 60, the switching display time is x*1 minute. When it is more than 60, the switching display time is (x-60)*60 minutes. When x=0, the switching display is not automatically switched. For example, when set to 30, it switches to the next display every 30 minutes. When set to 62 (greater than 60), it switches to the next display every (62-60) * 60 minutes (i.e., 2 hours).
3. Clock accuracy
Using DS1302 as the clock chip, it can use the clock auto-calibration function to improve travel time accuracy.
4. Time setting
You can set the time by pressing the button. When the clock chip is properly equipped with backup batteries, even when the clock is powered off, it will run normally without resetting the time every time the power is turned on.
5. Automatic clock calibration
Because this clock is a suite, the clock will inevitably have errors after welding. To maximize the accuracy of the clock, this function is implemented. Clock error can be corrected by setting the error time and error amount. For example, if the clock is 2 seconds faster every 24 hours, then the error time is set to 24, and the error amount is set to -2. If every 24 hours it is 8 seconds slow, the error time can be set to 3, and the error amount is set to 1.
6. Voice output
Uses a passive buzzer to output music.
7. Ringtone download
There are 7 bells built-in when the kit leaves the factory. It can also download bells to the clock itself. It can be set as the alarm for the whole time and the alarm clock. See the bell download tutorial in Part 6 for details.
8. Hourly chime
It can be turned on or off. When it is turned on, it can ring when the current time satisfies the whole time and the alarm time. It can set the alarm time (for example, it can be set from 8 a.m. to 10 p.m. and not at other times).
9. Alarm clock
There are four independent alarm clocks, which can be closed or opened separately. The alarm time, alarm tone, and alarm mode can be set separately. When the alarm clock is turned on and the current time matches the alarm clock's hour, minute, and mode, the alarm will ring. When the loud time exceeds the set loud time or when loud, press the MODE button to stop the loud. Sleeping greedily function: Press the PLUS key when the noise is loud to pause the noise, and then it will resound after five minutes. Six alarm clock modes are available to meet various needs:
- Alarm mode 0: Ordinary alarm clock rings every day.
- Alarm mode 1: Workday alarm clock 1, Monday to Friday ring, Saturday, the day does not ring.
- Alarm mode 2: Weekend alarm clock 1, on Saturdays and Sundays, Monday to Friday no alarm.
- Alarm mode 3: Workday alarm 2, Monday to Saturday, Sunday no alarm.
- Alarm mode 4: Weekend alarm 2, Sunday alarm, Monday to Saturday no alarm.
- Alarm mode 5: A single alarm clock will automatically turn off the alarm clock after one alarm.
10. Temperature display
The ambient temperature is measured by a thermistor. It can be set to Celsius or Fahrenheit display. When the clock is showing temperature, press the MODE key to switch to Fahrenheit or Celsius display. Temperature calibration can be done when the temperature is not correct (set in "Temperature Calibration Settings"). For example, when the display temperature is 3 degrees higher than the actual temperature, set the temperature calibration value to -3.
11. Brightness Adjustment Function
The ambient brightness is measured by a photoresistor. When the automatic brightness function is turned on, the brightness of the clock can be automatically changed with the brightness of the ambient light. When the automatic brightness function is turned off, the clock brightness can be manually adjusted. Whether manual or automatic brightness, there are 100 levels of brightness.
12. 12/24 hours system
The default is the 24-hour system, which can be set to a 12-hour system by keystrokes (set in 12/24 setting mode).
13. Sunday display
It is incorrect to show Sunday as Wednesday 7. The correct display should be '日', but it is increased to accommodate the habits of some people and foreigners who may not know Sunday. When the clock is showing Sunday, press the MODE key to set Sunday to Sunday or Sunday 7.
14. Restore Factory Defaults
Turn off the clock and remove the memory battery. Wait for about two minutes, then turn on the clock.
15. Some possible errors
- Display "Err1": The clock module is not welded properly or incorrectly.
- Display "Err2": Thermistor (temperature measuring circuit) is not well welded or wrongly welded.
- Display "Err3": Photoresistor (photoelectric circuit) has not been welded well or has been welded incorrectly.
III. Introduction of Hardware
Size:
PCB Dimensions: 81mm x 81mm
Assembled Clock Dimensions: 93mm x 93mm x 26mm
Weight:
- The finished product without shell: 47g
- The finished product with housing: 128g
IV. Electrical Performance
- Power supply: DC5V
- Working current: <50mA
- Noise current: <100mA
- Working temperature: 0~40℃
V. Electronic clock display and key function
1. Time Display
Time display mode (power-on default mode) | Display description | MODE Key Function | PLUS Key Function |
---|---|---|---|
There are three display modes: 1. Time, temperature, year, month, day and week. 2. Wheel display of time and temperature. 3. Display time only. | 1. Press and hold MODE for 1 second to enter the time setting mode. 2. Press and hold MODE for 3 seconds to set the alarm clock and alarm clock. 3. Press and hold MODE for 5 seconds to enter the function settings. 4. When displaying Sunday, the display mode of Sunday can be changed. 5. When displaying temperature, it can be switched to Celsius or Fahrenheit. | 1. Lunar temperature, year, month, day, and week. 2. Hold down the MODE key and press the PLUS key to switch the LED display mode. 3. When the alarm rings, enter sleep mode (the alarm clock is suspended and will ring again in 5 minutes). |
2. Time Settings
This setting can modify the time of the clock. If no button is pressed for 10 seconds under each setting, the time display will automatically return to the previous time and the settings will be restored.
Mode | Display description | MODE Key Function | PLUS Key Function |
---|---|---|---|
Year Setting | Four digital tube flashing shows "Year" | Set "Year", long press can quickly set | Long press 1 second into Year Setting |
Month Setting | Front two tube flashing shows "Month", after two tube always shows "Day" | Set "Month", long press can quickly set | Into Month Setting |
Day Setting | Front two tube always shows "Month", after two tube flashing shows "Day" | Set "Day", long press can quickly set | Into Day Setting |
Hour Setting | Front two tube flashing shows "Hour", after two tube always shows "H" when 24-hour system, when 12-hour system shows "A" in am, shows "P" in pm. | Set "Hour", long press can quickly set | Into Hour Setting |
Minute Setting | Front two tube always shows "Hour", after two tube flashing shows "Minute" | Set "Minute", long press can quickly set | Into Minute Setting |
Second Setting | Front two tube always shows "--", after two tube flashing shows "Second" | Set "Second", long press can quickly set | Into Second Setting |
For example, to set the clock to 12:00:00 on January 1, 2019, set the "year" to 2019, the "month" to 1, the "day" to 1, the "time" to 12, the "minute" to 0, and the "second" to 0.
3. Integral alarm and alarm clock setting
Mode | Display description | MODE Key Function | PLUS Key Function |
---|---|---|---|
Hourly chime switch setting | Front two tube always shows "01", after two tube flashing shows "On" or "Off" to express open or close the hourly chime. | Open or close the hourly chime | When hourly chime is turned on, into Hourly Chime Star Time Setting. When hourly chime is turned off, enter alarm clock 1 switch setting. |
Hourly Chime Star Time Setting | Front two tube always shows "02", after two tube flashing shows hourly chime star time. | Set star time (e.g., the start time is set to 8, the end time is set to 22, hourly chime will happen from 8 o'clock to 22 o'clock every day). | Into Hourly Chime End Time Setting |
Hourly Chime End Time Setting | Front 2 bits of digital tube always shows "03", after two tube flashing shows ending time. | Set ending time (e.g., the start time is set to 8, the end time is set to 22, hourly chime will happen from 8 o'clock to 22 o'clock every day). | Enter the hourly chime bell setting |
Hourly chime bell setting | Front 2 bits of digital tube always shows "04", after two tube flashing shows the name of the bell. | Set the bell of Hourly chime. | Enter alarm clock 1 switch setting |
Alarm clock 1 switch setting | Front 2 bits of digital tube always shows "10", after two tube flashing shows "ON" or "OFF" indicates Turn on or off the alarm clock 1. | Turn on or off the alarm clock 1. | When the alarm clock 1 is turned on, enter Alarm clock 1's hour setting. When the alarm clock 1 is turned off, enter the alarm clock 2 switch setting. |
Alarm clock 1's hour setting | Front 2 bits of digital tube always shows "11", after two tube flashing display shows Alarm clock 1's hour. | Set Alarm clock 1's hour. Long press can be set quickly. | Enter the alarm clock 1's minute setting |
Alarm clock 1's minute setting | Front 2 bits of digital tube always shows "12", after two tube flashing display shows Alarm clock 1's minute. | Set alarm clock 1's minute. Long press can be set quickly. | Enter the alarm clock 1's bell rings time length setting |
Alarm clock 1's bell rings time length setting | Front 2 bits of digital tube always shows "13", after two tube flashing display shows alarm clock 1's bell rings time length. | Set the alarm clock 1's bell rings time length. | Enter the alarm clock 1's bell setting |
Alarm clock 1's bell setting | Front 2 bits of digital tube always shows "14", after two tube flashing display shows alarm clock 1's bell name. | Set the alarm clock 1's bell name. | Enter the alarm clock 1's mode setting |
Alarm clock 1's mode setting | Front 2 bits of digital tube always shows "15", after two tube flashing display shows alarm clock 1's mode. | Set the alarm clock 1's mode. | Enter alarm clock 2 switch setting |
Alarm clock 2 switch setting | Front 2 bits of digital tube always shows "20", after two tube flashing display shows "ON" or "OFF", indicates Turn on or off the alarm clock 2. | Turn on or off the alarm clock 2. | When the alarm clock 2 is turned on, enter the alarm clock 2 setting. When the alarm clock 2 is turned off, enter the alarm clock 3 setting. |
Alarm clock 2's hour setting | Front 2 bits of digital tube always shows "21", after two tube flashing display shows Alarm clock 2's hour. | Set Alarm clock 2's hour. Long press can be set quickly. | Enter the alarm clock 2's minute setting |
Alarm clock 2's minute setting | Front 2 bits of digital tube always shows "22", after two tube flashing display shows Alarm clock 2's minute. | Set alarm clock 2's minute. Long press can be set quickly. | Enter the alarm clock 2's bell rings time length setting |
Alarm clock 2's bell rings time length setting | Front 2 bits of digital tube always shows "23", after two tube flashing display shows alarm clock 2's bell rings time length. | Set the alarm clock 2's bell rings time length. | Enter the alarm clock 2's bell setting |
Alarm clock 2's bell setting | Front 2 bits of digital tube always shows "24", after two tube flashing display shows alarm clock 2's bell name. | Set the alarm clock 2's bell name. | Enter the alarm clock 2's mode setting |
Alarm clock 2's mode setting | Front 2 bits of digital tube always shows "25", after two tube flashing display shows alarm clock 2's mode. | Set the alarm clock 2's mode. | Enter alarm clock 3 switch setting |
Alarm clock 3 switch setting | Front 2 bits of digital tube always shows "30", after two tube flashing shows "ON" or "OFF" indicates Turn on or off the alarm clock 3. | Turn on or off the alarm clock 3. | When the alarm clock 3 is turned on, enter the alarm clock 3 setting. When the alarm clock 3 is turned off, enter the alarm clock 4 setting. |
Alarm clock 3's hour setting | Front 2 bits of digital tube always shows "31", after two tube flashing display shows Alarm clock 3's hour. | Set Alarm clock 3's hour. Long press can be set quickly. | Enter the alarm clock 3's minute setting |
Alarm clock 3's minute setting | Front 2 bits of digital tube always shows "32", after two tube flashing display shows Alarm clock 3's minute. | Set alarm clock 3's minute. Long press can be set quickly. | Enter the alarm clock 3's bell rings time length setting |
Alarm clock 3's bell rings time length setting | Front 2 bits of digital tube always shows "33", after two tube flashing display shows alarm clock 3's bell rings time length. | Set the alarm clock 3's bell rings time length. | Enter the alarm clock 3's bell setting |
Alarm clock 3's bell setting | Front 2 bits of digital tube always shows "34", after two tube flashing display shows alarm clock 3's bell name. | Set the alarm clock 3's bell name. | Enter the alarm clock 3's mode setting |
Alarm clock 3's mode setting | Front 2 bits of digital tube always shows "35", after two tube flashing display shows alarm clock 3's mode. | Set the alarm clock 3's mode. | Enter alarm clock 4 switch setting |
Alarm clock 4 switch setting | Front 2 bits of digital tube always shows "40", after two tube flashing shows "ON" or "OFF" indicates Turn on or off the alarm clock 4. | Turn on or off the alarm clock 4. | When the alarm clock 4 is turned on, enter the alarm clock 4 setting. When the alarm clock 4 is turned off, return to time display mode. |
Alarm clock 4's hour setting | Front 2 bits of digital tube always shows "41", after two tube flashing display shows Alarm clock 4's hour. | Set Alarm clock 4's hour. Long press can be set quickly. | Enter the alarm clock 4's minute setting |
Alarm clock 4's minute setting | Front 2 bits of digital tube always shows "42", after two tube flashing display shows Alarm clock 4's minute. | Set alarm clock 4's minute. Long press can be set quickly. | Enter the alarm clock 4's bell rings time length setting |
Alarm clock 4's bell rings time length setting | Front 2 bits of digital tube always shows "43", after two tube flashing display shows alarm clock 4's bell rings time length. | Set the alarm clock 4's bell rings time length. | Enter the alarm clock 4's bell setting |
Alarm clock 4's bell setting | Front 4 bits of digital tube always shows "44", after two tube flashing display shows alarm clock 4's bell name. | Set the alarm clock 4's bell name. | Enter the alarm clock 4's mode setting |
Alarm clock 4's mode setting | Front 2 bits of digital tube always shows "45", after two tube flashing display shows alarm clock 4's mode. | Set the alarm clock 4's mode. | Return to time display mode and save settings. |
4. Function Settings
In each setting mode, if the MODE key is pressed for 3 seconds or 10 seconds without any buttons pressed, the time display mode will be returned automatically and the settings will be saved.
Mode | Display description | MODE Key Function | PLUS Key Function |
---|---|---|---|
Automatic brightness switch setting | Front 2 bits of digital tube always shows "1-", after two tube flashing display shows "ON" or "OFF" to express turn on or off Automatic brightness function. | Turn on or off Automatic brightness function. | When Automatic brightness function is turned off, Enter temperature calibration settings. When Automatic brightness function is turned on, Enter brightness settings. |
Brightness setting | Front 2 bits of digital tube always shows "2-", after two tube flashing display shows Optical control class parameters. | Brightness setting (Range from 01 to 100 and when 100 is shown to be 00). | This feature is not effective until the automatic brightness function is turned off. |
Temperature calibration setting | Front 2 bits of digital tube always shows "4-", after two tube flashing display shows Temperature calibration value. | Setting temperature calibration values. The range is -9 to 10. For example, when the display temperature is 3 degrees higher than the actual temperature, set the calibration value to -3. | Enter 12/24 hour Display setting |
12/24 hour Switch setting | Front 2 bits of digital tube always shows "6-", after two tube flashing display shows 12/24 hours display setting "ON" or "OFF" to express 12 hour or 24 hour display. | Set display mode (3 kinds in total): 0: Display time only. 1: Time, temperature, year, month, day, week display in turn. 2: Time, temperature in turn. | Enter time display mode setting |
Time display mode setting | Front 2 bits of digital tube always shows "7-", after two tube flashing display shows time display mode. | Setting time parameters for LED display modes changes (0 is fixed display). For example, when set to 30, switch to the next display every 30 minutes. | Enter LED auto switch display mode settings |
LED auto switch display mode settings | Front 2 bits of digital tube always shows "8-", after two tube flashing display shows LED Variation time parameter. | When set to 62 (More than 60), every (62-60) * 60 minutes (That is 2 hours) Switch to the next display. (Range: 0~84). | Enter error time setting |
Error time setting | Front 2 bits of digital tube always shows "C-", after two tube flashing shows Clock's error time. | Set error time (range:0~96). For example, the clock speeds up to 2 seconds every 24 hours, then the error time is set to 24, and the error amount is set to -2. | Enter error amount setting |
Error amount setting | Front 2 bits of digital tube always shows "d-", after two tube flashing shows Clock's error amount. | Set error amount (range:-6~6). For example, the clock speeds up to 2 seconds every 24 hours, then the error time is set to 24, and the error amount is set to -2. | Return time display mode and save settings. |
VI. Download function of ringtone
The clock can download a ringtone to the clock by connecting the computer through the serial port. The specific operation is as follows; please follow the order, otherwise the download may not be successful.
1. Tools to be used
Because computers nowadays generally do not have serial ports, it is necessary to prepare a USB to TTL. There are many of them on the market. The following picture shows a type of USB to TTL available in our store.
[Image description: A USB to TTL converter with connected wires.]
2. Serial Communication Software
There are many serial communication software options. Among them, STC official download software STC-ISP has a serial debugging function, so this software is used. The latest software can be downloaded from STC's official website.
The software interface is as follows:
[Image description: Screenshot of the STC-ISP software interface, showing various settings for microcontroller programming and serial communication.]
3. Writing Music
Because the ringtone is stored in the internal storage of the MCU, it is impossible to download a music file directly. Therefore, we need to write music and send it to the MCU. Writing music?! Does it require musical proficiency? You can rest assured that you do not need to be very proficient in music; just follow the simple score to write it.
Because I don't know anything about music, I won't teach you how to read the short music. I need to consult professionals who know the short music. Now, let me tell you how to write music according to the music sheet:
- All characters must be entered in English.
- Numbers on the chart are written directly.
- The underscore below the number on the spectrum represents a half-beat, and an underscore "_" is added after the number when compiling.
- The point above the number on the spectrum indicates an increase of a tone, and a single quotation mark (') is added in front of the number when it is written.
- The point below the number on the spectrum represents a tone reduction, and a point "." is added after the number when it is written.
- There is a "#" sign in front of the number on the notation to indicate a rising half tone, and a "#" sign is added before the number when it is written.
- There is a "-" sign at the back of the number on the spectrum, which means the sound is prolonged by a beat, and a "-" is added after the number when it is written.
- There is a dot "." after the number on the simplified spectrum, which means the sound is extended by half a beat, and it is written with "*".
- Add a space at the end of each note to indicate the end of a note.
- Add "R+" to the front of the music and tell the MCU that it is a bell.
- Write the playing time of each note, for example, 500 milliseconds for each note. Add "25" after "R+" (1 means 20MS, ending with a space).
With these rules, you can basically write a song that is not very complicated. Because there are only 510 bytes of storage space used to store music in the MCU, it cannot store very long music. However, do not underestimate the 510 bytes. Each note takes 2 bytes and can store 255 notes. If each note plays for 500 milliseconds, it can play for 2 minutes, which is also quite long.
Let's practice the following:
[Musical notation for "The Moon Represents My Heart" with accompanying explanations and spectral representations.]
Send the above music to the single-chip computer, and we will teach you how to send it. In addition, some people may ask why other symbols on Jane Pop are not written. These symbols have little effect on the integrity of the whole song, so you do not need to write them in; just write a few basic parameters.
4. Download Music
Firstly, connect the RXD line from USB to TTL to the P31 position on the clock, the TXD line to the P30 position on the clock, and the GND to the GND position on the clock. If the clock needs to be powered by USB to TTL, connect the 5V on the TTL to the 5V position on the clock. It can also be powered by power lines.
Hold down the MODE key and power on the clock. The digital tube shows "A001", indicating that the clock has entered the bell download mode.
[Image description: Digital tube displaying "A001" on the EC1515S clock.]
Press the PLUS key again, and the digital tube will display "A002", indicating that the clock is ready to receive the ringtone.
[Image description: Digital tube displaying "A002" on the EC1515S clock.]
Open the serial communication software, as follows:
[Image description: Screenshot of the serial communication software configuration, showing parameters for connecting to the clock.]
Configure the serial port according to the parameters on the diagram, find the serial port to connect the clock, and open the serial port. Then, copy the compiled music to the sending buffer, and the point sending is OK. After the MCU receives the data, it will play the received music. If you feel that the music is unsatisfactory, you can press the PLUS key (showing "A002") and download the music again.
When the download is completed, the clock will be re-energized, and the clock will enter the normal display state. Choosing the music numbered 7 in the whole time or the alarm bell is the music just downloaded.