Build Your Own Arcade Controls Forum

Main => Project Announcements => Topic started by: Draco_Elessar on August 23, 2015, 10:28:40 am

Title: THE CLAW!
Post by: Draco_Elessar on August 23, 2015, 10:28:40 am
I have always loved playing skill cranes (non-rigged ones) in arcades, so I bought The Gobbler for $120. I thought it would be a fun project to learn, fix up and make my own. The seller said that it had a homing issue, easy fix. Well that appears not to be true. I have found wires connected to the wrong thing, cold solder connections, wires soldered to microswitches just for splicing, and other odd things. I have what might be the manual or it’s for another crane made by the same company.

http://msnbcmedia.msn.com/i/MSNBC/Sections/NEWS/A_U.S.%20news/US-news-PDFs/140416-sms-claw-game-diagrams.PDF (http://msnbcmedia.msn.com/i/MSNBC/Sections/NEWS/A_U.S.%20news/US-news-PDFs/140416-sms-claw-game-diagrams.PDF)
http://arcarc.xmission.com/PDF_Cranes/Skilll_Crane_Operating_Instructions_%28UAI%29.pdf (http://arcarc.xmission.com/PDF_Cranes/Skilll_Crane_Operating_Instructions_%28UAI%29.pdf)

I have yet to deiced on a theme (maybe black-light or tronish), I want to make sure everything is working correctly before I do.

