My original intention in building this board was to create an Mp3 alarm clock using a Ds3231, a matrix display and a Df Mp3 player. I did some experimentation with the Df player but my project stalled when I found that while the random play function did shuffle the songs it played the same shuffle each time :(
Subsequently I have used this board to try out other clock designs that I have come across so I present this project for that purpose.
Hardware:The hardware consists of an Arduino Nano a Ds3231 clock module and connectors which allow the connection of a single, or multiple, Maxx7219 module(s) or an LCD display using an I2C backpack.
The board:The circuit is built on a piece of stripboard the components consist of 4 sockets for the Nano, Maxx7219 and Ds3231 plus a pin strip for the LCD I2C connection and another as an alternative to the Maxx7219 socket.
Note that the 4 pin plug at the front of the board is a hangover from my Df player experiments, it and its wiring should be omitted.
Software:I have included 3 primitive clock implementations:
- a binary clock using a single Maxx7219
- a clock using a quad Maxx7219 display
- a clock using an LCD via the I2C interface
As I stated, after my own project stalled I ended up using my board more to try out other clock designs which I found on the project hub.
Some designs are easy to port, and some are not, for example:
https://create.arduino.cc/projecthub/mircemk/diy-word-clock-on-single-max7219-driven-8x8-matrix-8379ed?ref=platform&ref_id=424_recent___&offset=3 by Mirko Pavleski just required the downloading of the required libraries, compiling and programming the Nano. (You do need to tip the Maxx7219 on its side though!)
As a more involved example take the Four stroke clock by Lagsilva: https://create.arduino.cc/projecthub/lagsilva/4-stroke-digital-clock-with-arduino-ec4d50?ref=search&ref_id=four%20stroke%20clock&offset=0
The matrix display is wired differently so I altered the LedControl initializer to my wiring.
The circuit originally uses a Ds1307 which communicates via I2C like the Ds3231.
I try a standard replacement library but find the Ds1307 one used non standard function names.
I look up the library on github and, fortunately, the library author has a variant for the Ds3232 which states it is compatible with the Ds3231 so I download and install that.
I alter the Ds1307 #include so that it imports the library for the Ds3232.
I get an error on #import <Time.h> so I comment this line out as the next line imports <TimeLib.h>.
I compile the code and send it to the Arduino; the time shows up and animates but is rotated to the horizontal on my display.
I save a copy of the standard LedControl.cpp file to a different location then modify the one in Arduino->libraries->LedControler->src so that it rotates the coordinates 90 degrees counter clockwise.
Success!
Edit: Forgot to say I also coded in RPM=10; just after the analogRead which sets the animation rate.
Comments
Please log in or sign up to comment.