How to build a Digital Clock in Minecraft using RedstoneChips

From Redstonechips

(Difference between revisions)
(The Minutes Circuit)
Line 2: Line 2:
-
'''This''' tutorial will show you how to build a digital clock for your Minecraft world. This tutorial requires that you have the RedstoneChips 0.87 or higher plugin installed on your Minecraft server.
+
''This'' tutorial will show you how to build a digital clock for your Minecraft world. This tutorial requires that you have the RedstoneChips 0.87 or higher plugin installed on your Minecraft server.
There are several different types of clocks that you can build. These include 12 and 24 hour clocks, as well as clocks that show the current time in the real-world or the game-world. The construction of each is slightly different, and this tutorial will show you how to build them all.
There are several different types of clocks that you can build. These include 12 and 24 hour clocks, as well as clocks that show the current time in the real-world or the game-world. The construction of each is slightly different, and this tutorial will show you how to build them all.
Line 71: Line 71:
==The Minutes Circuit==
==The Minutes Circuit==
-
The minutes portion of the clock is the almost the same no matter what type of clock you are building. It is simply a Daytime chip and a Driver circuit.
+
The minutes portion of the clock is the almost the same no matter what type of clock you are building. It is simply a ''daytime'' chip and a Driver circuit.
-
Note: Sign location makes a difference. I have tried to show the sign location for each chip in the pictures. Only change the location of the signs if you know what you are doing.
+
'''Note''': Sign location makes a difference. I have tried to show the sign location for each chip in the pictures. Only change the location of the signs if you know what you are doing.
-
To start, build a Daytime chip with 1 input and 6 outputs as shown in the following picture:
+
To start, build a ''daytime'' chip with 1 input and 6 outputs as shown in the following picture:
http://eisental.github.com/RedstoneChips/rcclock-tutorial/rcclocktut1.png
http://eisental.github.com/RedstoneChips/rcclock-tutorial/rcclocktut1.png
-
Make sure you put some redstone on top of the Input Block.
+
Make sure you put some redstone on top of the input block.
-
For a game time clock the Daytime chips sign text should be:
+
For a game time clock the ''daytime'' chip's sign text should be:
<pre>
<pre>
daytime
daytime
Line 97: Line 97:
Now we will build the Driver circuit. Everything from here to the Transmitters is part of the Driver. Keep this in mind because you will have to build another for the Hours, and I’m just gonna refer you back here.
Now we will build the Driver circuit. Everything from here to the Transmitters is part of the Driver. Keep this in mind because you will have to build another for the Hours, and I’m just gonna refer you back here.
-
Start by building a Divider chip with 6 Inputs and 11 Outputs attached to the Daytime circuit. Make sure to put redstone on the top of all of the Dividers Input Blocks. See the picture below for an example:
+
Start by building a ''divider'' chip with 6 Inputs and 11 Outputs attached to the ''daytime'' circuit. Make sure to put redstone on the top of all of the Dividers Input Blocks. See the picture below for an example:
-
+
 
 +
http://eisental.github.com/RedstoneChips/rcclock-tutorial/rcclocktut2.png
The sign text for the Divider should be:
The sign text for the Divider should be:
 +
<pre>
divider
divider
6
6
10
10
mod
mod
 +