Known Issues:
Bad power cable - fixed
Left Limit switch does not work (not the microswitch; the wires connected to it are wrong) - fixed
Claw position switch ??? (see WHY DO THIS?) - fixed
Wrong wires connected to the wrong “thing" (Not sure how I am going to fix this) - fixed
Figuring out the wire diagram...
Maybe a new fuse on the board? - based off manual
Machine goes crazy randomly (motors keep going after limit switch, or doesn't work after self test)

Cost:
Crane - $120
Power Cable - $9

The Claw!
(https://farm1.staticflickr.com/678/20820665421_6d3fcc4883_z.jpg)

Inside
(https://farm6.staticflickr.com/5667/20775215556_388b7bf422_z.jpg)

The Branes
(https://farm6.staticflickr.com/5642/20614712979_637c2006f9_z.jpg)

The Heart
(https://farm6.staticflickr.com/5645/20613490240_09bb3ee846_z.jpg)

Forward and Left limit switch
(https://farm6.staticflickr.com/5755/20613485200_9341feceb1_z.jpg)

Claw limit switch
(https://farm6.staticflickr.com/5693/20178883944_54d0f2e9b4_z.jpg)

Why do this?
(https://farm6.staticflickr.com/5705/20801455235_dd308d3cb5_z.jpg)

Manufacturer sicker
(https://farm1.staticflickr.com/782/20792021032_5b1909fbb7_z.jpg)
Title: Re: THE CLAW!
Post by: yotsuya on August 23, 2015, 02:40:36 pm
Nice. I'm in The Claw Club as well.
Title: Re: THE CLAW!
Post by: DaOld Man on August 23, 2015, 02:54:37 pm
Interesting. I always liked the claw machines.
Title: Re: THE CLAW!
Post by: UKWILDKAT on August 23, 2015, 08:40:55 pm
Draco_Elessar
That a sweet looking claw machine good luck restoring it. If you come across another one in the same ball park please let me know I am interested in restoring one also.

Thanks
Title: Re: THE CLAW!
Post by: Draco_Elessar on August 23, 2015, 09:47:02 pm
Got it mostly working. Most of what was wrong was some wires were soldered to the wrong prong on the microswitch or a bad solder. It worked for about 4 hours, then things went crazy. Either the motors will ignore a random limit switch, or it will do a self check and not work. Sometimes turning it off and on will fix it, other times just got to wait. I'm tempted to rework everything with a raspberry pi or arduino base, but then I would have to learn how to code....


Draco_Elessar
That a sweet looking claw machine good luck restoring it. If you come across another one in the same ball park please let me know I am interested in restoring one also.

Thanks
I got the machine from Coinopwarehouse they are always getting items in for a really good price.
Title: Re: THE CLAW!
Post by: AlienInferno on August 24, 2015, 12:22:33 am
Awesome man!  I love claw games.  If I could find one for what you paid I would pick it up in a heartbeat but all the ones I find are the big giant games that people want way too much for.
Title: Re: THE CLAW!
Post by: Draco_Elessar on October 04, 2015, 09:54:58 am
I was trying to add a potentiometer so I could control the claw strength. It didn't end well. :badmood: The claw will no longer close with or without the potentiometer. I'm not sure if it’s the board or the electromagnet. How does one test an electromagnet coil??? I was testing the line to see what voltages I was getting. At rest I am getting about 22.1 DCV. When the claw should close it goes to 12.5DCV to 5DCV. Shouldn't the claw have more voltage when it closes, or am I misunderstanding electromagnets? No blown capacitors and fuses are good. Any help would be appreciated!
Title: Re: THE CLAW!
Post by: Draco_Elessar on October 04, 2015, 03:13:33 pm
Now I'm confused.  ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ???

I found a way to test the claw coil. I used the coin lights for the 24v, and it worked! The claw closed!

The line to the lights is 21~ on my multimeter
The line to the claw is always 21~ until it activates to close then about 5~v on my multimeter

When the claw is attached to the lights it works. When its attached to the claw line it doesn't. ??? ??? ??? ???

I'm thinking there might be something wrong with the board, and I have no idea how to find out what ATM.

Pics of the board:
(https://farm1.staticflickr.com/704/21758668638_4e35dc60d0_k.jpg)
(https://farm1.staticflickr.com/618/21759642199_9260191d4e_k.jpg)


(https://farm6.staticflickr.com/5824/21956454681_6614aa2759_k.jpg)
Title: Re: THE CLAW!
Post by: AlienInferno on October 10, 2015, 04:40:39 pm
I don't really know anything about electronics but the area I pointed out looks like it got fried.  Can't tell if it's dirt or if something got hot/burned/etc in that area.
Title: Re: THE CLAW!
Post by: SavannahLion on October 13, 2015, 11:50:34 pm
That board got reworked at least once, it's the spots with the black burns around the soldered pads. Diodes were added, at least one IC was replaced, traces cut, jumpers added, etc. This board probably had problems from before. Not as bad as some boards I've seen but based on what you describe, the guy knew enough to keep it hobbling along but didn't care enough to do a decent job.

Yeah whatever that thing was it fried itself out along with whatever is around it. That piece to the left looks like it might be VR1 (can't see the marking) looks like it burned the hell out of the board or been replaced or both. I'm not skilled enough to diagnose via pictures and certainly not a board that's been reworked. But start following traces back from the claw through the circuit and see what matches the schematic and what doesn't. I don't see F1 nor a place for it unless that's the fuse on the far right.
Title: Re: THE CLAW!
Post by: eds1275 on October 14, 2015, 05:03:17 am
That machine is perfect for cheaters! If you stand at the side you can play without the mirror effing up your depth percetion. My younger brother can pretty much clean those machines out.
Title: Re: THE CLAW!
Post by: Draco_Elessar on October 21, 2015, 06:22:01 pm
That board got reworked at least once, it's the spots with the black burns around the soldered pads. Diodes were added, at least one IC was replaced, traces cut, jumpers added, etc. This board probably had problems from before. Not as bad as some boards I've seen but based on what you describe, the guy knew enough to keep it hobbling along but didn't care enough to do a decent job.

Yeah whatever that thing was it fried itself out along with whatever is around it. That piece to the left looks like it might be VR1 (can't see the marking) looks like it burned the hell out of the board or been replaced or both. I'm not skilled enough to diagnose via pictures and certainly not a board that's been reworked. But start following traces back from the claw through the circuit and see what matches the schematic and what doesn't. I don't see F1 nor a place for it unless that's the fuse on the far right.

Thanks for the help! The wired thing is that burned area was like that before the board stopped working.

So far I have replaced the capacitors, but that didn't work. :banghead:

The only idea I have left is to replace the voltage regulator. If that doesn't work I'm going to have to make or buy a new board.

I found this project and might use it as a base since I'm not sure how to make a replacement board.
https://hackaday.io/project/215-toy-claw-machine (https://hackaday.io/project/215-toy-claw-machine)
Title: Re: THE CLAW!
Post by: eds1275 on October 21, 2015, 07:50:26 pm
Inside
(https://farm6.staticflickr.com/5667/20775215556_388b7bf422_z.jpg)

Is that outlet live?
Title: Re: THE CLAW!
Post by: MK3FAN on October 21, 2015, 08:09:37 pm



 (http://www.youtube.com/watch?v=Bkyyp6eBqUQ#ws)
Title: Re: THE CLAW!
Post by: WakiMiko on October 22, 2015, 05:02:28 am
http://www.youtube.com/watch?v=N-Esh4W3dfI (http://www.youtube.com/watch?v=N-Esh4W3dfI)
Title: Re: THE CLAW!
Post by: Draco_Elessar on November 17, 2015, 07:04:32 pm
Inside
(https://farm6.staticflickr.com/5667/20775215556_388b7bf422_z.jpg)

Is that outlet live?

Yep, it's something on the board.
Title: Re: THE CLAW!
Post by: Draco_Elessar on November 17, 2015, 07:22:45 pm
I have given up on trying to fix the board. Instead I am going to use an Arduino Mega, and create my own. I'm thinking of using a MultiMoto Arduino shield or two Velleman Motor and Power Shields. I'm not sure which controller to use. The goal is to use the motor controller to also control the claw strength. From what I have been reading it should be possible. For controlling different settings I'm going to use dip switches, maybe if I can figure it out I'll add Bluetooth control for settings and playing.
Title: Re: THE CLAW!
Post by: Draco_Elessar on January 09, 2016, 07:38:55 pm
Got some work done on the Claw. Rewired everything, and installed a new power supply. Right now I am having issues with the Arduino and microswitches. When I hit one switch two motors come on when only one should. Not sure what is causing it, as of yet.

(https://farm6.staticflickr.com/5834/23830707820_e7252f65e8_z.jpg)

(https://farm2.staticflickr.com/1574/23758584679_e1bb4d96c6_z.jpg)

(https://farm2.staticflickr.com/1711/23498138574_1e632e2b6f_z.jpg)

(https://farm2.staticflickr.com/1565/23499578203_00382254d6_z.jpg)

(https://farm2.staticflickr.com/1520/24126377595_b98b11ef3c_z.jpg)

(https://farm2.staticflickr.com/1666/24018264592_9fe00ccaf2_z.jpg)

(https://farm6.staticflickr.com/5749/24126375755_92c51e8119_z.jpg)

(https://farm6.staticflickr.com/5674/24043777851_81c7c069a3_z.jpg)


Draco

Title: Re: THE CLAW!
Post by: DaOld Man on January 09, 2016, 09:38:35 pm
Interesting project!
Do you have a wiring diagram showing motors hooked to arduino?
Title: Re: THE CLAW!
Post by: Draco_Elessar on January 12, 2016, 08:16:07 am
Interesting project!
Do you have a wiring diagram showing motors hooked to arduino?

(https://farm2.staticflickr.com/1661/23678452934_680dd6a9a5_b.jpg)


I got the motors to move independently. When ever I give one power I have to set the other to no power at the same time. 
Title: Re: THE CLAW!
Post by: DaOld Man on January 12, 2016, 07:24:06 pm
Very very interesting.
May have to get me an arduino and play around with it.
How are you setting the motors to power or no power?
Title: Re: THE CLAW!
Post by: Draco_Elessar on January 15, 2016, 08:05:19 pm
Very very interesting.
May have to get me an arduino and play around with it.
How are you setting the motors to power or no power?

The Arduino has been fun to play with and seams to be able to do all sorts of things. Somehow I killed one, in the coarse of this project, but it could be that I'm using Inland brand (cheap.)

Here is the code:
Code: [Select]
// include the SPI library:
#include <SPI.h>

// L9958 slave select pins for SPI
#define SS_M4 14
#define SS_M3 13
#define SS_M2 12
#define SS_M1 11

// L9958 DIRection pins
#define DIR_M1 2
#define DIR_M2 3
#define DIR_M3 4
#define DIR_M4 7

// L9958 PWM pins
#define PWM_M1 9
#define PWM_M2 10    // Timer1
#define PWM_M3 5
#define PWM_M4 6     // Timer0

// L9958 Enable for all 4 motors
#define ENABLE_MOTORS 8

int pwm1, pwm2, pwm3, pwm4;
int dir1, dir2, dir3, dir4;
const int joyup = 15;
const int joydown = 16;
const int joyleft = 17;
const int joyright = 18;
const int joypress = 19;
const int coin = 21;
const int front = 20;
const int left = 22;
const int clawup = 23;
const int clawdown = 24;
unsigned long currentime = 0;
int credit = 0;
int charge = 0;
long int gametime = 0;

void setup() {
  unsigned int configWord;
 
    // put your setup code here, to run once:
  pinMode(SS_M4, OUTPUT); digitalWrite(SS_M4, HIGH);  // HIGH = not selected
  pinMode(SS_M3, OUTPUT); digitalWrite(SS_M3, HIGH);
  pinMode(SS_M2, OUTPUT); digitalWrite(SS_M2, HIGH);
  pinMode(SS_M1, OUTPUT); digitalWrite(SS_M1, HIGH);
 
  // L9958 DIRection pins
  pinMode(DIR_M1, OUTPUT);
  pinMode(DIR_M2, OUTPUT);
  pinMode(DIR_M3, OUTPUT);
  pinMode(DIR_M4, OUTPUT);
 
  // L9958 PWM pins
  pinMode(PWM_M1, OUTPUT);  digitalWrite(PWM_M1, LOW);
  pinMode(PWM_M2, OUTPUT);  digitalWrite(PWM_M2, LOW);    // Timer1
  pinMode(PWM_M3, OUTPUT);  digitalWrite(PWM_M3, LOW);
  pinMode(PWM_M4, OUTPUT);  digitalWrite(PWM_M4, LOW);    // Timer0
 
  // L9958 Enable for all 4 motors
  pinMode(ENABLE_MOTORS, OUTPUT);  digitalWrite(ENABLE_MOTORS, HIGH);   // HIGH = disabled
 
  /******* Set up L9958 chips *********
  ' L9958 Config Register
  ' Bit
  '0 - RES
  '1 - DR - reset
  '2 - CL_1 - curr limit
  '3 - CL_2 - curr_limit
  '4 - RES
  '5 - RES
  '6 - RES
  '7 - RES
  '8 - VSR - voltage slew rate
  '9 - ISR - current slew rate
  '10 - ISR_DIS - current slew disable
  '11 - OL_ON - open load enable
  '12 - RES
  '13 - RES
  '14 - 0 - always zero
  '15 - 0 - always zero
  */
 
  // set to max current limit and disable ISR slew limiting
  configWord = 0b0000010000001100;
 
  SPI.begin();
  SPI.setBitOrder(LSBFIRST);
  SPI.setDataMode(SPI_MODE1);  // clock pol = low, phase = high
 
  // Motor 1
  digitalWrite(SS_M1, LOW);
  SPI.transfer(lowByte(configWord));
  SPI.transfer(highByte(configWord));
  digitalWrite(SS_M1, HIGH);
  // Motor 2
  digitalWrite(SS_M2, LOW);
  SPI.transfer(lowByte(configWord));
  SPI.transfer(highByte(configWord));
  digitalWrite(SS_M2, HIGH);
  // Motor 3
  digitalWrite(SS_M3, LOW);
  SPI.transfer(lowByte(configWord));
  SPI.transfer(highByte(configWord));
  digitalWrite(SS_M3, HIGH);
  // Motor 4
  digitalWrite(SS_M4, LOW);
  SPI.transfer(lowByte(configWord));
  SPI.transfer(highByte(configWord));
  digitalWrite(SS_M4, HIGH);
 
  // Reduce the PWM frequency to about 8kHz
  // Note, this will screw up the timer functions that use Timer0 such as millis()
  setPwmFrequency(PWM_M1, 8);
  setPwmFrequency(PWM_M3, 8);
  pinMode(joyup, INPUT_PULLUP);
  pinMode(joydown, INPUT_PULLUP);
  pinMode(joyleft, INPUT_PULLUP);
  pinMode(joyright, INPUT_PULLUP);
  pinMode(joypress, INPUT_PULLUP);
  pinMode(coin, INPUT_PULLUP);
  pinMode(front, INPUT_PULLUP);
  pinMode(left, INPUT_PULLUP);
  pinMode(clawup, INPUT_PULLUP);
  pinMode(clawdown, INPUT_PULLUP);
}


// *******************************************
// ************** Main Loop ******************
// *******************************************
void loop() {
  // put your main code here, to run repeatedly:

  if (digitalRead(joypress) == HIGH)
    {
       digitalWrite(ENABLE_MOTORS, LOW); // Enables the motor
       // Lower the claw
       while (digitalRead(clawdown) == LOW)
       {
        analogWrite(PWM_M3, 200);  digitalWrite(DIR_M3, 0);
       }
       analogWrite(PWM_M3, 0);  digitalWrite(DIR_M3, 0);
       // Raise the claw
       while (digitalRead(clawup) == LOW)
       {
        analogWrite(PWM_M3, 200);  digitalWrite(DIR_M3, 1);
       }
       analogWrite(PWM_M3, 0);  digitalWrite(DIR_M3, 0);
       //Return home
       while (digitalRead(left) == LOW)
       {
        analogWrite(PWM_M2, 200);  digitalWrite(DIR_M2, 0);
       }
        analogWrite(PWM_M2, 0);  digitalWrite(DIR_M2, 0);
       while (digitalRead(front) == LOW)
       {
        analogWrite(PWM_M1, 200);  digitalWrite(DIR_M1, 1);
       }
       digitalWrite(ENABLE_MOTORS, HIGH);
       
    }
  else
  {
    digitalWrite(ENABLE_MOTORS, LOW);
    while (digitalRead(joyup) == HIGH)
    {
      analogWrite(PWM_M1, 200);  digitalWrite(DIR_M1, 0);     
    }
    analogWrite(PWM_M1, 0);  digitalWrite(DIR_M1, 0);
    while (digitalRead(joydown) == HIGH)
    {
      analogWrite(PWM_M1, 200);  digitalWrite(DIR_M1, 1);
    }
    analogWrite(PWM_M1, 0);  digitalWrite(DIR_M1, 0);
    while (digitalRead(joyright) == HIGH)
    {
      analogWrite(PWM_M2, 200);  digitalWrite(DIR_M2, 1);     
    }
    analogWrite(PWM_M2, 0);  digitalWrite(DIR_M2, 0);
    while (digitalRead(joyleft) == HIGH)
    {
      analogWrite(PWM_M2, 200);  digitalWrite(DIR_M2, 0);
    }
    analogWrite(PWM_M2, 0);  digitalWrite(DIR_M2, 0);
    digitalWrite(ENABLE_MOTORS, HIGH);
  }
 
 
 
 


}
// ***********************************************
// ************** End Main Loop ******************
// ***********************************************


/*
 * Divides a given PWM pin frequency by a divisor.
 *
 * The resulting frequency is equal to the base frequency divided by
 * the given divisor:
 *   - Base frequencies:
 *      o The base frequency for pins 3, 9, 10, and 11 is 31250 Hz.
 *      o The base frequency for pins 5 and 6 is 62500 Hz.
 *   - Divisors:
 *      o The divisors available on pins 5, 6, 9 and 10 are: 1, 8, 64,
 *        256, and 1024.
 *      o The divisors available on pins 3 and 11 are: 1, 8, 32, 64,
 *        128, 256, and 1024.
 *
 * PWM frequencies are tied together in pairs of pins. If one in a
 * pair is changed, the other is also changed to match:
 *   - Pins 5 and 6 are paired (Timer0)
 *   - Pins 9 and 10 are paired (Timer1)
 *   - Pins 3 and 11 are paired (Timer2)
 *
 * Note that this function will have side effects on anything else
 * that uses timers:
 *   - Changes on pins 5, 6 may cause the delay() and
 *     millis() functions to stop working. Other timing-related
 *     functions may also be affected.
 *   - Changes on pins 9 or 10 will cause the Servo library to function
 *     incorrectly.
 *
 * Thanks to macegr of the Arduino forums for his documentation of the
 * PWM frequency divisors. His post can be viewed at:
 *   http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1235060559/0#4
 */
 
void setPwmFrequency(int pin, int divisor) {
  byte mode;
  if(pin == 5 || pin == 6 || pin == 9 || pin == 10) { // Timer0 or Timer1
    switch(divisor) {
      case 1: mode = 0x01; break;
      case 8: mode = 0x02; break;
      case 64: mode = 0x03; break;
      case 256: mode = 0x04; break;
      case 1024: mode = 0x05; break;
      default: return;
    }
    if(pin == 5 || pin == 6) {
      TCCR0B = TCCR0B & 0b11111000 | mode; // Timer0
    } else {
      TCCR1B = TCCR1B & 0b11111000 | mode; // Timer1
    }
  } else if(pin == 3 || pin == 11) {
    switch(divisor) {
      case 1: mode = 0x01; break;
      case 8: mode = 0x02; break;
      case 32: mode = 0x03; break;
      case 64: mode = 0x04; break;
      case 128: mode = 0x05; break;
      case 256: mode = 0x06; break;
      case 1024: mode = 0x7; break;
      default: return;
    }
    TCCR2B = TCCR2B & 0b11111000 | mode; // Timer2
  }
}

Update:
I'm running into an issue where the Arduino will pause when the claw is done lowering. It will not come up, or accept any other commands. If I push the reset button or power it off and on. Then the joystick again the claw will raise and return home.
Title: Re: THE CLAW!
Post by: Draco_Elessar on January 24, 2016, 10:05:59 pm
I got some work done on codeing the crane machine. I can change setting with dipswitches (claw strength, cost, and test modes.) The current issue I am having is game play time. The time on the Arduino gets changed by the PWM of the motors. Haven't found a way to get the time to be constant, or close to, yet. It likes to speed up or slow down. So far this is the closest I have gotten. Is that it should be 10 seconds (gametime), but when play it will be anywhere from ~6 to ~16 seconds.

    currentime = millis();
    while ((gametime * 10000) >= (millis() - currentime))
    {
       game;
    }

Attached is a zip file with two Arduino programs. Crane Machine is a basic version where it responds to the joystick and button press. Cran Machine with coin; needs coin input. It will home the claw at turn on and will put the claw out in the play field once a coin has been put in.

Draco