Start by unpacking your Trinket. If you will use a breadboard or Perma-Proto board, you will want to solder on the header pins (provided). See Introducing Trinket on doing this and general information.
Unpack your DS1307 kit. This requires assembly also. Please follow the DS1307 Real Time Clock Breakout Board Kit tutorial on building your clock module.
Trinket can be powered from 3.7 to 16 volts via the BAT+ input and ground. This makes powering the clock very flexible. For this project, I chose the 5V Trinket as the DS1307 board has a 5 volt input which may be connected to the 5V output pin on Trinket. If you use another RTC module that works at 3.3 volts, the Trinket 3V may be used with appropriate changes to the meter calibration. I show powering via DC supply (wall wart). Battery use will vary depending on the batteries you choose. A 9 volt battery will not last very long and is not recommended.
For a 5 volt Trinket and 50 microamp meters, for full scale deflection we need a series resistor on each meter to keep the current less than or equal to the maximum current the meter can handle. Using Ohm's law, R = V / I = 5 / .00005 = 100,000 ohms (100 K). You will need two of these resistors, preferably 5% or better tolerance. These are commonly available from electronics suppliers. If you want precision in calibrating the meter, you may want to substitute each resistor with a 100K potentiometer with a series resistor, perhaps 10 to 47 K. This allows for tuning the resistance. When I designed the project, the 100K resistors gave accurate enough time without needing potentiometers.
Unpack your DS1307 kit. This requires assembly also. Please follow the DS1307 Real Time Clock Breakout Board Kit tutorial on building your clock module.
Trinket can be powered from 3.7 to 16 volts via the BAT+ input and ground. This makes powering the clock very flexible. For this project, I chose the 5V Trinket as the DS1307 board has a 5 volt input which may be connected to the 5V output pin on Trinket. If you use another RTC module that works at 3.3 volts, the Trinket 3V may be used with appropriate changes to the meter calibration. I show powering via DC supply (wall wart). Battery use will vary depending on the batteries you choose. A 9 volt battery will not last very long and is not recommended.
For a 5 volt Trinket and 50 microamp meters, for full scale deflection we need a series resistor on each meter to keep the current less than or equal to the maximum current the meter can handle. Using Ohm's law, R = V / I = 5 / .00005 = 100,000 ohms (100 K). You will need two of these resistors, preferably 5% or better tolerance. These are commonly available from electronics suppliers. If you want precision in calibrating the meter, you may want to substitute each resistor with a 100K potentiometer with a series resistor, perhaps 10 to 47 K. This allows for tuning the resistance. When I designed the project, the 100K resistors gave accurate enough time without needing potentiometers.
Do not directly connect the meter to a source of voltage as it will damage the meter. Use an appropriate series resistor in the circuit to limit the meter current.
Wiring is straightforward. All the pins are used except GPIO #3. I used this pin temporarily to connect to an FTDI Friend. On Trinket you can run a software serial library that transmits only. This was handy in debugging the circuit as it gives you console-like output using only one pin and ground.
The text will show the date and time along with two numbers which represent numbers from 0 to 255 for a pulse width corresponding to the time. Above, 255 shows this is noon, 13 minutes after the hour is 55/255 (not quite 1/4). If you are not getting this type of output on serial, check your connections and code.
Page last edited October 13, 2013
Text editor powered by tinymce.