Automatic gate

Assembly manual

BUILDING TIME – 20 minutes if you start from the beginning, 10 minutes if you are modyfing another CODEBOX Starter construction.

1. Prepare the parts for distance sensor holder.

2. Put the distance sensor in the holder (pay attention not to damage the net covers of probes, do not press them with your fingers). Attach three distance pieces to the bottom of sensor holder, join it together with two 20mm screws. By now leave the middle hole empty we will use it to attach distance sensor to another element.

3. Prepare the parts to assemble the servo motor.

4. Put the square motor holder (the one with a small indentation) on the bottom of the servo motor.

PAY ATTENTION – tear down the stickers before mounting the servo in the wooden piece

5. Put the seccond square holder on the top of servo motor.

6. Attach the motor to the top side of the main body. Pay attention to direct the motor shaft in the center of the whole piece.

7. Prepare the rest four pieces of the robot body.

8. Assemble four parts of the robot body together. Pay attention to set the side body exactly the same as on the photo (not on the opposite side)

8. Attach previously assemebled piece with a motor to the rest of the robot body.

9. On the side of the body opposite to the motor mount an element to which you will later attach the distance sensor. To screw it put the scredriver through a hole next to the servo motor.

10. Attach the distance servo to the robot body.

11. Start assembling the gate arm. Put the plastic servo horn on a wooden holder.

12. Attach the horn with its holder to the gate arm piece.

13. Mount two LED diodes on the same side as the servo horn with cable connectors directed top while the servo horn is on the left of the LED modules.

14. Attach the gate arm on the motor shaft. Remember to to set the servo motor in it`s middle position before (connect the controller with LOFI Blocks and set servo to 50) so it could move 90 degrees left and right.

15. To mount the arm to the motor shaft use M2 screw (it is smaller than the rest of the screws, you will find few of them in the nuts and bolts pack).

Connections

  • Green LED – OUTPUT3
  • Red LED – OUTPUT4
  • Distance sensor – distance sensor port
  • Servo – OUTPUT1

Automatic gate is finished! CONGRATULATIONS!

Coding

Now lets code our gate to open automatically when the motion sensor detects any object. Click yhe button below to open the lesson on this topic.

Open lesson