Close

More about the blocks

A project log for Forklift clock

Four wooden blocks with words tell the time. Every 5 minutes, a forklift changes the blocks to the new time.

roelhroelh 12/27/2019 at 17:480 Comments

There are six different blocks:

  1. Hours, numbers 1 to 4 ( Dutch: een twee drie vier)
  2. Hours, numbers 5 to 8 ( Dutch: vijf zes zeven acht)
  3. Hours, numbers 9 to 12 ( Dutch: negen tien elf twaalf)
  4. Hour or Half-hour (Dutch: uur half)
  5. Before or After (Dutch: voor over)
  6. 5-minutes, 10-minutes, quarter (Dutch: vijf, tien, kwart)

The red arrows shows some places where there are holes in the bricks. The forklift has two infrared LEDs and two detectors to check presence of the holes (at both sides of the brick). Only the lower hole can be detected, the upper hole is used for the other side of the brick.

In the close-up you see the forklift with its infrared detection system:

(The resistors have only a mechanical function, they guide and hold the block to the correct position on the fork.)

When a block is in the lift, it provides a two-bit code with its holes. Only 3 combinations are used for most blocks. The code were both holes are open is used to detect that no block is present on the fork.

The two-bit code can be different for the four sides of the block.

The holes encode the identity of each block (after all sides are examined), and also encode the reference position for each block. With the correct software, the clock will always know which block it handles and which side is shown at the front. Here is the used code:

char word_code[]= { 0,
	2, 0, 0, 0,  // brick 1 2 3 4
	1, 0, 2, 0,  // brick 5 6 7 8
	0, 1, 0, 0,  // brick 9 10 11 12
	1, 0, 0, 2,  // kwart tien vijf blank4
	1, 2, 0, 0,  // over2 voor over voor2
	3, 0, 0, 0,  // half blank6 uur blank6a
	3, 3, 3, 3 };// empty position

The final picture shows the strip that has holes to encode the vertical position of the lift. 

 For each row on the rack, there are two holes:

Discussions