Example circuits

This page is to post small, ingame screenshots of concrete parts of circuits that allow for bigger contraptions.

Half door with pistons

For example, let's show the circuit diagram for a half door with pistons:

2011-07-31_16.21.17.png

IMPORTANT: since redstone 1.6.0, this deployment has to be changed. The bare redstone wire connected to the black insulated wire has to be removed from there, and put on the side of the pistons instead, because where they are they will power the uppermost central pistons too, messing the door.

Legend:
Black cable: connects the two side pistons
Raw cable: powers two pistons vertically placed under the blocks where they are. There is also 2 raw cable items that connects a diamond block (with a button you cannot see here) with the toggle block, there is the power input for the activation of the circuit.
Toggle block: takes an activation signal from a button (or other redstone-input device) and closes or opens the gates.
OR gate: takes an instant imput from the toggle and a 0.4 seconds delayed input from the repeater.
AND gate: same as the OR gate, one of the gate's inputs has been disabled by right-clicking the placed block.
Repeater blocks: set for maximun delay, they output to the OR and AND gates, keeping the signal alive for 0.4 extra seconds when the circuit depowers.
The red wool is there to facilitate counting blocks.
The sand blocks act as a frame.

How it works (the starting state is the one we can see in the picture, with the pistons extended and the door closed):
The toggle receives a redstone current input, changing state and unpowering the system. This starts the clock, that will change the state again after the set time (3 seconds is more than enough) expires.
The AND gate loses power inmediately, retracting the pistons in the middle, because it needs both the instant and the delayed input.
0.4 seconds after that, the OR gate loses power, because the repeater kept one of the power feeds working, and the pistons in the sides retract, taking with them the eight blocks in the middle (four pistons and four "covers"), opening the gate.
After that:
The toggle receives redstone current (either from the 3 seconds countdown or an insider the passage input) and changes state, powering the system.
The OR gate powers inmediately because it only needs one input, extending eight pistons pointing inwards (closing the gate)
0.4 seconds after that, the AND gate powers the two pistons pointing to the upper side of the screenshot, becayse it needs both the instant input and the delayed one.

