Monday, September 24, 2012

Craft Lessons: Making a Towel Ladder

A Towel Ladder is basically a towel rack, it could be used for towels of tea towels, dishcloths  or whatever.

The basic structure is a ladder, it leans against the wall much like any other ladder and you hang towels onto it.

It clearly will not take the weight of a person, this is definitely not a climbing ladder. you'd use a simillar process to make a climbing ladder, but thicker rails, or pre-stressed timber (not roofing baton). and look for a stronger material to make the rungs from.

Anyway.

Start by taking a length of baton that is around 6ft in length (72 inches) mark your first rung 11" from the end, then mark at 10" intervals down the length of the wood, making 6 steps on your ladder.

finally using a 5mm drill make pilot holes in the centre of the ladder rails.


Once your pilot holes have been drilled through the ladder rails, expand the holes with a 25mm flat blade bit, (or auger bit), drill half way through the ladder rail making a cup.



Once you have completed this step turn the rails over and drill from the other side to make the hole go the entire way through the ladder rail. drilling from both sides like this ensures that the outside faces have clean cuts made by the drill bit and that there is minimal splintering.

Take a length of 25mm diameter dowel, and cut into lengths as wide as you wish your ladder to be.
 for a rail holding bath towels you may wish to make the ladder wide so that the towels are not scrunched up ,for a ladder made to hold tea towels you may wish to make the ladder narrow so that you don't loose too much kitchen space.

Coat the inside of the holes in the ladder rail with a PVA wood glue, and insert the rungs into the ladder rails.
to help set the distance it can be handy to use a straight length of wood that your rungs will butt against, then a few spacer blocks to hold the rails away from the straight edge.


Wipe excess glue from the ends of the rungs and wait for the glue to dry.

Finishing is optional, but can include
Natuaral finish, (no finish)
Varnish, wax, paint etc. You should chose the finish most appropriate for your needs.






Monday, September 17, 2012

Electronics Lessons: Making Gates from Gates

The most useful logic component that you'll ever find. -the NAND Gate.

So I've looked at logic gates and said that there are three Basic ones, AND, OR, NOT, that there is also an exclusive OR XOR, and that on top of that there is XNOR and NAND that can be made by adding a not gate to the end of the outputs.

We've had a peek at boolean algebra to show how things can be proven algebraically, and looked at truth tables to give a much more show and tell approach to showing binary states and logical outputs.

So now we'll look at how you can make any logic gate from a NAND gate.

We'll start by looking at the truth table for the NAND Gate

A B | Q
======
0 0 | 1
0 1 | 1
1 0 | 1
1 1 | 0

NOT
So lets start with the simplest functions.

Imagine that we connect both inputs together, so that inputs A and B are both the same,
now we're only concerned with states 0 and 3 on the truth table.

A B | Q
======
0 0 | 1
1 1 | 0

And it's only really a single input,

A | Q
====
0 | 1
1 | 0

Connecting both inputs of the NAND gate has made the NAND gate into a NOT gate.





AND
So how do we make a NAND gate an AND gate

A . B = //(A . B)
A . B = NOT NOT A AND B

yep, we just have the output of a two input NAND gate, connected to both inputs of a second two input NAND gate.






OR

Lets start with a truth table

A B | A + B | /A /B | /(/A . /B)
=======================
0 0 |    0    |  1  1  |    0
0 1 |    1    |  1  0  |    1
1 0 |    1    |  0  1  |    1
1 1 |    1    |  0  0  |    1

So first we make a couple of not gates, just like above, then we feed those to a NAND gate.

