summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--LICENSES/BSD-2-Clause.txt22
-rw-r--r--Makefile4
-rw-r--r--README.md69
-rw-r--r--src/main.cc5
-rw-r--r--src/system.cc5
-rw-r--r--src/system.h5
6 files changed, 108 insertions, 2 deletions
diff --git a/LICENSES/BSD-2-Clause.txt b/LICENSES/BSD-2-Clause.txt
new file mode 100644
index 0000000..baa80b5
--- /dev/null
+++ b/LICENSES/BSD-2-Clause.txt
@@ -0,0 +1,22 @@
+Copyright (c) <year> <owner> All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice,
+this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/Makefile b/Makefile
index 5475f99..a7c881a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,7 @@
+# Copyright 2023 Birte Kristina Friesel
+#
+# SPDX-License-Identifier: BSD-2-Clause
+
MCU_AVRDUDE ?= t2313
MCU_AVRGCC ?= attiny2313a
AVRDUDE_PROGRAMMER ?= usbasp
diff --git a/README.md b/README.md
index 8fce8ed..f9f72e9 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,68 @@
-ATTiny2313 Blinkencat mod
+# ATTiny2313 Blinkencat mod
-Based on [marble's BlinkenCat](https://hackaday.io/project/27415-blinkencat).
+Application for RGBW [**Blinkencats**](https://finalrewind.org/projects/blinkencat/) with colourful animations.
+
+This project is based on ready-built cat night lights available on
+Amazon / eBay / AliExpress (and probably more).
+See also [marble's BlinkenCat project on hackaday.io](https://hackaday.io/project/27415-blinkencat).
+
+![](https://finalrewind.org/projects/blinkencat/media/preview.jpg)
+![](https://finalrewind.org/projects/blinkencat/media/blinkencat1_pcb.jpg)
+![](https://finalrewind.org/projects/blinkencat/media/blinkencat1_inside.jpg)
+
+Hardware features:
+
+* Unmarked "1200 mAh" 18650 LiIon battery with connectors soldered on, likely
+ without protective circuitry
+* TP4056 charge controller. It's specified for a fixed charge termination at
+ 4.2V ± 1%
+* 4x warm-white LED + 4x RGB LED
+* Unmarked microcontroller
+
+Battery and microUSB/button/LED PCB are housed beneath the main PCB. There is
+ample room for additions, e.g. a custom charge controller and/or a custom
+microcontroller. However, most 18650 battery holders are slightly too large
+for the cavern, so increasing the battery capacity is only trivial if you
+have a 18650 battery with connectors soldered on.
+
+Microcontroller pinout (courtesy of marble, pin 1 is top left when rotating the
+board so that the microcontroller is at the bottom, numbered counter-clockwise):
+
+* 1: NC
+* 2: Charge Status input
+* 3: Piezo input
+* 4: VCC
+* 5: Warm White LED output
+* 6: Button input
+* 7: NC
+* 8: Green LED output
+* 9: Red LED output
+* 10: Blue LED output
+* 11: GND
+* 12: Charge Status LED output
+* 13: NC
+* 14: NC
+
+input board pinout (pin 1 is left when rotating the case so that the board is
+above the battery):
+
+* 1: button contact A
+* 2: button contact B, microUSB GND
+* 3: LED VCC, microUSB VCC
+* 4: LED GND. Note that there is no resistor on the input board
+
+Following [marble's BlinkenCat
+howto](https://hackaday.io/project/27415-blinkencat), I replaced its
+microcontroller with an ATTiny2313A and implemented various steady-color and
+RGB color fade modes. Idle current consumption is in the 10 µA range.
+
+It works well, is rock solid and provides around 10 hours of blinkenlights
+(depending on mode). The firmware is available in my [blinkencat
+repository](https://git.finalrewind.org/blinkencat/) ([GitHub
+mirror](https://github.com/derf/blinkencat)).
+
+Power consumption in operation:
+
+* warm white: 128 mW
+* RGB: 180 mW
+* all LEDs on: 536 mW
diff --git a/src/main.cc b/src/main.cc
index 39a3e38..44a0c95 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2023 Birte Kristina Friesel
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
#include <avr/io.h>
#include <stdlib.h>
diff --git a/src/system.cc b/src/system.cc
index 5eb3f77..273a8a4 100644
--- a/src/system.cc
+++ b/src/system.cc
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2023 Birte Kristina Friesel
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
#include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/wdt.h>
diff --git a/src/system.h b/src/system.h
index d23caad..c2abe4a 100644
--- a/src/system.h
+++ b/src/system.h
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2023 Birte Kristina Friesel
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
#ifndef __SYSTEM_H__
#define __SYSTEM_H__