Measurements:
Height: The circuit requires only 1 block, but it extends thre blocks under it. Also please notice that until version 1.6 of RedPower, the plates can't be used to cover anything but cables.
Length: 7 blocks counting the toggle latch. If you want a lever-powered circuit with only one operation point, then it can be reduced to 6
Width: 4 blocks, plus one for the front (so the pistons won't be seen). This leaves a secret passage of 1 block inside if you use it as a secret door in a wall.

Self-resetting circuit

2011-07-31_13.30.57.png2011-07-31_13.32.33.png
Legend:
The blue cable connects the clock to the latch

How it works:
When the toggle block or the RS latch receive power they chang state, depowering the clock and powering whatever circuit is connected to the other side. After the set time has passed, the clock will tick, powering the toggle block or the RS latch and resetting the state to the one it was before.
Note that there is a difference between using the toggle block and the RS latch: the toggle block will accept more than one power pulse, so it can also be manually "reset", while the RS latch won't.

Measurements:
It only needs a 2x1x2 surface, plus the cabling needed to connect the circuit to the activators and the circuit it powers.

Arithmetic Logic Unit

(including Full Carry-Ahead Adder)

external image fp5d8h.jpg
Circuit by CyanAngel

Legend:
Inputs (@ Bottom):
Blue: binary bit A in
Red: bit B in
Gray (right): Carry in

Outputs: (@ Top):
Red: Full adder Sum out
Green: XOR out
Yellow: AND out
Purple: OR out
Gray (left): Carry out

How it works:
A basic maths/logic unit for redstone computers, it will preform all ALU functions in 1 tick, it will require a control system if you wish to combine it with memory cells or a display system.

Dual purpose timer

(flood & autoplant circuit for wheat farms)
Trigger.jpg
Click the lever on the red-light block: the lower of the Clocks #1 starts ticking (set there the amount of time wheat takes to fully grow, plus a few more minutes), and when it makes a full cycle it will change the state of the RS-Latch (not named, but easy to see), allowing the upper clock to start ticking (set enough time here for the water to carry all the wheat and seeds to the collection channel), and stop sending current to the piston (releasing the water for harvesting). Once the upper Clock #1 makes a full cycle, it will re-power the piston (stopping the water) and change the state of the RS-Latch again, allowing the lower clock to start ticking again (the cycle is eternal).
However, this last change activated the Toggle Latch of the left, releasing the leftmost Clock #2 (with enough time set for the water streams to clear the tilled dirt). Once that one makes a full cycle, it will activate the rightmost toggle latch, which will release the clock-and-counter (counter: +1, top 9, -9. Clock: 1 second cycle); each time this clock (rightmost one) completes a full cycle, the green light block will light up.
Finally, the green light block represents the planter from the mod Minefactory Reloaded.

Quick set of timers

I actually did these to automate the pottery working in the Better than Wolves mod, but you can use the same design to make any circuit that includes a "select one and press a button to start".
Circuit.jpg
Legend:
Black Cable: button-powered to start one of the systems.
Green, purple, blue and magenta cables: lever-powered to select one of four options.
Timers: each one is programmed with a different time and connected to a Toggle Latch for self-reset.
AND gates: they start the clocks.
Expansion: any number of of sets can be added, being the limit the amount of colors avaiable for the cables.
Detail of one of the clusters:
circuit_Detail.jpg
How does this work:
First, one of the levers sends a redstone signal, and one of the AND gates gets ready (while it is possible to activate more than one lever at the same time, by doing that we would be getting several redstone pulses but all would be counting from the same instant instead of secuencially); once we push the button, the black cable sends a redstone signal that will change the state of one toggle latch thanks to the AND gate, changing its state to allow the clock one full cycle before resetting itself.
You can find a video showing the circuit here: http://youtu.be/AgWj9qeSKbU?t=7m41s

Registers


4-bit register/latch

register.jpg
This circuit uses transparent latches. The top row is output (read), the bottom row is input (write), and the left signal is write (we take value on input and store it in register and mirror to output). The null arrays can be replaced by bundled cable, if desired.

8-bit shift register with parallel read

shift-register.jpg
Basically just a row of transparent latches. The input bit comes from the left, and upon the signal (must be 1-tick, hence the pulse former) from bottom-left, the register state will get shifted (and it will be reflected in the lamps).

16-bit register from 2 bus transceivers

16bit-register.jpg
This is a very compact 16-bit register utilizing 2 bus transceivers. The top transceiver holds the state, while the other one separates the input/output. The left wire is read signal, the right wire is write signal. You can put any amount of these on the same bundle, and as long as you only read/write a single of these registers, all is fine. A RAM memory array can be built with this circuit.

Arrays


3-to-8 decoder

decoder-3-8.png
This is a basic circuit, which principle is utilized in many array circuits. It decodes a binary number on the left (3 digits in this case) into a single active wire on the bottom (so the 000 configuration on the left corresponds to 00000001 configuration of the output). The array is composed of invert and non-invert cells as follows (I - invert, N - non-invert):
ININININ
IINNIINN
IIIINNNN
The bottom line are inverters, you may use NOR's, since they are probably cheaper.

8-wire multiplexer

multiplexer-8.png
From the 3-to-8 decoder, we can multiplex 8 different inputs (top in the picture) into a single output (bottom), depending on the selection (left).

8-wire demultiplexer

demultiplexer-8.png
And conversely, we can demultiplex a single input (top) into 8 different outputs (bottom), depending on the selection (left).

ROM array

ROM-array-3-2.png
A nice ROM can be built from the decoder. This example is addressed by 3 bits (selected by levers in top 3 left rows), and returns 2 bit wide data (two bottom left wires), in this case it returns a number of one bits (i.e. number of levers turned on). The actual data are stored in combination of null cells (0) and invert cells (1) in the two bottom rows.

Hexadecimal digit display decoder

7-segment-digit-decoder.png
A ROM circuit that can be used to decode a hexadecimal digit to 7-segment display. Of course, no need to use the portion that decodes A-F, if you plan to use decimal numbers only. The array is composed from cells as follows (0 - null cell, N - non-invert cell, I - invert cell):
ININININININININ
IINNIINNIINNIINN
IIIINNNNIIIINNNN
IIIIIIIINNNNNNNN
II0I0IIIIII0II0I
00I00IIII00IIIII
00I0IIIIIIIII0II
0IIII0II0II0II0I
IIIIII0I0I000I0I
II0IIIII0III000I
III0IIII0IIIII00
Wires are assigned to segments as follows:
White - top
Orange - top right
Magenta - bottom right
Light blue - bottom
Yellow - bottom left
Lime - top left
Pink - middle

Applications of state cells

Usually, state cells are used to produce a sequence of signal with exact and easily modified timing.

They can also be used (which is of course silly, as they are more expensive) instead of timer or sequencer gates, as follows:
statecell-timer.jpgstatecell-sequencer.jpg

Parallel to serial signal converter

serializer.jpg
When a signal is applied to the left, a sequence of signals corresponding to the lever settings (bottom parallel wires) will be produced at the top.

Applications of light sensors

Some additional applications, not very practical, of light sensors aside from the obvious "detect daytime" and "night lights". Naturally, these only work in darkness (night or underground). Light sensors can be difficult to set up, as some light always seems to find a way through and there aren't many components in Redpower that would block light (frames, halfblocks, panels and covers all pass light).

Blinking light

blinker.jpg
Using feedback loop (NOR gate) between lamp and light sensor we can cause lamp to blink. Repeater is used to slow down the blink rate.

Telegraph

In theory, light could be used for wireless communication. Here is how to setup a telegraph unit, which will detect incoming light and blinks another light:
telegraph.jpg
The frontal light sensor can be up to 10 blocks away from lamp of another unit. The setup is complicated because we need to prevent a feedback loop from our own lamp, that's what the other sensor is for. And it gets messed up in the morning.

Light navigation

I haven't really tested this, so there is a theoretical idea how to use light sensors for navigation. You can also the standalone telegraph unit as a responder to another light signal, like a beacon (however, in practical applications, it may be neccessary for each beacon to give a unique "signature" signal in response to light pulse):
light-beacon.jpg
Having this set up, you can then have a light sensor array on a moving vehicle, which could be used to fine tune the location of the vehicle with respect to the beacon. Example array on top of my 4-directional platform:
light-navigation.jpg

Detect spawning block with light sensor


With the light sensor you can make automated tree, pumpkin and other farms. When the spawning block (a melon for example) block the source light you can set a system do instantly destroy it.

This is a melon farm using a lamp as a light source.
Melon detector.png
The covered version of the farm, so the sunlight is ignored.
Covered melon detector.png

Frame Controllers


This is a standard compact frame controller, it opens and it closes:
2012-08-30_20.08.59.png
By setting the increments and decrements you can have each side pulse more or less then the other side, useful for some builds.

This is a spam proof frame controller, same thing but with a few more gates:
2012-08-23_14.01.02.png
No matter how many times you hit that button while the logic is going, nothing will happen.

Tree Farm Circuit

This is a semi-advanced circuit used to control my tree farm.

TreeFarmCircuit2.png
What is Does: This circuit, when reset, will Blink Orange+Pink 11 Times, Orange 10 more times, and white once before resetting again. This repeats 10 times, than stops for 1 min before starting again.

If you put it on a tree farm:
White: Plant and Bone Meal Tree.
Orange: Block Breaker Control.
Pink: Sand Deployer and Piston Control.


This is my tree farm that this circuit is connected to:
2013-01-21_20.57.22.png
And here's the monstrocity of the underground tubing and wiring: (FOV is on Quake Pro for this)
2013-01-21_20.57.37.png


I use transposers spaced around the tree to pick up saplings. They are on a separate timer that ticks every one second.

I hope you like this design!