XOR
So we have our basic NOT, OR, AND gates all figured out, there is also the NAND gate already given (as that's out basic construction block)

Now we're going to look at XOR

To understand what XOR is I'll put the term into English.

XOR is, A or B, but not A and B

(A + B) . /(A . B)
Let's draw up the truth table for that one.


A B | XOR | OR | NAND | OR AND NAND
================================
0 0 |    0    |  0  |     1    |          0
0 1 |    1    |  1  |     1    |          1
1 0 |    1    |  1  |     1    |          1
1 1 |    0    |  1  |     0    |          0







XNOR

We can create an XNOR gate by adding a not gate to the end of our XOR gate, but Given that the last element is already a NOT gate, (NAND with conjoined inputs) rather than having two not gates back to back we can just remove the not gate already there.


NOR
And of course the NOR gate is just the OR gate with a NOT gate added to the end.


Monday, September 10, 2012

Electronics Lessons: Truth Tables

In the blog post that covered what logic functions there were I drew small tables that listed the input and showed what the output of a system would be.

In the Boolean algebra blog post I proved a weird looking rule with the using a couple of the little tables.

Those tables are called truth tables.

They depict what outputs occur as the conditions of an input.
You can use truth tables to prove logical statements.

Proving DeMorgan Theorem
As ever writing is nothing without context

So as an exercise in truth tables I'm going to look at the two rules of DeMorgan theorem.

These two rules are
/(A + B) = /A . /B
and
/(A. B) = /A + /B

This is easier to do on paper than it is on a computer screen writing in text, but here goes...

First we need to look at how many inputs we have,
We have A and B, so we need two columns.

Our first conditions are

NOT ( A OR B )

So to start with we'll draw the truth table for
A OR B

A B | Q1
=======
0 0 | 0
0 1 | 1
1 0 | 1
1 1 | 1

Then we need to apply the NOT operation to the output Q1
Q1 | /Q1
0 => 1
1 => 0
1 => 0
1 => 0

So we know that the output of the truth table for /(A+B) looks like 1, 0, 0, 0 (for states 0,1,2,3)

Now we'll investigate the truth table for /A . /B

Lets start with A AND B

A B | Q
======
0 0  | 0
0 1  | 0
1 0  | 0
1 0  | 1

But what about NOT A and NOT B

/A /B | Q
1    1  | 1
1    0  | 0
0    1  | 0
0    0  | 0

So we know that the output of the truth table for /A . /B looks like 1, 0, 0, 0 (for states 0,1,2,3)

It's the same.

For a more complex problem it might be better to draw everything out inside a single truth table:

We'll do this to prove Demorgans second rule:
/(A . B) = /A + /B


A B | /A /B | A . B | /(A.B) | /A + /B
===========================
0 0  |  1 1    |    0     |    1      |    1
0 1  |  1 0    |    0     |    1      |    1
1 0  |  0 1    |    0     |    1      |    1
1 1  |  0 0    |    1     |    0      |    0


You see that the last two columns are the the statements used in DeMorgan theorem, and they do indeed prove DeMorgan theorem is correct.


States.
One thing mentioned above was that the states of inputs could be assigned names.

Where you have defined input names that are ordered, A, B, C or In1, In2, In3 you can assign the different states values in accordance with the binary numbering system

A B C = State name
0 0 0 = 0
0 0 1 = 1
0 1 0 = 2
0 1 1 = 3
1 0 0 = 4
1 0 1 = 5
1 1 0 = 6
1 1 1 = 7

Monday, September 03, 2012

Electronics Lessons: Boolean Algebra

There is nothing that would turn a person off a subject more than the mention of algebra.

But, do bear with me.

As with ordinary algebra we'er using letter to represent something, but in this case we're using it to represent states on inputs compared to what ew want our output to be.

I introduced notation in the last post that describes how to write logical expressions.

So lets just straight in.

In real maths we know that 1 + 2 = 2 + 1, both are equal to three.
The same is true in boolean algebra,

1 + 0 = 0 + 1
1 . 0 = 0 . 1

Also it's pretty obvious that if I say A and A, that's just A, if I give you a choice A or A, that's not really a choice.

A . A = A
A + A = A

We can use brackets in boolean algebra just like we do in regular algebra.

That means that:
(A + B) + C = A + (B + C)
(A . B) . C = A . (B . C)

Brackets can be expanded out the same wat that they are in regular maths
So:
A . (B + C) = A . B + A . C
A + (B . C) = (A + B) . (A + C)


Then we have terms that just don't matter.
A + (A . B)
A or A and B.
well in either case for the given output A has to be high and the state of B does not matter.
so:
A + A . B = A
A . (A + B) = A

We use 0 to represent a logic low, and a to represent a logic 1.
0 + A = A
0 . A = 0

1 + A = 1
1 . A = A

/A + A = 1
/A . A = 0


Not only are terms that are the same redundant. (Like A or A)
But terms that have all the same terms, but include a NOT statement are also redundant.

A and B, OR A and NOT B.

A .B + A . /B = A
(A + B) . (A + /B) = A

(A + B) . (A + /B) => A . A + A . /B + A . B + B . /B
B . /B is equal to 0
A . A + A . /B + A . B + B . /B => A + A . /B + A . B + 0
And just as A + 0 = A the same is true of a complex expression.
A + A . /B + A . B + 0 => A + A . /B + A . B
As said earlier A and A or A and NOT B is just as good as saying A
A + A . /B + A . B => A + A => A



Some more rules are:
A + /A . B = A + B

To prove this let's look at a table showing the outputs.
first lets look at /A . B
A => /A B | Q
===========
0 => 1  0 | 0
0 => 1  1 | 1
1 => 0  0 | 0
1 => 0  1 | 0

Now we'll put that into a new table so that we can look at A + /A . B

A Q | Out
=======
0 0 | 0
0 1 | 1
1 0 | 1
1 0 | 1

and compare that to A OR B
A B | Q
======
0 0 | 0
0 1 | 1
1 0 | 1
1 1 | 1

it's the same (weird looking rule proven!)

we also have
A ( /A + B) = A . B

The last two rules are a special set called DeMorgans Theorem.

/(A + B) = /A . /B
and
/(A. B) = /A + /B