The key fobs play a warning message if they are taken outside the vicinity of the office. An 8 Ω waterproof speaker plays the message. The speaker is driven by an Adafruit I²S 3 watt amplifier which uses the Max98357A chip. This allows the nRF52840 to output a fully digital sound protocol which the amp then translates directly to the speaker. 

The positive and negative leads from the speaker are connected to the corresponding terminals on the amp. Connecting the amp to the Feather only requires a few wires.

  • The grounds are connected.
  • The RX receive pin is connected to LRC which is the left/right clock.
  • TX transmit is connected to BCLK which is the bit clock input.
  • GPIO 9 is connected to DIN which is the digital input signal.
  • The gain pin is grounded via a 100K Ω resistor which gives the maximum 15 decibels of gain.
  • GPIO 6 is connected to SD which is the shutdown pin.
  • The battery pin is connected to the VIN pin.

A magnetic reed switch determines if the fob is in the charging cradle. GPIO 5 is connected to one terminal of the reed switch. The other is connected to ground. A mechanical switch extends the built-in nRF52840 reset button. The RST pin is connected to one terminal of the switch and the other to ground.

This guide was first published on Jul 22, 2020. It was last updated on Mar 28, 2024.

This page (Wiring) was last updated on Mar 08, 2024.

Text editor powered by tinymce.