</pre>
-
This instructs the Divider chip to expect 6 bits of input, divide the input by 10, output the whole number portion of the result on the first 6 outputs, and the remainder on the remaining outputs. This will format the time into the proper format to be sent to a pair of Segdriver chips for output to your display.
+
This instructs the ''divider'' chip to expect 6 bits of input, divide the input by 10, output the whole number portion of the result on the first 6 outputs, and the remainder on the remaining outputs. This will format the time into the proper format to be sent to a pair of ''segdriver'' chips for output to your display.
-
Now build a pair of Segdriver chips connected to the Divider. Once again, remember to put redstone on all of the Segdrivers Input Blocks. The Segdriver Chips will have 5 inputs, and 7 outputs. Not all of the outputs on the Divider circuit will be used and the first Segdriver input will not be connected to the Divider. See the picture below for an example:
+
Now build a pair of ''segdriver'' chips connected to the ''divider''. Once again, remember to put redstone on all of the ''segdriver'''s input blocks. The ''segdriver'' chips will have 5 inputs, and 7 outputs. Not all of the outputs on the ''divider'' circuit will be used and the first ''segdriver'' input will not be connected to the ''divider''. See the picture below for an example:
   
   
 +
http://eisental.github.com/RedstoneChips/rcclock-tutorial/rcclocktut3.png
 +
The sign text for the Segdriver chips (one per Segdriver, on the left side) should be:
The sign text for the Segdriver chips (one per Segdriver, on the left side) should be:
 +
 +
<pre>
segdriver
segdriver
 +
</pre>
-
The lower Segdriver runs the 10’s digit, and the upper the 1’s digit.
+
The lower ''segdriver'' runs the 10’s digit, and the upper the 1’s digit.
-
The Segdriver chips need a clock generator attached to them, so we will connect them to the same clock generator the Daytime chip uses. To do this we need to build a Repeater chip with 1 input and 2 outputs. Make sure there is redstone on the Input Block.  We will connect this Repeater to the input of the Daytime chip with a bit of redstone:
+
The ''segdriver'' chips need a clock generator attached to them, so we will connect them to the same clock generator the ''daytime'' chip uses. To do this we need to build a ''repeater'' chip with 1 input and 2 outputs. Make sure there is redstone on the input block.  We will connect this repeater to the input of the daytime chip with a bit of redstone:
   
   
 +
http://eisental.github.com/RedstoneChips/rcclock-tutorial/rcclocktut4.png
-
Now we will add a pair of Transmitter chips. These chips will wirelessly send the digits to your display. These chips will each have 8 inputs, and no outputs. Put Redstone dust on all Input Blocks:
+
Now we will add a pair of ''transmitter'' chips. These chips will wirelessly send the digits to your display. These chips will each have 8 inputs, and no outputs. Put redstone dust on all input blocks:
-
+
 
-
You will need to choose names for the Transmitters. I chose “Min10” for the lower Transmitter, and “Min1” for the upper.
+
http://eisental.github.com/RedstoneChips/rcclock-tutorial/rcclocktut5.png
-
Using these names, the sign for the upper Transmitter chip should be:
+
 
 +
You will need to choose names for the ''transmitters''. I chose “Min10” for the lower ''transmitter'', and “Min1” for the upper.
 +
Using these names, the sign for the upper ''transmitter'' chip should be:
 +
<pre>
transmitter
transmitter
Min1
Min1
 +
</pre>
And for the lower:
And for the lower:
 +
<pre>
transmitter
transmitter
Min10
Min10
 +
</pre>
-
The Transmitters also need a clock generator, so once again we will just connect the existing one to the Transmitters. I used Glowstone to build the connection to the upper one, but you can use any block:
+
The ''transmitters'' also need a clock generator, so once again we will just connect the existing one to the ''transmitters''. I used glowstone to build the connection to the upper one, but you can use any block:
   
   
 +
http://eisental.github.com/RedstoneChips/rcclock-tutorial/rcclocktut6.png
 +
That’s it for the Driver circuit. The minutes circuitry is complete. If you want to test it out, you will need to build the minutes portion of the Display and a clock generator. You can find the details for these below, or you can continue on to the hours circuit.
That’s it for the Driver circuit. The minutes circuitry is complete. If you want to test it out, you will need to build the minutes portion of the Display and a clock generator. You can find the details for these below, or you can continue on to the hours circuit.
==Hours Circuit==
==Hours Circuit==
 +
I’m going to show you the hours circuit a little differently, because what you will need to do depends on what type of clock you are building.
I’m going to show you the hours circuit a little differently, because what you will need to do depends on what type of clock you are building.

Revision as of 18:36, 10 April 2011

by Mordenkainen


This tutorial will show you how to build a digital clock for your Minecraft world. This tutorial requires that you have the RedstoneChips 0.87 or higher plugin installed on your Minecraft server.

There are several different types of clocks that you can build. These include 12 and 24 hour clocks, as well as clocks that show the current time in the real-world or the game-world. The construction of each is slightly different, and this tutorial will show you how to build them all.

Contents

Materials

Before you start make sure you have the following:

  • The block type you are using as a chip material. I will be using Sand Stone in this tutorial, but you can use whatever you want as long as it is not the same as what your server has configured for Input Blocks, Output Blocks, or Interface Blocks.
  • Iron Blocks (Or whatever your server has configured for Input Blocks)
  • Gold Blocks (Or whatever your server has configured for Output Blocks)
  • Lapis Lazuli Blocks (Or whatever your server has configured for Interface Blocks)
  • Levers
  • Redstone Dust
  • Signs
  • Some other block type. In the pictures for this tutorial, I have used Glow Stone.

The Components

The clocks circuitry can be broken down into a series of components. Different combinations of components can be used to create the different types of clocks. The main components you may need to build are:

  • Clock generator: This is a simple circuit that generates a short pulse at least once a second. This pulse will be used to tell the other components that there is work to be done.
  • Daytime chip: This is the time source for the other components. The exact output of the Daytime chip is determined by the sign attached to it. The clock will require two Daytime chips, one for minutes, and one for hours.
  • Driver circuit: The driver circuit takes the time value, converts it to the proper format for a 7-segment display (like those on a digital clock), and transmits the signal wirelessly.
  • Offset corrector: Time in Minecraft does not directly align with time in the real world. In the real world, 0:00 is 12:00AM. In Minecraft 0:00 is 8:00AM. The offset corrector fixes this by making 0:00 = 12:00AM. This is not needed if your clock is going to be displaying the time in the real-world.
  • 12 hour formatter: This is used to convert 24 hour “Military time” to the 12 hour “AM/PM” format. This is not needed if you are making a 24 hour clock. It also provides the signal needed to tell if the time is AM or PM.
  • Blinker: Used to display the blinking “:” between hours and minutes on the clock. It may be omitted if the divider is not desired.
  • Display: This is the display the time will be sent to. The construction of the display will vary slightly depending on the type of clock you are building.

The Clocks

Several different types of clocks are possible, and each requires different components. The different types and the components required for them are:

  • 24 Hour Real-World
    The simplest clock, it displays the time in the real world reported by the Minecraft server in a 24 hour format. It requires:
    • 1 Clock generator
    • 2 Daytime chips
    • 2 Drivers
    • 1 Blinker (optional)
    • Display
  • 12 Hour Real-World
    This clock displays the time in the real world reported by the Minecraft server in a 12 hour format. It requires:
    • 1 Clock generator
    • 2 Daytime chips
    • 1 12 hour formatter
    • 2 Drivers
    • 1 Blinker (optional)
    • Display
  • 24 Hour Game time
    This clock displays the time in the game world in a 24 hour format. It requires:
    • 1 Clock generator
    • 2 Daytime chips
    • 1 Offset adjuster
    • 2 Drivers
    • 1 Blinker (optional)
    • Display
  • 12 Hour Game time
    This is the most complex clock. It displays the time in the game world in a 12 hour format. It requires:
    • 1 Clock generator
    • 2 Daytime chips
    • 1 Offset adjuster
    • 1 12 hour formatter
    • 2 Drivers
    • 1 Blinker (optional)
    • Display

The Minutes Circuit

The minutes portion of the clock is the almost the same no matter what type of clock you are building. It is simply a daytime chip and a Driver circuit.

Note: Sign location makes a difference. I have tried to show the sign location for each chip in the pictures. Only change the location of the signs if you know what you are doing.

To start, build a daytime chip with 1 input and 6 outputs as shown in the following picture:

rcclocktut1.png

Make sure you put some redstone on top of the input block.

For a game time clock the daytime chip's sign text should be:

daytime
gametime
minute

And for a real time clock:

daytime
earthtime
minute

Now we will build the Driver circuit. Everything from here to the Transmitters is part of the Driver. Keep this in mind because you will have to build another for the Hours, and I’m just gonna refer you back here.

Start by building a divider chip with 6 Inputs and 11 Outputs attached to the daytime circuit. Make sure to put redstone on the top of all of the Dividers Input Blocks. See the picture below for an example:

rcclocktut2.png

The sign text for the Divider should be:

divider
6
10
mod

This instructs the divider chip to expect 6 bits of input, divide the input by 10, output the whole number portion of the result on the first 6 outputs, and the remainder on the remaining outputs. This will format the time into the proper format to be sent to a pair of segdriver chips for output to your display.

Now build a pair of segdriver chips connected to the divider. Once again, remember to put redstone on all of the segdriver's input blocks. The segdriver chips will have 5 inputs, and 7 outputs. Not all of the outputs on the divider circuit will be used and the first segdriver input will not be connected to the divider. See the picture below for an example:

rcclocktut3.png

The sign text for the Segdriver chips (one per Segdriver, on the left side) should be:

segdriver

The lower segdriver runs the 10’s digit, and the upper the 1’s digit.

The segdriver chips need a clock generator attached to them, so we will connect them to the same clock generator the daytime chip uses. To do this we need to build a repeater chip with 1 input and 2 outputs. Make sure there is redstone on the input block. We will connect this repeater to the input of the daytime chip with a bit of redstone:

rcclocktut4.png

Now we will add a pair of transmitter chips. These chips will wirelessly send the digits to your display. These chips will each have 8 inputs, and no outputs. Put redstone dust on all input blocks:

rcclocktut5.png

You will need to choose names for the transmitters. I chose “Min10” for the lower transmitter, and “Min1” for the upper. Using these names, the sign for the upper transmitter chip should be:

transmitter
Min1

And for the lower:

transmitter
Min10

The transmitters also need a clock generator, so once again we will just connect the existing one to the transmitters. I used glowstone to build the connection to the upper one, but you can use any block:

rcclocktut6.png

That’s it for the Driver circuit. The minutes circuitry is complete. If you want to test it out, you will need to build the minutes portion of the Display and a clock generator. You can find the details for these below, or you can continue on to the hours circuit.

Hours Circuit

I’m going to show you the hours circuit a little differently, because what you will need to do depends on what type of clock you are building.

I will show you each of the components. These are constructed so that they can be attached to each other easily. Different combinations of these components are needed for the different clocks.

First, an overview of how the components are connected together for each clock type:

  • 24 Hour Real-World
    Daytime -> Driver
  • 12 Hour Real-World
    Daytime -> 12 hour formatter -> Driver
  • 24 Hour Game time
    Daytime -> Offset corrector -> Driver
  • 12 Hour Game time
    Daytime -> Offset corrector -> 12 hour formatter -> Driver

So that the minute and hour circuits can share a clock generator, the chips are run in the opposite directions. In the minute circuit above, the first bit was always on the left if you were facing the chip, for the hours circuit the first bit will be on the right. The driver circuit will be a mirror image of the one for minutes. Also, the hours circuit only uses 5 bits instead of 6, so when building the Driver circuit for it, the Divider chip only needs 5 inputs instead of 6 and only 9 outputs (5 on the bottom and 4 on the top).

Start by building the Daytime chip. The Input Block of this chip should be placed about 8 blocks to the left of the Input Block of the minute Daytime chip. This will give you space to put the clock generator between them:

The sign for this chip is the same as the one for the minute chip, except the last line will be “hour” instead of minute.

Now I will show how to build each of the components, connect them together in the order shown above for the clock type you are building.

Offset adjuster

The offset adjuster works by adding 8 hours to the time, then using modulus division to “wrap” the time back into the 0-23 range if it’s out of bounds.

Start by building an Adder chip, with 5 inputs and 5 outputs. All Input blocks should have redstone on top of them. This Adder should be connected to the Daytime chip, since when used it is always the first component.

The sign for this adder should be:

adder 5 8

Now build a Divider chip, with 5 inputs and 10 outputs. Make sure all Input Blocks have redstone on them:

The sign on this chip should say:

divider 5 24 Mod

The bottom Output Blocks of the Divider are the outputs to the next component, the upper outputs are not used.

12 hour formatter

The 12 hour formatter works by using modulus division to “wrap” the time around into a 0-11 range, then adding 12 if the result is 0 to put it in a 1-12 range. It also provides the AM/PM state.

In the below pictures, I have built it attached to the Offset adjuster, but depending on your clock, it may be directly connected to the Daytime.

Start by building 5 Repeater chips, each with 2 outputs. Remember to put redstone on all the Input Blocks. This component should be built so that these Input Blocks are touching the Output Blocks of the previous component:


Now build a Divider chip, with 5 inputs and 10 outputs. All Input Blocks should have redstone on them:

The sign on this chip should say: divider 5 12 mod

Build a set of 5 Repeaters with 1 input and 2 outputs attached to the divider. Make sure all Input Blocks have redstone on them:


Now build an NOR chip attached to the Repeaters. This NOR will have 5 inputs and 1 outputs. Make sure to put redstone on all the inputs:

The Sign for the NOR should be: nor

Now build an Adder with 10 inputs and 5 outputs attached to the NOR. Not all the Input Blocks will have redstone on them, also a block will be placed between two of the Adder’s inputs. I used Glowstone, but you can use whatever you would like. See the picture for redstone and block locations:


Now connect the upper outputs of the short Repeaters to the Adder:


Now build Comparator attached to the upper outputs of the tall Repeaters, making sure to put redstone on all the inputs:

The sign on this chip should say: comparator 11

Now build a transmitter attached to the leftmost output of the Comparator:

The sign on this chip should say: transmitter AMPM

Driver

The driver is built in almost the same way as with the minute circuit. Instead of a 6 bit input, it only requires a 5 bit input, it is built as a mirror image of the minute Driver, and the Transmitters must have different names, for example I used “Hour1” and “Hour10”. Also, the Repeater used to bring the clock generator to the Segdriver and Transmitter chips must be adjusted based on what components you used. I’ll leave this up to you, it isn’t all that hard to figure out.

One other note is that if building a 12 hour clock, the 10’s digit of the hour can only be “1” or “0”. Because of this, the Driver on a 12 hour clock does not need a lower Segdriver, and only requires a single bit transmitter as shown in the picture below. When done this way, the hours section of the Display needs to be built a little differently but has the advantage of not displaying a leading “0” for single digit hours (For example “2:00” instead of “02:00”). <IMG>

Here is an image of a 12 hour, game time, hour circuit with the individual components marked.


The Blinker

The blinker is an optional part that adds the little blinking “:” between hours and minutes. If you want it, you need to add a transmitter to any clock generator line. A good place is where the minute Segdriver clock connects, as shown below:

The blinker sign should be: transmitter Blinker

The Clock Generator

For the clock generator I used a simple 5-clock placed in between the minute and hour circuits. You can use any method to generate a clock signal, such as the RedstoneChips Clock chip. Below is a picture of the clock generator I used:


The Display

The Display can be made of any material, but the actual digits must be made of wool. You will need to choose the colors you want for the Display, I will refer to them as “color-off” and “color-on”, ideally they should be chosen to blend in with the background of the display when off. Below is a picture of the front and back of the minutes portion of a Display. Front:

Back:
At the edge you can also see the Blinker. This can be omitted if desired.

Blinker Sign: pixel Color-off color-on Blinker

The signs for the digits are in the format: pixel Color-off color-on MinXX:Y

Where MinXX is “Min1” for the ones digit, and “Min10” for the 10’s digit. The Y is a number starting at 0, and counting up to 6 starting at the top segment of the display and going counter-clockwise ending in the middle, looking at the back of the display. So, for the minutes 10’s digit, the top segment would be Min10:0, the bottom segment would be Min10:3, and the middle segment would be Min10:6. Of course color-on and color-off are the colors you have chosen for your Display

For a 24 hour Display, the hours section is constructed in the same way:

And the signs: pixel Color-off color-on HourXX:Y

12 hour Displays are a little more complicated, Pictures of a 12 hour display are below: Front:

Back:

As you can see it has an additional section after the minutes to display AM/PM and the hours section only has a partial 10’s digit. (Yes, I know I haven’t put text on the signs yet!)

The sign for the AM/PM indicator is: pixel Color-on Color-off AMPM

The sign for the hours 10’s digit: pixel Color-off color-on Hour10

Everything else is the same.

Personal tools