DIY

7-segment NeoPixel clock with countdown timer and remote control

7-segment NeoPixel clock with timer countdown and control from the remote control 7-segment NeoPixel clock with a countdown timer and remote control 7- NeoPixel segment clock with a countdown timer and control from the remote control This article will show you how to make a 7-segment non-pixel clock with a countdown timer. Watches were made for a specific task, namely as a gift to parents. Parents are fitness professionals and often need a timer to keep track of their workout time. There is such a timer on almost every modern smartphone, but using a smartphone during training is not very convenient.
A feature of this watch is:
– 7-segment display showing the current time of day and illuminating the NeoPixel ring in accordance with the current minute of the hour
– An IR sensor that allows the user to adjust the clock/timer settings from the IR remote control
– A countdown timer function that allows the user to set a countdown timer.
– A periodic countdown timer that will loop the timer endlessly with a break entered by the user in between. For example, a HIIT workout that might require a 1-minute timer with a 30-second break between sets.
-A piezo buzzer that beeps when the timer reaches 0. Also provides audible feedback when a button is pressed on the IR remote control.
Let's see some of the clock modes.
Tools and materials: -Arduino Pro Mini 5V; -NeoPixel segments – 4pcs (15 LEDs in each); – 7-segment digital display; – DS3231 RTC module; – PS1240 piezo buzzer;
– 38 kHz IR receiver sensor (from iHome iH9 device);
-IR remote control (from the iHome iH9 device);
-Power adapter 5V 2A; -Transistor 2n2222; -Resistor -1kOhm; -Capacitor -1000 uF; -CR2032 3V battery; -Flexible wire 28AWG; -3D printer (option ); – Acrylic sheet; -Glue E6000; -Black spray paint;
-Printer;
-Glue gun;
-Knife;
-Soldering iron + solder;
-Nippers;
-Scissors;
-Pliers;
-Compass;
-Band saw;
Step one: design, circuit and check the electronics
The idea of ​​assembling such a watch is based on the unique watch design that the master saw on the Internet.
7-segment clock NeoPixel with a countdown timer and remote control The master wanted parents to be able to adjust the clock on distance, so it was decided to use an IR receiver/remote. A piezo buzzer was used as a sounder.
The PDF version of the schematic can be downloaded below.
Exercise_Clock_Schematic.pdf
It should be noted that both the RTC module and the 7-segment display use the I2C protocol. On Arduino Pro Mini, these pins correspond to A4 (SDA) and A5 (SCL). The IR receiver connects to pin 2. The NeoPixel data input can be connected to any digital pin, in this case pin 6. Finally, the piezo buzzer connects to pin 3 and to the base of the 2n2222 transistor to increase the buzzer volume.
7-segment NeoPixel clock with timer countdown and control from the console The wizard started by connecting the components on the breadboard in accordance with the diagram and testing of individual components.
-NeoPixel ring:
The NeoPixel ring comes in 4 segments and needs to be soldered into a ring. It is important not to solder one pair of segment from one end. Solder the free ends of the 3-wire JST to these free pads (to the data, power and ground pins respectively_. These pins will then need to be connected to pin 6, + 5V and GND of the Arduino. Between + 5V and GND, according to Adafruit's recommendations , an electrolytic capacitor of 1000 uF is installed.
Adafruit has a NeoPixel tutorial available on their website. The manual includes basic connections, software installation and examples. After soldering and connecting the NeoPixel to the Arduino, the master uploaded the code according to the instructions and checked the operation of the LED ring.
-IR-receiver/remote control:
We had an old block lying around, which we decided to disassemble. We saved the IR sensor and remote from it and decided to use it for this project. Almost any IR receiver and remote control will work for controlling your watch. The master used an iHome iH9 remote control and IR receiver. The Adafruit website has cheap IR sensors/remotes, as well as sample codes on how to set them up.
For this remote, you first had to define codes for each button press. To do this, the IRsmallDecoder library by Luis Carvalho was loaded into the Arduino IDE and the “HelloNEC” example code was run. This operation produced a unique hexadecimal value for each button press on this remote control.
-7 segment display
There is a tutorial on Adafruit for assembling and connecting a 7 segment display.
-DS3231 Real Time Clock Module
This RTC module already has breadboard matching pins, so it is very easy to connect it to the Arduino for testing. Additionally, the wizard added a CR2032 3V battery.
For testing, he loaded the RTClib library into the Arduino IDE and ran the test code “ds3231” to make sure the component works and shows the current date/time.
7-segment NeoPixel clock with timer countdown and control from the remote control  7-segment NeoPixel clock with countdown timer and remote control 7-segment NeoPixel clock with timer countdown and control from the remote control 7-segment NeoPixel clock with a countdown timer and remote control Step Two: Code
After making sure that the individual components are working as expected, the wizard proceeds to install the main program.
First, you need to install the following libraries:
– Wire.h- Adafruit_GFX.h- Adafruit_LEDBackpack .h- RTClib.h- Adafruit_NeoPixel.h- IRsmallDecoder.h
In the void loop (), in fact, 4 different “pages” were created.
– “Watch home page”
o Shows the current time on a 7-segment display + a dot blinks every second
o The NeoPixel ring lights up, corresponding to the minutes per hour (for example, at 3:10 the first 10 NeoPixel LEDs turn red and the rest remain white)
o When pressing the timer button on the IR remote controller takes you to the “Timer Settings Page.”
– “Timer Settings Page”
o Allows the user to set the countdown timer using the IR remote controller in increments of 05 seconds, 1 minute (s) and/or 10 minute (s).
o Illuminates the NeoPixel ring in accordance with the selected seconds/minutes for aesthetic purposes.
o Pressing the buttons on the IR remote allows you to go to:
– Home button – returns to “ Home clock page”.
– 05 second button – add 05 seconds to the timer
– Button 1 minute – add 1 minute to the timer
– Button 10 minutes – add 10 minutes to timer
– Reset button – resets the timer back to 0
– Clock repeat button – takes the user to the “Break timer settings page”
– Loop button – the colon lights up and signals that the countdown timer is switched to the repeating cycle mode. If disabled, the countdown timer will cycle through one cycle and return to the Clock Home Page.
– Play button – starts the countdown timer by starting a 3-second countdown and taking the user to the “Countdown Timer Page.”
– “Timer Countdown Page”
o Counts down the user preset timer on the display
o Turns off the LED on the NeoPixel ring corresponding to the current second/minute.
o When the timer reaches 0, the user either switches to ” Watch home page “or starts a pause timer depending on whether the loop was enabled by the user.
o Executes a command when pressing the Home button on the IR remote control to stop the timer and return to the Clock Home Page.
– “Timer Interrupt Setup Page”
o Allows the user to set the Interrupt Timer settings, which will work between installations if the cycle option was enabled by the user. It also performs the same functions as on the “Timer Settings Page.”
The wizard has included a user manual that provides instructions on how to set the countdown timer and what each button on the IR remote does when pressed.
Exercise_Clock.inoManual.docx
7-segment NeoPixel clock with a countdown timer and remote control 7-segment NeoPixel clock with a countdown timer and remote control 7- NeoPixel segment clock with a countdown timer and control from the 7-segment NeoPixel clock with a countdown timer and remote control 7- NeoPixel segment clock with a countdown timer and remote control Step three: 3D printing of the case
The printed ring will be used as the base. An acrylic disc is attached to the ring. Numbers will be printed on the acrylic. A separate part is printed for the display and the rest of the electronics.
Print files can be downloaded below.
ClockBack.stlClockFrame.stl
7-segment NeoPixel clock with a countdown timer and remote control 7- NeoPixel segment clock with a countdown timer and control from the 7-segment NeoPixel clock with countdown timer and remote control 7- NeoPixel segment clock with a countdown timer and control from the Step four: installation
Then the master assembles the ring and installs it into the body. Installs arduino, clock module, etc. Pulls and connects according to the wire diagram. Cuts the wire from the power supply and solders it to the Arduino.
7-segment clock NeoPixel with countdown timer and remote control 7-segment NeoPixel clock with a countdown timer and remote control 7- NeoPixel segment clock with a countdown timer and control from the remote control 7-segment NeoPixel clock with timer countdown and control from the remote control  7-segment NeoPixel clock with countdown timer and remote control 7-segment NeoPixel clock with a countdown timer and remote control 7-segment NeoPixel clock with a countdown timer and remote control Step five: acrylic
Next, I cut out a disc 2 cm larger than the LED ring from acrylic. Marked points 12: 3: 6: 9 relative to the ring.
7-segment clock NeoPixel with countdown timer and remote control Then the template was printed. The numbers on the template are cut with a clerical knife. Next, the template is glued to an acrylic disc. All parts that do not need to be painted are closed.
7-segment clock NeoPixel with a countdown timer and remote control 7-segment NeoPixel clock with timer countdown and control from the remote control  7-segment NeoPixel clock with countdown timer and remote control 7-segment NeoPixel clock with a countdown timer and control from the 7-segment NeoPixel clock with countdown timer and remote control 7- NeoPixel segment clock with a countdown timer and control from the remote control Paints the numbers with black spray paint in a few layers.
7-segment NeoPixel clock with timer countdown and control from the remote control  7-segment NeoPixel clock with countdown timer and remote control 7-segment NeoPixel clock with timer countdown and control from the remote control Step six: remote control
In accordance with the new layout some of the buttons on the remote control are not needed. The master printed a new sticker and glued it to the remote control.
7-segment NeoPixel clock with a countdown timer and remote control 7- NeoPixel segment clock with a countdown timer and control from the remote control 7-segment NeoPixel clock with timer countdown and remote control Everything is ready. In the future, the wizard plans to add a function for displaying temperature and date.
[center] 7-segment NeoPixel clock with countdown timer and remote control 7- NeoPixel segment clock with a countdown timer and control from the  7-segment NeoPixel clock with a countdown timer and remote control  7-segment NeoPixel clock with a countdown timer and remote control [/center

Source:

usamodelkina.ru

Show More

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button