Go to file
Valentin Ochs 51a95e7ffb USB watchdog, resets, reporting
USB watchdog: Restart if no comms for too long (toggleable)
Resets: Allow various resets to communicate with the bootloader
Reporting: Allow toggling instant reporting of position changes
2021-07-16 21:20:33 +02:00
.gitignore Initial commit 2021-01-31 19:26:40 +01:00
adc.c Working uart bridging 2021-02-13 20:39:00 +01:00
adc.h Working uart bridging 2021-02-13 20:39:00 +01:00
buttons.c Fix button directions 2021-02-19 21:30:47 +01:00
buttons.h Formatting, buttons, printf from musl 2021-02-19 18:01:56 +01:00
encoder.c Add encoder stuff 2021-02-19 21:30:23 +01:00
encoder.h Add encoder stuff 2021-02-19 21:30:23 +01:00
linker.ld Add options for generating UF2 image for bootloader, and set up linker symbol for bootloader config 2021-07-16 21:18:10 +02:00
main.c USB watchdog, resets, reporting 2021-07-16 21:20:33 +02:00
Makefile Add options for generating UF2 image for bootloader, and set up linker symbol for bootloader config 2021-07-16 21:18:10 +02:00
printf.c Fix bug from cleaning out floating point stuff 2021-02-19 21:31:27 +01:00
README.md Initial readme 2021-02-20 17:32:46 +01:00
ringbuffer.c Formatting, buttons, printf from musl 2021-02-19 18:01:56 +01:00
ringbuffer.h Whitespace 2021-02-19 21:31:06 +01:00
stdio_impl.h Formatting, buttons, printf from musl 2021-02-19 18:01:56 +01:00
uart.c Working uart bridging 2021-02-13 20:39:00 +01:00
uart.h Working uart bridging 2021-02-13 20:39:00 +01:00
usb.c Clean up types 2021-02-13 22:16:17 +01:00
usb.h Clean up types 2021-02-13 22:16:17 +01:00

Door Control

A project to interface an electronic door lock actuator by Abus with a PC using an Adafruit Feather STM32F405 Express.

Goals

  • USB-serial converter @ 115200 baud to pass through commands to an external NXP532 NFC controller. This will be used to authenticate people who want to open the door.
  • Readout of the current door state. This is done by connecting to the two outputs of the rotary encoder and integrating the changes.
  • Opening and closing the door by simulating presses of two buttons.

Wiring

TODO. Add pictures and stuff.

Communication

Endpoint 3 is the serial bridge to the NFC controller and should show up as e.g. /dev/serial/by-id/usb-Imaginaerraum.de_DoorControl_433632201350535727003F0-if03 (depending on the ID of the STM32F405).

Endpoint 1 is another serial interface and used for all other functions.

Command characters:

  • 'B': Print the battery voltage
  • 'C': Closes the door
  • 'O': Opens the door
  • 'R': Print the encoder position

Currently, a change in the encoder value will be communicated immediately, as "pos: %d\r\n", the same format returned by the 'R' command.