ATtinyTorture

Github | Hackaday

Overview

ATtinyTorture is a ATtiny85 based pcb that beeps at random times throughout the day. Powered by a CRO32, it takes advantage of sleep modes to torture people for as long as possible. The code can be configured to beep as often as every few minutes, or as long as days apart.

Front of the Board
Back of the Board
Empty Board

Hardware

ATtinyTorture was designed in kicad and is powered by an ATtiny85. It is powered by a coin cell battery, and uses a transistor to drive the piezo buzzer.

Bill of Materials

The following link is to a digikey cart containing these parts: https://www.digikey.com/en/mylists/list/X8WIXUA92R

The parts from digikey come out to $3.64, plus three pcbs from OSHPark are $9.15 ($3.05/board) making the total cost for an assembled device $6.69.

PCB layout
Schematic

Software

For this project, I switched to AVR-GCC from the ArduinoIDE and continued to use an Arduino Uno as isp. This means the code is written in standard c.

The code uses the attinys power down sleep mode to save power, and an 8 second watchdog timer for interrupts. The board will beep two times on start before continuing to beep according to the delay intervals set in the software.

The program use a simple linear congruential generator to generate psuedo random numbers to help space out the beeps.

Helper Functions
Sleep and watchdog Functions
Main Loop

Program Config

To configure the program, you can:

to alter the amount of time in between beeps.
Setting either one to `0` will remove the limit (max delay is capped at 2 days).