Attiny85 small useless-box
We calculate the final price from your selected file. You review and accept it before payment.
Saved on this device.
Small and configurable useless box with ATtiny85 uC. Just one servo motor for movements and there are also lights!
- Rating
- 0 / 5
- Likes
- 3
- Downloads
- 15
- Makes
- 0
- Views
- 362
- Reviews
- 0
Updated at source:
Model information
- Source
- Printables
- Category
- Electronics
- License
- Creative Commons — Attribution — Noncommercial
Small and configurable useless box controlled by ATtiny85 uC. Just one servo motor for movements and there are also lights! If you want there are gerber files for a custom PCB board.
Project name:
Small Useless Box
Description
Compact (76x50x66 mm) useless box controlled by an ATtiny 85 uC, powered by 9V battery.
Functions
- Useless box with one servomotor and colorful LEDs
- Programmable behavior
- Powered by 9V battery
- Custom PCB available
Hardware and Software Used
Hardware:
3D printed PLA components
- 1 x servomotor RG90 or similar model as MG90
- ATtiny85 micro controller
- 2 x 5mm led (fast flashing colors)
- 1 x switch button
- 2 x push button
- custom PCB with SMD and PTH components
Software:
- Tinkercad has been used to draw all parts
- Prusa Slicer has been used to obtain gcode files
- Arduino IDE has been used for the firmware
- EasyEDA has been used ti draw schematica and create Gerber files
Wiring Diagram
Board schematics and footprint
![]() |
![]() |
| BOARD BOM | ||||
| ID | NAME | DESIGNATOR | FOOTPRINT | Q.TY |
| 1 | 0.47u | C1 | C0805 | 1 |
| 2 | 22u | C2 | C0603 | 1 |
| 3 | 470u | C3 | CAP-D8.0×F1.5_BIPOLAR | 1 |
| 4 | 0.1u | C4 | C0603 | 1 |
| 5 | 1N4007W | D1 | SOD-123_L2.8-W1.8-LS3.7-RD | 1 |
| 6 | SERVO MALE HEADERS | H1 | HDR-TH_3P-P2.54-V-M-1 | 1 |
| 7 | BTN_CONN MALE HEADERS | H2 | HDR-TH_3P-P2.54-V-M-1 | 1 |
| 8 | LED-TH-5mm | LED1, LED2 | LED-TH_BD5.0 | 2 |
| 9 | BJT NPN (TO-92) | Q1 | TO-92-BJT NPN | 1 |
| 10 | 22k | R1 | R0603 | 1 |
| 11 | 180R | R2 | R0603 | 1 |
| 12 | 1k | R3,R4,R5,R6 | R0603 | 4 |
| 13 | LM2940IMP-9.0/NOPB | U1 | SOT-223-4 | 1 |
| 14 | DIP8-SOCKET | U2 | DIP-8 | 1 |
NOTE: R3, R4, R5, R6 are not mandatory for this project. They are optional components to set pull-up or pull-down aux signal to the uC.
Other electronic components required but not mounted directly to the board:
- 1 x servomotor SG90 or similar.
- 1 x switch
- 1 ATtiny85 uC
- 2 x 3 pin female headers
- 1 x 9V battery plug connector
- wires
Code
/*
Firmware for small ATtiny85 useless box WARNING: Set uC internal clock at 8MHz to run properly
If Servo library is installed to libraries, then that version (which doesn't support ATtiny parts)
will be used instead of the one included with the core, which does. To get around this,
include Servo_ATTinyCore.h instead - this will always use the version that came with core.
*/
#include <Servo_ATTinyCore.h>
#define servo_pin 0
#define btnA_pin 1 // Internal switch
#define btnB_pin 2 // External switch
#define led_pin 4
#define min_ang 5
#define max_ang 78
#define turn_off_time 5000
Servo myservo;
bool A, B, S;
unsigned long t0;
int pos = 0; // variable to store the servo position
long rnd;
void setup() {
pinMode(btnA_pin, INPUT_PULLUP); // A low at rest
pinMode(btnB_pin, INPUT_PULLUP); // B high at rest
pinMode(led_pin, OUTPUT);
digitalWrite(led_pin, LOW);
randomSeed(analogRead(4));
S=0;
}
void loop() {
A = digitalRead(btnA_pin);
B = digitalRead(btnB_pin);
if (!A && B){
S = 1;
digitalWrite(led_pin, HIGH); // turn on LEDs
myservo.attach(servo_pin);
rnd = (random(0, 200))*10; // add chaotic behaviour
delay(rnd);
turnOff();
digitalWrite(led_pin, LOW);
t0 = millis();
}
if (millis()-t0 > turn_off_time && S){
myservo.detach(); // for energy saving
S = 0;
t0 = millis();
}
}
void turnOff(){
int i = 0;
for (pos = 30; pos <= max_ang; pos += 4) {
myservo.write(pos);
delay(20);
}
for (pos = max_ang; pos >= min_ang; pos -= 2) {
myservo.write(pos);
delay(5);
}
for (i = 0; i < 10; i++) {
myservo.write(min_ang);
delay(5);
}
}
Printing Instructions
Filament: PLA Layer height: 0,3 mm Infill: 20% Supports: form build plate only Note: disable supports inside the holes for screws or pins. | ![]() |
Filament: PLA Layer height: 0,3 mm Infill: 20% Supports: everywhere Note: disable supports inside the holes for screws or pins. | ![]() |
Filament: PLA Layer height: 0,3 mm Infill: 20% Supports: form build plate only Note: disable supports inside the holes for screws or pins. | ![]() |
Filament: PLA Layer height: 0,3 mm Infill: 20% Supports: form build plate only Note: disable supports inside the holes for screws or pins. | ![]() |
Filament: PLA Layer height: 0,3 mm Infill: 20% Supports: form build plate only Note: disable supports inside the holes for screws or pins. | ![]() |
Filament: PLA Layer height: 0,3 mm Infill: 20% Supports: form build plate only Note: disable supports inside the holes for screws or pins. | ![]() |
Assembly Instructions
![]() | ![]() |
| |
![]() | ![]() |
| |
![]() | ![]() |
| |
![]() | ![]() |
| |
![]() | ![]() |
| |
![]() | ![]() |
| |
![]() | ![]() |
| |
![]() | ![]() |
| |
![]() | ![]() |
| |
![]() | ![]() |
| |
Demo and Usage Instructions
- Power up.
- Switch on.
- Repeat until enough useless work has been done or low battery.
- Power down.
Photos and Videos



























