digital clapperboard (using STM32F103 micro-controller, 7-segment displays, buttons, piezo-buzzer, shake switch)
Go to file
King Kévin 7edfe7b275 enable shutdown again 2017-05-18 01:20:43 +02:00
lib ds1307: fix read/write lenght 2017-05-17 18:51:55 +02:00
libopencm3@ad5ec6af08 add libopencm3 and STM32duino-bootloader submodules dependencies 2016-01-15 15:36:00 +01:00
.gitignore ignore generated documentation 2016-08-14 19:26:46 +02:00
.gitmodules remove STM32duino-bootloader 2016-08-14 19:03:17 +02:00
Doxyfile add changes from spark abacus project 2016-10-23 17:42:27 +02:00
Makefile fix: use arm-none-eabi-gdb instead of gdb to debug 2017-05-04 12:03:50 +02:00
README.md fix documentation 2017-05-04 14:07:40 +02:00
global.c add core board definition 2017-04-01 14:13:55 +02:00
global.h add core board definition 2017-04-01 14:13:55 +02:00
main.c enable shutdown again 2017-05-18 01:20:43 +02:00

README.md

project

summary

This is the firmware for a digital clapperboard.

technology

Clapperboards are used to synchronize audio and video tracks by clapping two wooden pieces. This is then visible on the video and the sharp sound is also present on the audio. Using the scene and take number written on the clapperboard and spoke at the beginning of the recording it is possible to know which sound track corresponds to which video track.

This clapper board improves this system with some features:

  • use 7-segment displays to show scene and take number (instead of having to manually write and erase it on the board)
  • show audio and video track numbers (number used in the file names or the recordings)
  • show current time
  • automatically increment the take and recording numbers

The numbers on the board can be adjusted by hand using button switches.

board

The current implementation uses a core board. The underlying template supports additional board.

peripherals

  • 1x 8-digit 7-segment display based on the MAX7219 to display the date
  • 1x 8-digit 7-segment display based on the MAX7219 to display the time (hours, minutes, seconds, frame)
  • 7x 4-digit 7-segment display based on the TM1637 to display recording information
    • 1x to display the chapter/episode
    • 1x to display the scene
    • 1x to display the take
    • 2x to display the video file number
    • 2x to display the audio file number
  • 1x 16-channel multiplexer to communicate with the 7-segments individually
  • 8x2 button switches to adjust the recording numbers and seconds
  • 1 button switch to detect clap
  • 1x tilt sensor to detect movement
  • 1x DS1307 RTC to keep track of the time

connections

Connect the peripherals the following way (peripheral signal; peripheral signal; micro-controller pin; micro-controller signal; comment):

  • DS1307 RTC to get the date
    • VCC; 8; ; +5V;
    • GND; 4; ; GND;
    • SCL; 6; PB10; I2C2_SCL;
    • SDA; 5; PB11; I2C2_SDA;
    • SQW; 7; PBO; GPIO; to synchronize the seconds
  • 2x MAX7219 in chain to show date and time
    • VCC; 19; ; +5V;
    • GND; 4; ; GND;
    • CLK; 13; PB13; SPI2_CLK;
    • DIN; 1; PB15; SPI2_MOSI;
    • LOAD; 12; PB12; SPI2_NSS; used as GPIO
  • 7x TM1637 to show the recording numbers
    • VDD; 16; ; +5V;
    • GND; 1; ; GND;
    • DIO; 17; PB7; GPIO;
    • CLK; 18; 3-9; I0-I6; on analog multiplexed
  • 1x CD74HC4067 16-channel multiplexer
    • VCC; 24; ; +5V;
    • GND; 12; ; GND;
    • common input; 1; PB6; GPIO; clock for TM1637
    • -E; 15; PB9; GPIO; to enable on low
    • S0; 10; PB3; GPIO; to select output
    • S1; 11; PB4; GPIO; to select output
    • S2; 14; PB5; GPIO; to select output
    • S3; 13; ; GND;
    • I0; 9; 18; CLK; TM1637 for
    • I1; 8; 18; CLK; TM1637 for
    • I2; 7; 18; CLK; TM1637 for
    • I3; 6; 18; CLK; TM1637 for
    • I4; 5; 18; CLK; TM1637 for
    • I5; 4; 18; CLK; TM1637 for
    • I6; 3; 18; CLK; TM1637 for

All pins are configured using defines in the corresponding source code.

code

dependencies

The source code uses the libopencm3 library. The projects is already a git submodules. To initialize and it you just need to run once: git submodule init and git submodule update.

firmware

To compile the firmware run make.

documentation

To generate doxygen documentation run make doc.

flash

The firmware will be flashed using SWD (Serial Wire Debug). For that you need an SWD adapter. The Makefile uses a ST-Link V2 along OpenOCD software (per default), or a Black Magic Probe. To flash using SWD run make flash.

debug

SWD also allows to debug the code running on the micro-controller using GDB. To start the debugging session run make debug.

USB

The firmware offers serial communication over USART1 and USB (using the CDC ACM device class).

You can also reset the board by setting the serial width to 5 bits over USB. To reset the board run make reset. This only works if the USB CDC ACM is running correctly and the micro-controller isn't stuck.