Before any soldering or programming happens at all, I’ll need to have a general idea of what connects where.
This post presents the schematic for the Secret Santa Clock and a quick explanation of each “module” of the system. Everything from a bird’s-eye perspective that is enough for you to reproduce it.
Created with xcircuit. I may write a post about it in the near future
- 500 Ohm resistors. x3
- Pushbuttons. x3
- Arduino Nano. x1
- Tiny RTC. x1
- Max7219 led matrix. x4
- 5pin connector. x1
The buttons are active-high with a pull down resistor. When the button is unpressed (open) there is no connection from the
MCU (µController unit) to
V+, so the Arduino pin reads low (connects directly to ground).
Once you press the button, the pin connects to
V+, value 1 for Arduino.
There are 3 buttons to drive, that means 3 pins on the Arduino.
The RTC we use is the Tiny RTC. This module has various pins with different functionality, but I’ll just connect it to get the calendar data. The RTC sends the information via I2C protocol, and for this, the nano has two analog pins (
Just wire the 4 pins accordingly:
VIN– Voltage In
SDA– Serial Data Line
SCL– Serial Clock Line
MAX7219 led Matrices
The 4 led matrices are daisy chained together. The only thing to take into account is that the
Dout of Matrix 0 has to be connected to
Din of Matrix 1, Matrix 2 to Matrix 3 etc.. The following daisy chain schematic is extracted directly from the MAX7219 datasheet. For the clock it’s exacly the same but with 4 MAX7219 drivers.
The module that I have has the led matrix and the MAX7219 already wired, leaving only the
VIN,GND,DIN,CS,CLK pins exposed. Since this may be positioned in a different board than the clock, I will wire this pins to a connector (this is not represented in the schematic since it’s more a build decision).
VIN– Voltage In
DIN– Data In
CS– Chip Select
Arduino has SPI support with
D10,D11,D12 pins :
MOSI (Master Output Slave Input) ,
MISO (Master Input Slave Output) and
SS (Slave Select)
As you can see the system is quite simple, there is not a lot of wiring to be done and the tidyness of it will only depend on your soldering ability. (Mine is low, so it will probably become a mess :-D)