• Models
  • Contests
  • Slicer
  • Login
  • Start Here
    thingiverse-iconprintables-iconcults3d-iconmakerworld-iconmyminifactory-icon

    3D GO

    3D ModelsContestsCollectionsSaved ModelsOn a mobile device?

3D GO

Privacy Policy
Automatic Key Stroker 3D Printer File Image 1
Automatic Key Stroker 3D Printer File Image 2
Automatic Key Stroker 3D Printer File Image 3
Automatic Key Stroker 3D Printer File Thumbnail 1
Automatic Key Stroker 3D Printer File Thumbnail 2
Automatic Key Stroker 3D Printer File Thumbnail 3

Automatic Key Stroker

Jose Miranda avatarJose Miranda

May 14, 2020

printables-icon
DescriptionCommentsTags

Description

Just a simple key stroker. You dont know you need one until you do... :D

It uses a mini servo, a small potentiometer (optional), and any arduino compatible board that can fit inside the box and can handle the servo. I used a cheap Wemos D1 Mini clone. You need 6x3mm bolts (same size as the bolts used in Prusa printers).

Arduino code is included in the print instructions since this website does not allow me to upload the .ino file...

Print instructions

Just use your normal settings. I included a 3mf file for reference.

Arduino code:

include <Servo.h>

include <SimpleTimer.h>

Servo myservo;
int pos = 0;
int lowpos = 0;
int highpos = 90;
int servopin = 2;
int potpin = A0;
int ledpin = D7;
int val = 0;
int oval = 0;
int pot = 0;
int servoSpeed = 4;

SimpleTimer timer;

void setup() {
myservo.attach(servopin);
myservo.write(lowpos);
Serial.begin(9600);
timer.setInterval(val);
}

void loop() {
pot = analogRead(potpin);
//Serial.println(pot);
val = map(pot,1,1024,15000,0);
val = val * 1000 / 1000;
if (abs(oval-val) > 1000) {
Serial.println(val);
oval=val;
timer.setInterval(val);
timer.reset();
}

if (timer.isReady()) {
moveServo();
}
}

void moveServo() {
for (pos = highpos; pos >= lowpos; pos -= servoSpeed) {
myservo.write(pos);
delay(15);
Serial.println(pos);
}
for (pos = lowpos; pos <= highpos; pos += servoSpeed) {
myservo.write(pos);
delay(15);
Serial.println(pos);
}

timer.reset();
}

License:

Creative Commons — Attribution — Noncommercial

Related Models

Cable Corners... keep cables in corners! preview image

Cable Corners... keep cables in corners!

muzz64 profile image

muzz64

31,014

Headset Hanger 2.0 preview image

Headset Hanger 2.0

RMTB profile image

RMTB

16,843

Baby Birth Tag Holder for the wall  preview image

Baby Birth Tag Holder for the wall

Morganja profile image

Morganja

4,051

Universal Filament Filter and Lubricator preview image

Universal Filament Filter and Lubricator

CreativeTools profile image

CreativeTools

26,136

3D4U by Miele Coffee Clip preview image

3D4U by Miele Coffee Clip

3D4U powered by Miele profile image

3D4U powered by Miele

8,694

Haus-Familienaufsteller „Home“ mit Namensschildern preview image

Haus-Familienaufsteller „Home“ mit Namensschildern

Daniel Lippert profile image

Daniel Lippert

731

SHARKZ... Fun Multipurpose Clips / Holders / Pegs with moving jaws that bite! preview image

SHARKZ... Fun Multipurpose Clips / Holders / Pegs with moving jaws that bite!

muzz64 profile image

muzz64

24,691

Mechanical wall clock preview image

Mechanical wall clock

Harald Andersson profile image

Harald Andersson

6,983