SG90 servo drawer

Platz für 3D-Druck Modelle, die Ihr mit der Community teilen wollt
(Download nur für registrierte User!)

Bitte nur für Dateien und kurze Beschreibungen der Modelle verwenden, nicht für Diskussionen etc.

Moderator: Harald

Antworten
ubiminor
Beiträge: 875
Registriert: Mi 25. Apr 2018, 11:09
Modellbahn: N (1:160)
Wohnort: Oegstgeest, The Netherlands
Hat sich bedankt: 14 Mal
Danksagung erhalten: 248 Mal
Kontaktdaten:

SG90 servo drawer

Beitrag von ubiminor »

For those that want to remove the horrible black block from Märklin turnouts there are several options to mount servos.
This is my take on the subject. I like the servos placed on a drawer that slides into a bracket fixed on the layout. This simplifies maintenance and replacement of the servo unit.
The latest version of this concept is now presented.
Servo and springy element inserted in drawer
Servo and springy element inserted in drawer
The servo is bolted to the drawer. A springy element inserted in the drawer, the tip that will engage the turnout bar goes in top slot, the two arms go into the parallel slots and the remaining tip goes in the servo arm
Wire folded in a springy element
Wire folded in a springy element
The springy element is just made of 0.3 steel wire folded in a T shape (starting from the vertical part) with the last fold of the wire sticking out of the plane at 90 degrees
drawer inserted in the bracket
drawer inserted in the bracket
The drawer can be slid in and out of the bracket
Here is how it works, with a Märklin turnout that had a 0.5mm hole drilled in the throwbar and a 3 mm slot drilled under that hole

Drawer and bracket were printed in PLA filament with a 0.4mm extruder

Here are the files, if anybody wants to use them
ServoDrawer.zip
(82.11 KiB) 30-mal heruntergeladen
and the test code that moves the servo in the video

Code: Alles auswählen

// modified from Arduino servo code example
#include <Servo.h>

Servo myservo;  // create servo object to control a servo
// twelve servo objects can be created on most boards

int pos = 0;    // variable to store the servo position
int endpos = 15; // variable to store the end servo  position (starting position is 0)
int speed=30; // increase that if you want a slower motion
void setup() {
  myservo.attach(9);  // attaches the servo on pin D9  of the arduino
  myservo.write(0);  
}

void loop() {
  
  for (pos = 0; pos <= endpos; pos += 1) { // goes from 0 degrees to endpos degrees
    // in steps of 1 degree
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(speed);                       // waits 'speed' millisecond  for the servo to reach the position
  }
  delay(500);
  for (pos = endpos; pos >= 0; pos -= 1) { // goes from endpos degrees to 0 degrees
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(speed);                       // waits 'speed' millisecond  for the servo to reach the position
  }
    delay(500);
}
Antworten