A motorized fader program for the ATtiny13A uC.
Go to file
jakeg00dwin 3fa844b719 Updated version number and added instructions. 2025-02-23 12:50:29 -08:00
.template_files Initial commit 2025-02-10 18:25:49 +00:00
build Initial commit 2025-02-10 18:25:49 +00:00
docs Initial commit 2025-02-10 18:25:49 +00:00
inc removed the duplicate bit shifting in favor of single operation in function. 2025-02-23 12:29:52 -08:00
mocks Modified ADC mock module to have the new function signiture for the `ADC_ReadValue()` 2025-02-23 10:55:46 -08:00
src removed the duplicate bit shifting in favor of single operation in function. 2025-02-23 12:29:52 -08:00
tests Adjusted value for more accurate input. 2025-02-23 10:58:42 -08:00
.gitignore ignore my dev notes. 2025-02-10 10:59:03 -08:00
.gitmodules Initial commit 2025-02-10 18:25:49 +00:00
CMakeLists.txt Updated version number and added instructions. 2025-02-23 12:50:29 -08:00
Doxyfile Updated to project version 0.1.1 2025-02-14 12:53:53 -08:00
README.md Updated version number and added instructions. 2025-02-23 12:50:29 -08:00
avr-gcc-toolchain.cmake Updated with comments on prescaler usage for F_CPU 2025-02-20 16:05:23 -08:00
compile_commands.json Initial commit 2025-02-10 18:25:49 +00:00
otto.sh Added mock test runner function to menu. 2025-02-23 10:56:48 -08:00
setup.sh Initial commit 2025-02-10 18:25:49 +00:00

README.md

Motorized Fader

Description

Program for the ATtiny13A that controls a motorized fader by moving into a saved position read out of EEPROM memory.

Requirements

Hadware:

  • ATtiny13A/ATtiny45/ATtiny85.
  • usbasp programmer.
  • UNIX computer(to use the scripts for automation).

Software:

  • avr-gcc
  • avrdude(<=7.0)
  • CMAKE(<= 3.20)

Instructions

Setting Fader Position

To set the fader position preform a long press of the button.

The position will now be saved into the EEPROM memory.

Move to Position

To automatically move the fader into the saved location preform a quick press of the button.

The speed can be adjusted by changing the input value of the speed pot. The speed adjustment affects the on/off ratio of the motor and has a programmed minimum speed value in the function to prevent endless looping.

Move to secondary Position

When the motor has already preformed a move to position from a quick button press, you can tap the button once more and it will go back to it's previous position from your initial button press.

Building Project(Windows)

Flashing the Project

On Windows(usbtinyisp)

  1. Install the usbtiny driver:
    1. plug in usbtiny device
    2. Install the drivers from: adafruit
  2. open Powershell
  3. navigate to the repo directory cd Downloads\gf_002
  4. enter the command below.
./avrdude.exe -p t13 -c usbtiny -B 125kHz -U flash:w:.\build\src\main.hex -U lfuse:w:0x6A:m -U hfuse:w:0xFF:m -U lock:w:0xFF:m

On Windows(usbASP)

  1. Install the usbasp driver:
    1. plug in usbasp device
    2. run the 'zadig-2.8.exe' program
    3. select the libusb 32 on the right by clicking the down arrow to select.
  2. open Powershell
  3. navigate to the repo directory cd Downloads\gf_002
  4. enter the command below.
./avrdude.exe -p t13 -c usbasp -B 125kHz -U flash:w:.\build\src\main.hex -U lfuse:w:0x6A:m -U hfuse:w:0xFF:m -U lock:w:0xFF:m

Building Project(UNIX)

Building Hex Files

Builds the binary hex files. They are located in the build/src/ directory found in the project root.

cd ./<PROJECTNAME>
echo "2" | ./otto.sh

Automated Flashing Hex Files

Builds then flashes the binary hex files onto the micro-controller

cd ./<PROJECTNAME>
echo "4" | ./otto.sh

Running Tests

The code below will run the cpputest tests in verbose and color mode.

cd ./<PROJECTNAME>
echo "1" | ./otto.sh