Going through full shop jobs of my machines and adding mods. For Doctor Who I wanted to add a moving Dalek head. From what I found on this site and others I was inspired to develop a movement using a servo motor. I decided use an Arduino Nano as a controller as not much was needed for input/output lines. I went to a 20KG servo which is probably overkill but I wanted something robust. I utilized the same connections to the machine (mostly) as originally intended including J208 (1 & 9) for opto switch #81, J107-5 and J122-1 for the control signal and J116 for the 12V and ground. I isolated the opto switch and control using a dual opto isolator. I built the support structure from oak and aluminum as they are easy to work with and strong. I replaced the flasher bulb with three LED's in the head. I also replaced the red plastic in the gun with blue. Below is the parts list and code for the Arduino. I also provided a switch to select random or sweep movement.
PARTS LIST:
Acrylic Round Rod, Translucent Blue, 1/2" Diameter, 1' Length (Used to Change Dalek gun to blue)
ACTOBOTICS 0.375 inch D x 1 inch L Servo Shaft (25T Spline)
8mm to 10mm Rigid Coupling Shaft Stepper Motor, Length 25mm / 1" Coupler Motor Connector Casing Joint with Screw
8mm x 100mm Model Straight Metal Round Shaft Rod Bar (Cut to size)
8mm / 0.31" ID Pillow Block Flange Bearing Self-Alignment KFL08
8mm Inner Dia H13D16 Rigid Flange Coupling Motor Guide Shaft Coupler Motor Connector
20KG Digital Servo Full Metal Gear High Torque, Aluminum Case Waterproof (Control Angle 180)
(1) 5MM Water clear Blue LED
(2) 5MM Water clear RED LEDs
(1) 3MM Blue LED
Arduino Nano
Opto isolator ILD1615-4
(2) 1/4W 1K Ohm Resistors
(2) 1/4W 330 Ohm Resistor
(3) 1/4W 470 Ohm Resistors
LM2596 DC to DC High Efficiency Voltage Regulator 3.0-40V to 1.5-35V Buck Converter DIY Power Supply Step Down Module
(1) 11 pin Molex SL-156 Connector Housing
(1) 5 pin Molex SL-156 Connector Housing
(2) 9 Pin Molex 0.100 Connector Housings
(3) 2 position Molex Connectors
1/2” Oak Board – 2-3” wide (for supports and head mount)
3/32 Aluminum Plate (approximately 3-1/2 by 2-1/2”)
Very thin alum for LED holders for Dalek Head (cut to suit)
Power Tap Board for Williams/Bally WPC Era Machines pbl-600-0051-00 (Pinball Life)
Miscellaneous: perf board, wire, sockets etc.
Code:
/* Doctor Who Pinball (Bally) - Moving Dalek Head Control
For controlling servo to rotate Doctor Who Pinball Dalek head
*/
#include <Servo.h>
Servo myservo; // Servo object
int pos = 0;
int inPin = 4; // Motor control from pinball (J122)
int ledPin = 5; // Indicator for moving head
int deg90pin = 6; // Indicator for Head at 90 Deg
int modepin = 12; // To determine if Random operation or Sweep back and forth
int val = 0; // Value of Head Control
int currPOS = 90; // Current Position of Head in degrees
int servoPin = 10; //Servo control pin
int servomoveDelay = 1000; // Delay Time between Head Moves -1000 =1 second
long randNumber;
long deg; // Degree you want servo to move to
int modeState; // Random or Sweep state indicator
int countHits = 0; // Used to filter out pulsing of solenoid circuit
void setup() {
myservo.attach(servoPin);
randomSeed(analogRead(0));
pinMode(inPin, INPUT);
pinMode(ledPin, OUTPUT);
pinMode(modepin, INPUT);
pinMode(deg90pin, OUTPUT);
digitalWrite(deg90pin, HIGH);
// Move servo to 90 Degree Home position
for (pos = 20; pos <= 90; pos += 1) {
myservo.write(pos);
delay(3);
}
for (pos = 160; pos >= 90; pos -= 1) {
myservo.write(pos);
delay(3);
}
currPOS = 90;
delay (4000);
}
void loop() {
delay(100); // Delay to avoid pulsing of solenoid circuit
val = digitalRead(inPin);
digitalWrite(ledPin, val);
// The countHits is used to help alleviate the pulsing of the solenoid circuit
if (val == HIGH) {
countHits += 1;
}
if (val == LOW) { //Reset state
countHits = 0;
}
if (countHits > 1) {
modeState = digitalRead(modepin);
if (modeState == HIGH) { //Set to RANDOM
randNumber = random(15);
deg = (randNumber + 2) * 10; // Pick a random degree 20 to 160 in steps of 10
}
else if (modeState == LOW) { //Set to SWEEP
if (deg < 90) {
deg = 160;
}
else if (deg > 90) {
deg = 20;
}
else if (deg = 90) {
deg = 20 + (randNumber) * 140;
}
}
if (deg == 90 ) { //Set OPTO Switch (#81) for Pinball
digitalWrite(deg90pin, HIGH);
}
else if (deg != 90) {
digitalWrite(deg90pin, LOW);
}
// Move the servo
if (deg > currPOS) {
for (pos = currPOS; pos <= deg; pos += 1) {
myservo.write(pos);
delay(3);
}
currPOS = deg;
delay (servomoveDelay);
}
else if (deg < currPOS) {
for (pos = currPOS; pos >= deg; pos -= 1) {
myservo.write(pos);
delay(3);
}
currPOS = deg;
delay (servomoveDelay); //Wait for a bit before moving again
}
}
else if (countHits == 0) {
digitalWrite(ledPin, LOW);
countHits = 0;
if (currPOS != 90) {
// Move servo to 90 Degree Home position
if (currPOS > 90) {
for (pos = currPOS; pos >= 90; pos -= 1) {
myservo.write(pos);
delay(3);
}
}
else if (currPOS < 90) {
for (pos = currPOS; pos <= 90; pos += 1) {
myservo.write(pos);
delay(3);
}
}
currPOS = 90;
// digitalWrite(deg90pin, HIGH);
}
}
}
DWDH_C116.jpgDWDH_Skel View2.jpgDWDH_Skel View.jpgDWDH_Support1.jpgDWDH_LEDS.jpgDWDH_PCB Connectors.jpgDWDH_PCB.jpgDWDH_C206-208.jpgDWDH_C122.jpgDWDH_FlasherC.jpgDWDH_Base.jpgDWDH_Assy.jpgDWDH_C106.jpg