- v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
- Use this page to report any issues related to the migration.
Difference between revisions of "User:Jjdorf/Logic Gates"
(Added design for a self powered byte of RAM.) |
m (minor edit to BoM) |
||
Line 19: | Line 19: | ||
* Hook the pump up to the signal mechanism. Test with whatever logic is needed if desired. The sensor is finished. | * Hook the pump up to the signal mechanism. Test with whatever logic is needed if desired. The sensor is finished. | ||
===Bill of Materials=== | ===Bill of Materials=== | ||
− | (Excluding the signal source) | + | (Excluding the signal source and pressure plate linkage) |
2 Doors | 2 Doors | ||
1 Mechanism | 1 Mechanism | ||
Line 60: | Line 60: | ||
* Forbid the door on the top layer, Connect to a power source that provides at least 20 + your connector, then stick a fork in it. It's done. | * Forbid the door on the top layer, Connect to a power source that provides at least 20 + your connector, then stick a fork in it. It's done. | ||
===Bill of Materials=== | ===Bill of Materials=== | ||
− | (Excluding power source gear or axle) | + | (Excluding power source gear or axle and hatch source links) |
3-4 Doors | 3-4 Doors | ||
2 Hatch Covers | 2 Hatch Covers | ||
Line 67: | Line 67: | ||
2 Blocks | 2 Blocks | ||
1 Grate | 1 Grate | ||
− | + | 4 Mechanisms | |
===Maintenance=== | ===Maintenance=== | ||
You can adjust the connections of the hatches as well as the pressure plate as needed. Constructing some extra levers, even if on demand, will allow you to easily adjust things. If you build a water drainage system, you won't even have to worry about the excess water in the system when you open the hatch side of the middle layer. Just remember to refill the cell if you had to go in there. | You can adjust the connections of the hatches as well as the pressure plate as needed. Constructing some extra levers, even if on demand, will allow you to easily adjust things. If you build a water drainage system, you won't even have to worry about the excess water in the system when you open the hatch side of the middle layer. Just remember to refill the cell if you had to go in there. | ||
Line 73: | Line 73: | ||
This cell does not have any "circuitry" to disable or enable the output of the cell based on addressing concerns, so if you add this to an addressable memory system, that gearing will be needed. It should be, simply, an addition of another gear before a rotation sensor. | This cell does not have any "circuitry" to disable or enable the output of the cell based on addressing concerns, so if you add this to an addressable memory system, that gearing will be needed. It should be, simply, an addition of another gear before a rotation sensor. | ||
===Pros/Cons=== | ===Pros/Cons=== | ||
− | The most important benefit of this design is the complete lack of evaporation, negating the need for an infinite water supply under routine operation. Not needing an infinite water supply means you can move this to a safely walled off portion of the map, preventing all building destroyers from infiltrating through it. It is also somewhat more compact within a z-level than other designs. Finally, the cell is, fundamentally, only two tiles wide, not considering power hookup. The walls can be shared with adjacent memory cells or other constructions. The drawbacks are twofold: it requires more power to operate, and it requires three z-levels. | + | The most important benefit of this design is the complete lack of evaporation, negating the need for an infinite water supply under routine operation. The water in this cell will never be at less than 3/7 if properly constructed. Not needing an infinite water supply means you can move this to a safely walled off portion of the map, preventing all building destroyers from infiltrating through it. It is also somewhat more compact within a z-level than other designs. Finally, the cell is, fundamentally, only two tiles wide, not considering power hookup. The walls can be shared with adjacent memory cells or other constructions. The drawbacks are twofold: it requires more power to operate, and it requires three z-levels. |
==RAM Byte (Including Power Supply)== | ==RAM Byte (Including Power Supply)== | ||
An extension of the above, with an expanded Dwarven Water Reactor to provide power. | An extension of the above, with an expanded Dwarven Water Reactor to provide power. |
Revision as of 03:54, 23 April 2010
I'll be using this as a spot to keep all my preferred logic designs in one spot. Each design will specify the power requirements, build materials (excluding walls if constructing rather than digging), and build order, including the points when an input or output needs to be hooked up to things. For the most part, I will be using DF2010:Mechanical logic for my basic logic gates.
Buffer/Rotation Sensor
Modified slightly from: DF2010:Mechanical logic
XXX XXX S%>#D . . XXX XXX XXXXXX XXXXXX Xo D Xo D XXXXXX XXXXXX
Both doors (D) are ordinarily forbidden under normal operation. A water drain path is a good idea if maintenance is ever necessary on the bottom floor. The mechanical input (S) provides the power to the pump. Enough power must be available at this point to drive the pump (10 units) when the signal gear or axle is functioning. The pressure plate (o) on the bottom layer is set to 0-3 water level. The screw pump (%>) pumps away from the signal mechanism, towards a floor grate (#).
Building
- First, construct or dig the walls and floors. If constructing, do NOT build floors at the empty space tiles (.), channel the same tiles if digging from the rock.
- Build the pressure plate on the bottom layer, then link it to whatever is needed. Forbid the Bottom level door. Build the grate.
- Build the screw pump, pumping toward the grate and away from the signal line direction.
- Designate a pond at the grate tile, filling the bottom layer full (all four tiles to 7/7 water).
- Hook the pump up to the signal mechanism. Test with whatever logic is needed if desired. The sensor is finished.
Bill of Materials
(Excluding the signal source and pressure plate linkage) 2 Doors 1 Mechanism 1 Corckscrew 1 Pipe Section 1 Block 1 Grate
Inverter
An inverter can be built with identical properties and build sequence by simply changing the pressure plate to trigger on 4-7 water.
Notes
A Rotation sensor can also be considered a simple Buffer. Buffers in actual electronics circuits are often used to increase the number of gates an output signal can be connected to, often by much more than the standard gate output can do. Thus, I consider mechanical logic and fluid logic to be two different types of gates, and you use the gate that is best suited for the specific job. Since fluid logic has a greater fan-out than mechanical logic, the fluid buffer can reset the power needed, since fundamentally, multiple mechanical gates can be connected together without issue until power runs out or you need to use load gear assemblies such as in an XOR or XNOR gate.
TODO
Verify that a signal gear or axle can be placed at (S) and still allow water to be pumped. If this is not possible, adjust the design to put the gear one z-level above the pump, making sure to channel the floor to allow power transfer.
Pros/Cons
The pressure plate requires 100 steps to switch off, but switches on immediately. The sensor is water tight and should not evaporate under normal operation, allowing it to be disconnected from an infinite water source.
RAM
Random Access Memory, basic cell structure:
PXXX XXX H%>#D . .. XXX XXX XXXXXX XXXXXX Do<%HD . XXXXXX XXXXXX XXX XXX MX D X XXX XXX
Each door (D) is a simple access door for internal maintenance. Under normal circumstances, they should be forbidden entirely. The grate (#) is there for completeness and safety when priming the cell with water. If desired it could be omitted. The pumps (%> and <%, pointing the direction of pumping, specifically, the % tile is walkable) are simple constructions, no special qualities. Make them of whatever material is available. The top level hatch (H) is the RESET signal (R). The pressure plate (o) is set to detect only 7-7 water. The middle level hatch is the SET signal (S). The walls (X) can be carved from rock or constructed as needed. Power (P) is supplied through axles or gears. The cell draws 21 units of power when connected with an axle, 25 when using a gear. The output gear of the memory (M) can technically be placed wherever you need it to be.
Building
- The first step is to construct the walls and floor, or carve the same. If constructing, you should NOT build floors in the empty spaces (. on the right floor plan layout). If digging from solid rock, channel open space at those places instead. If constructing, you can build a wall instead of a door on the bottom layer.
- Build all doors, forbidding the bottom most door, the top level hatch and grate and the pressure plate. Build the screw pump on the middle z-level.
- Build the screw pump on the top z-level only after the first pump. Meanwhile, fill the bottom most tile with water by designating a pond on the location the hatch goes in the middle layer. Fill the bottom tile to 7 water, then remove the pond designation.
- Build the hatch on the middle layer.
- Link the pressure plate to the output gear (M). Link the SET and RESET hatches, remembering that the SET hatch turns the memory on, and the CLEAR hatch turns it off. Forbid the doors on the middle layer.
- Fill the middle layer with water from the grate tile on the top layer, until the open spot of the pump and the SET hatch are both covered in 7 water, then remove the pond designation.
- Forbid the door on the top layer, Connect to a power source that provides at least 20 + your connector, then stick a fork in it. It's done.
Bill of Materials
(Excluding power source gear or axle and hatch source links) 3-4 Doors 2 Hatch Covers 2 Corkscrews 2 Pipe Sections 2 Blocks 1 Grate 4 Mechanisms
Maintenance
You can adjust the connections of the hatches as well as the pressure plate as needed. Constructing some extra levers, even if on demand, will allow you to easily adjust things. If you build a water drainage system, you won't even have to worry about the excess water in the system when you open the hatch side of the middle layer. Just remember to refill the cell if you had to go in there.
Notes
This cell does not have any "circuitry" to disable or enable the output of the cell based on addressing concerns, so if you add this to an addressable memory system, that gearing will be needed. It should be, simply, an addition of another gear before a rotation sensor.
Pros/Cons
The most important benefit of this design is the complete lack of evaporation, negating the need for an infinite water supply under routine operation. The water in this cell will never be at less than 3/7 if properly constructed. Not needing an infinite water supply means you can move this to a safely walled off portion of the map, preventing all building destroyers from infiltrating through it. It is also somewhat more compact within a z-level than other designs. Finally, the cell is, fundamentally, only two tiles wide, not considering power hookup. The walls can be shared with adjacent memory cells or other constructions. The drawbacks are twofold: it requires more power to operate, and it requires three z-levels.
RAM Byte (Including Power Supply)
An extension of the above, with an expanded Dwarven Water Reactor to provide power.
XDXDXDXDXDXDXDXDX X#X#X#X#X#X#X#X#X X^X^X^X^X^X^X^X^X * %-%-%-%-%-%-%-%--* H H H H H H H H
XDXDXDXDXDXDXDXDXXXXXXX XHXHXHXHXHXHXHXHXW W WX X%X%X%X%X%X%X%X%XW^W^WX XvXvXvXvXvXvXvXvXW%W%W XoXoXoXoXoXoXoXoX # # XDXDXDXDXDXDXDXDX
XDXDXDXDXDXDXDXDXXXXXXX X X X X X X X X X X X X XXXXXXXXXXXXXXXXX X X X M M M M M M M MX X X X XX X XX XXXXX
Notes
The Water Reactor used here will provide exactly 250 excess power. The memory cells themselves will cost 160, leaving 90 for the power train. The power train consists of two gears and 9 axle tiles, for 19 power, leaving 71 wasted power. The output gears are not considered part of the power train, as they will typically be used in other logic circuits, and will likely need more than 71 power to run whatever they are intended for.