These are day/night sensors. They switch a redstone signal on and off at dawn and sunset. There are currently five models: Pico (1x), Nano (1x), 7x, 12x, and 14x. The 12x is the newest model and the one I recommend for compact and reliable day/night detection.
The Pico and Nano use a single grass block to detect the outdoor light level. They have 23 grass source blocks, just under the maximum possible of 25.The Pico is a bit smaller than the Nano, but requires an ice block. They use the same basic mechanism as but they are considerably more compact. They are very easy to build, but slow to react. They can easily take a couple of minutes to detect daybreak. The Pico is, IMHO, the smallest practical light sensor in existence right now. You can't get any smaller without sacrificing source blocks, which will slow the machine down a lot.
The larger models use 7, 12, and 14 grass blocks respectively to detect light and they will react roughly that many times faster than the small machines. At the same time, they are much more compact than simply chaining 1x sensors together. The 12x and 14x models typically react within seconds. They usually notice the sun rising before I do.
These machines can be tricky to build, even from instructions. Getting the smallest detail wrong can make them not work. If you're having trouble, describe the problem here, prefereably with some screenshots, and I'll help you figure out what's wrong.
Light Sensor Pico (3x5x3)
Light Sensor Nano (3x6x4)
Light Sensor 12x (18x6x8)
Video Tutorial
Light Sensor 7x (12x5x11)
Video Tutorial
Build Instructions (revision 2, for all versions of Minecraft)
Each successive image below adds strictly one layer to the machine. Click each image for a larger version. To avoid problems, examine the images carefully and make sure you put every block in just the right place.
Once finished, the machine needs to be in day mode (filled with water) for a few minutes to kill off some of the day detector blocks. If you finish the machine at night, sleep in a bed and if the machine isn't filled with water, flip it to day mode manually.
Light Sensor 14x (12x5x20)
Build Instructions (revision 2, for all versions of Minecraft)
NOTE: in Minecraft 1.2, replace all the glass with leaves
Each successive image below adds strictly one layer to the machine. Click each image for a larger version. To avoid problems, examine the images carefully and make sure you put every block in just the right place.
Once finished, the machine needs to be in day mode (filled with water) for a few minutes to kill off some of the day detector blocks. If you finish the machine at night, sleep in a bed and if the machine isn't filled with water, flip it to day mode manually.
Troubleshooting
If your machine doesn't work, look for the following:
- Repeaters set to the wrong delay
- Missing/misplaced redstone dust or torches
- Missing blocks that could allow light to leak into the machine
- External light sources reaching the window
- Obstructions between the window and sky
- Grass where there shouldn't be
- No grass where there should be
- Chupacabras
Note: up to Beta 1.8, Minecraft had a "sticky light" bug that affected this machine, but the bug is fixed in Minecraft 1.0
Schematics
Light Sensor Nano
Light Sensor Nano (underground)
Light Sensor 7x
Light Sensor 14x
(schematics for the newer models coming.. uh.. soon)
So, how does it work?
The nano/pico models use a single block of grass/dirt to detect light. During the day, the grass block is under water/ice, causing it to die as soon as it gets dark. This is detected by a T-BUD switch and the sensor block, which is now dirt, is moved out of the water/ice. It will stay dirt until morning when there is enough light for grass to grow on it. This is again detected by the T-BUD and the grass block is moved back under the water/ice.
The 7x, 12x, and 14x models actually contain two rows of sensor blocks: the one directly under the window detects nightfall, and the one on the other side detects daybreak. The night sensor has 7/12/14 grass blocks. When one of them dies, it switches the machine to night mode. It then spends the night regrowing grass on the block that died, and any others that might have died somehow. Meanwhile, the day sensor waits for one of its 7/12/14 dirt blocks to grow grass. When that happens, it switches the machine to day mode and spends the day killing off any grass that grew.
Each sensor spends half the day waiting and the other half resetting itself. If one of them doesn't fully reset, for whatever reason, the machine is just less sensitive for that cycle, and it will fix itself for the next cycle. For the machine to break, all blocks on one side would have to grow/die before any of them could be killed off/regrow.
But how exactly do the 7x/12x/14x sensors work???
Ok, but first a quick review of the light/grass rules:
- Sunlight is level 15 (or 10 during a storm), moonlight is level 4, torches are level 14
- Light decays by one level for every step up, down, or sideways.
- Light decays by an additional two levels for every water or ice block it passes through. The height of the water doesn't matter.
- Light from the sky doesn't start to decay until it hits the first block that isn't fully transparent.
- Grass can spread one block up, one block sideways, and three blocks down.
- Grass can spread to a dirt block only if there is light 9+ above the grass block, light 4+ above the dirt block, and the block above the dirt does not decay light by more than 1.
- Grass can die if there is light 3 or less above it and the block above it decays light by more than one.
So, the inside of the machine is light-proof, except for the window on top. During the day, both sensors are covered by a layer of water. The night sensor is directly under the window, so there is only one water block between the sensor and the sky. That means it gets light level 15-3=12 during the day (or 7 during a storm), which is not dark enough to kill it. At night, it only gets light level 4-3=1 and one of the blocks soon dies, triggering the switch to night mode. The day sensor is shifted 3 blocks away from the window, so skylight has to go through 4 water blocks to get to it. Even in daylight, it only gets light level 15-3-3-3-3=3 and so all the blocks die.
At night, the water shuts off. Now the night sensor is getting light 4 from the moon, which is just enough for it to regrow. The grass is spreading from the surrounding grass blocks, which are getting at least light 9 from the torches. The day sensor is still 3 blocks away from skylight, so it only gets light level 1 during the night, but when day comes it goes up to 12 and one of the dirt blocks quickly grows grass and switches the machine to day mode.
Infographic
This is a cross-section of the 7x and 14x models, looking down the length of the machine. The night detector block is on the left and the day detector is on the right. The numbers represent the light level at that block.
XBox360 Version
DewRadley explains how to make the 12x work on the XBox version of Minecraft, with a few small modifications:
http://www.minecraft...aynight-sensor/
3
1
1