User Tools

Site Tools


doorbot

This is an old revision of the document!


Table of Contents

Doorbot

The doorbot is responsible for scanning key fobs and unlocking the door for members. The software is written in Typescript and deployed to a Raspberry Pi. It expects to use the Wiegand protocol for reading fobs.

Implementation of the system is split up into a few repositories:

TODO: add deployment code repository.

There are currently two doorbots. “Edd” takes care of the cleanroom doors, and “Hodor” is in the woodshop. These both check that keys are valid using “Tyrion”, the main server for the member database.

Building a Doorbot

A new doorbot can be built with the following components:

Doorbot Internal Layout

First, make the box by cutting the plywood on a laser cutter using this pattern: https://github.com/bodgery/bodgery-doorbot-ts/blob/master/hardware/bodgery-doorbot-box.svg. Run off all the 3D printed parts (power supply holders, Pi bracket, DB9 bracket). Install Raspbian to the SD card.

Using the brackets, screw down the power supply and Raspberry Pi, as well as the 5V power converter and the fan. The Pi should be placed near the open slot in the back, so you can plug in an Ethernet cable later.

Cut the end off the micro-USB cable, with enough length to run between the Pi and the 5V power converter. Connect the power wire (usually red) to the 5V output, and the ground (black) line to ground. Use hookup wire to connect the 12V output from the power supply to the input of the 5V converter, as well as the ground line.

Connect the 12V line of the molex connector (yellow wire) to the 12V power supply output, as well as the two central ground pins on the connector. Connect this to the fan.

Connect the hot/neutral/ground wires of the power supply to the plug. WARNING: These connections will be handling 120V power. Be sure they are well insulated and appropriately sized.

At this point, you should be able to plugin everything and have the Pi bootup.

DB9 Port

The DB9 port connects the box to the components being controlled. Although it should work as long as you connect up both sides the same, it's best if we keep all the doorbots in the shop the same. Here's the recommended pinout:

  1. +12V
  2. +5V
  3. Wiegand Data 0
  4. Wiegand Data 1
  5. GND
  6. GND
  7. Door Latch
  8. +5V
  9. GND

Wiegand Data 0 should go to the Rasbperry Pi's GPIO 12, and Data 1 should go to GPIO 13. Door Latch should go to the breakout board's MOSFET.

TODO: Instructions on building the breakout board

TODO: Software installation

doorbot.1581370649.txt.gz · Last modified: 2022/05/29 16:01 (external edit)