Monday, November 8, 2021

Toy claw machine teardown

 A toy claw machine!

Of all things, while intending to make my own claw machine, I ran across this at the thrift store:

I had no idea of its condition until I started pulling it apart.  First step: the batteries.  Fully expecting ancient batteries and corroded terminals, I was very surprised to find 3 healthy (1.5V or higher) D-cell batteries within, and no signs of corrosion.

So, obviously, next step: turn it on, and put a coin in.

The machine came to life making quite a racket.  The left-right motion worked well.  The front-back motors were slow.  

 The drop bucket was completely inoperable, because the stick for it had become detached.  


 

It went through its play sequence and gave me a wah-wah-wah sad sound for failing to grab anything.

Other observations: the top lid was missing a red panel.  Presumably, that was there so you could put objects in, and then seal it up.  


 

The rear and right clear panels were busted, most likely due to harsh conditions at the thrift store.

A view from below

This is the bottom area with its two panels removed.  The smaller one allows you to retrieve coins.  The larger one is for the batteries.

Ten screws (2.67mm OD, 8mm long) later, and I had the bottom panel off.

What a horrible rat's nest of wires!  These pictures also don't show the trails of hot glue that were left wandering about, either.  Very messy.

The bottom panel holds connectors to power, the power switch, and the speaker.

I then removed the four short screws (2.81mm OD, 5.65mm long) that held the circuit board in place.  It turns out it's a simple, single-sided board.  The "up" non-conductive side holds three DPDT momentary switches.

The joysticks were a very simple, clever mechanism.  Each is a gray stick that has a T-shaped peg on the end.  The holes mate to the pegs of the circuit board switches.  In between, there is an oval red piece that provides a way for the stick to pivot.  You can remove the grey joysticks and red oval sliders by pivoting the stick and tipping it through, and then simply lifting out the slider.


Fixing the claw joystick

This is the top side of the control board.  As you can see, the peg is missing from the up-down switch.  After a little shaking, I found the missing peg, fortunately.


I de-soldered the switch so I could work on it.  Here are the bottom and top views.  If I were to replace this, I'd need something where the switch holes were 0.2" apart, and ideally it'd have the same stabilization mounting hole separations (0.4" x 0.8", roughly).


You can see where the peg snapped off of the switch.  Someone probably was too rough with it, but the peg really didn't have reasonable strengthening supports.  From a 3d-printing perspective, it'd be like having a circular peg on top of a cube of plastic -- very easy to break.

I wasn't quite sure how to fix this.  I could order a new switch, and hope for the best.  But that seemed like it'd take too long.  I also considered drilling a hole and putting a metal peg in place, but figured that wouldn't hold.  Plus, the plastic in the switch wasn't all that thick, so there wouldn't be much for the metal to bite into.  Gluing the peg back in place seemed like a path to rapid re-breaking.

Taking a chance, I assumed the plastic to be ABS and decided to try to melt the two pieces back together again.  I set my soldering iron to 235 C.  On my first attempt, I just hit the edges and it didn't provide a strong bond.  It snapped back off again quite quickly.  But I succeeded on my second attempt.  I melted the peg bottom and the switch plastic briefly, then held the two parts together and touched around the edges.  Then, I let it cool.  It came out ugly, but strong and functional.

After re-soldering the switch to the control panel and putting things back together again, it worked!

Other functions

I found out during testing that the toy also has an "electric eye" beam -- an LED and an optical sensor -- near the bottom of the drop chute.  So it assumes you've won if something crosses the beam.  (If you leave a toy in there and start the game over again, it waits until it sees a new signal, so it's a leading edge kind of detection.)  

The coin detection mechanism is also quite poor.   Most often, when I insert a quarter, it would start the game, but the coin would not fall through.  I also could just start the game by putting the coin halfway in, and then would take the coin back out again.

In any case, I found a nice test sequence, where I'd start the game by pushing the coin detect with a small screwdriver, and then wave my finger across the light beam to stop it.

Linear motion mechanism

Onward.  The toy worked, but I was still curious about how it did its linear motion, and why the Y axis movement was so slow.

I removed the ten screws (2.75mm OD, 5.7mm long) that held the lid in place, and then removed the lid.  Getting those screws off was a little tough.  They were screwed down tightly, and I had a limited range of motion because of the clear panels.

Removing the motor cover gave me a little more insight.


So... a few things to point out here.

First, it's a rack-and-pinion mechanism in both X and Y axes.  The X axis motion has two racks.  There is a metal rod connecting both X axis pinions at once, and that's connected to the motor mechanism via gears.

The Y axis movement (front-back) also uses a rack-and-pinion system with dual racks.  I think for that axis they just used two motors, one for each rack.  I think that means it's possible that they used the available voltage without amplification and thus lost speed on that axis.  It's hard to tell and I didn't want to tear apart the motor carriage further.

There are limit switches for both X and Y axis movement.  I think they're wired in series.  Certainly that's what's happening on the Y axis.  It's possible all four switches run off the same wire in series, thus reducing the wire count going back to the PCB.

The overall motor carriage was askew when I opened it up.  It took some clever loosening and re-tightening in order to adjust that.

The claw

The claw motor is running two sprocketed gears that hook into the chains that hold the claw.  But, interestingly, the chains don't both release and lift at exactly the same time.  One precedes the other by a bit, allowing the claw to open upon initial descent, and then close before coming up.  I think that means there's a rotating peg on one gear that hooks into an arc slot on the other gear.  Clever.

Next steps

I'm going to need to take the top lid off again in order to remove and fix the rear and right clear panels.  Those appear to be held on by the screwed-on corner brace columns.  But they also look like they're bent at the edges, so I might have to figure out how to bend acrylic before I'm done.

I might also investigate the Y axis motors a bit more.

Otherwise, I think this toy is a decent fallback if my "real" claw machine build takes too long or goes sideways.








Friday, November 5, 2021

Double E 561 Excavator teardown

I found this wonderful broken excavator toy while thrifting, and took it apart today to see if I could reuse the entire movement assembly, or parts of the motion works, or just the motors in another build.


First, the treads came off along with some little supporting wheels.


After that there were several (six? eight?) screws that held the base plate up.  Here's what it looks like with the plate removed.

Just by the wiring, you can see there are just two wires going to each of the front wheels.  The rear wheels spin freely as idle gears.  The front motors appear to be geared DC motors, given there are only two wires going to each.  That makes sense for a basic toy.

By the way, these things retail for around $60.  But this one is missing the entire front bucket assembly and the remote control.

The tread motors came off with the removal of four more screws each.  One thing I like about this toy is that, unlike things like H-P printers, they use normal screws, and I think there were only two or three types of screws in the whole assembly.

At this point, I hit a problem.  I wanted to remove the wheel base from the cab assembly, but couldn't get to its screws.  The screw heads were blocked because the cab couldn't pivot, being on a gear assembly for swiveling, and I couldn't activate the motors, lacking the remote control.

I did a quick power test, hoping that maybe the boot cycle would rotate the cab.  The power area was missing the battery, but was labeled 4.8v and had clear black and red wires.  So I hooked it up to a USB wall wart and breakout wire.  The cab lights lit up and flashed, but there was no movement.  That wasn't entirely surprising.

So to get the cab parts off of the cab baseplate, I had to sneak a #1 Philips (or smaller) screwdriver bit into the hole, and use an adjustable wrench to turn it until the screw came free.  Then, I was able to turn the bit with my fingers.

Fortunately, that's all it took.  The cab top came off of the cab baseplate cleanly.  There weren't any tricky, easy-to-break plastic tabs to fight.

Here it is with the cab top removed, revealing the circuit board and motors.

After looking around a bit, I found that it had the following:

- Six thin wires going up into the arm.  I could only see two, where it was broken, but there were six originally.

- Two wires to each front wheel/tread motor

- Two wires to a speaker

- Three wires to the cab so the LEDs could flash independently

- Two wires to the cab swivel motor

- Two wires to the arm motor

After removing a few more screws here and there, I had the arm off 


 

and the swivel motor out (the black box at the bottom, now away from the swivel gear).

From there, it was just a matter of taking lots of pictures of the circuit board, removing it, and de-soldering.

The top left chips are marked MX1508 / 1842HS.  A quick google shows those are DC motors controllers, but it's hard to find a clean datasheet without looking at breakout boards.  The breakout boards might have flyback diodes and PWM control.

 They appear to be dual H-bridge chips, thus allowing bidirectional movement in each motor.  Each chip can control two motors.

The motor connections had labels and were easy to trace.

MXB = yellow/green, thin, going up into lift arm

MDB = yellow/white, thick, for lift arm 

MWX = blue/red, thin, going up into lift arm

HYM = black/dark blue, thick, for swivel motor

MZS = white/black, thin, going up into lift arm

MLFB and MFRB = traction motors (presumably LF = left front, FR = front right).

The top-left one MX1508 (I'm viewing it upside-down, based on the silkscreen labels) controls motors MXB and MDB, so a mixture of arm stuff and the arm lifter.



 

The next MX1508 controls MWD and HYM, so lift arm something and swivel.


 

After that is the MZS motor, and it appears to have its own dedicated chip, maybe for layout or power reasons.  It's another where the wires went up into the lift arm, so I don't greatly care.  The chip is labeled MX08E / 1923H and aliexpress says it's a motor driver, but datasheets aren't easily findable.  

 


I think it's reasonable to assume it does a single H bridge, kind of like getting half of a MX1508.

Here's a reasonable page that talks about the 1508:

https://arduinodiy.wordpress.com/2019/11/02/mx1508-vs-l9110s-vs-l293-motordriver-board/

 Finally, there's one last chip at the top right.  Its label said MX1616 / 1851H but has since worn off.  It's wired similarly to the MX1508.  It controls the MLFB and MFRB tread motors.  The layout on the board is a little different, just because the MLFB connectors have to avoid the mounting hole.

There are two chips in the middle.  One is 14-pin


 

and the one next to it is 16-pin


 

The 14-pin chip talks to the first two MX1508s.

The way the board in the toy is set up, it sends GND and VCC under the whole bank of motor drivers.

The 14-pin chip appears to connect to the first MX1508's INA and INB directly.  MX1508 Pins 6 and 7, INA2 and INB2, are connected via 102 (1k) resistors, so I suppose they're limiting current to both motors.

I'm kinda thinking that they did this to intentionally stall the motor that controls the lift arm.  It sort of suggests that another articulating motor on the arm was connected to MXB.

For the second MX1508, the 14-pin chip connects directly without 1k resistors.  I'm not sure why they wouldn't force-stall those (if my earlier assumption is correct) but maybe they need more power to swivel the whole body, and perhaps the other thing in the arm similarly needed full power.

In any case, at least four pins are being used for INA/INB and INA2, INB2 of each MX1508, meaning 8 of the 14 are consumed, leaving 6 to be explained.  Another two go to L- (LED light) controls.  So now we're left with 4 to explain.  Two more must go to logic + and - so there are two left.

I'm wondering if it's some kind of serial multiplexer, but that'd be hard to explain.  It would need addressing to four motors, and directional control.  I'm thinking maybe one pin is a clock signal, and the other is a serial input, and it has some kind of internal protocol that knows what's going on.

The 16-bit chip uses 6 pins for the remaining three motors, uses 2 for the speaker +/- points, and uses 2 to talk to the 14-bit chip.  Then giving 2 more to Vcc and GND, we're left with 4.  Of those, 1 certainly ties to the right side chip, which presumably is all about radio control.  The other three aren't clear.

I think this means that if I want, I could remove the middle-level chips entirely, cut a bunch of traces, and have access to the MX1508 inputs.

Or, I could just ignore the whole board, and wire up the motors to something where I can get actual datasheets.

I think I'll start by removing the existing, undocumented chips and see where that leads.

Here's the whole of the disassembled toy, minus screws and control board.

And videos of the motors and how they sound (direct 5v connection):

Tread motor:

Arm motor:

Swivel motor:

Arm motor, connected and counter-weighted:


 There are two uses, or a combination of the two, that I'm looking at for this.

1. Just rebuild is using my own motor mechanism and Arduino or Raspberry Pi.  Tie in some kind of communication, perhaps using a simpler motor control from a different toy.

2. Take advantage of the tread assembly and use the whole thing as one linear motion mechanism of a claw machine.  That is, instead of having a claw hung from a carriage along an axis, drive the whole toy as that axis, and somehow keep it from tipping over with the weight of the claw.

3.  Make it the center point of a rotating crane-type claw machine.  That is, pretend it's a crane instead of being an excavator.  Mount it on a center post, use the existing swivel mechanism, and fix the arm.  (Perhaps strip out the existing arm wiring and replace it with strong fishing filament, hide the winch somewhere, and put idle pulleys in to avoid abrasion.)  Extra credit: find a way to make the crane arm extend and retract.

More on the board

Here is an image of the board with some of the signal distribution chips removed, and 1508 (or 1616) pins labeled and traced.


 

VCC (red wire, left side) connected to Vdd1 and Vdd2 on the motor boards.  That means the motors are all driven off of the same power source as the logic controls.

GND goes through a few capacitors (C3 north-northeast of GND, C4, C5), before arriving at the Vcc1 and Vcc2 pins on the motor boards.  Note: the C3 label appears twice.

The InA1/B1/A2/B2 pins are used to control the motor power feeds.  These are fed from the 14- and 16-pin signal distribution chips.

There are 000 "resistors" working as jumpers across traces on the board.

Interestingly, there are terminal points for U+/- and D+/-.  They weren't wired originally.  I think perhaps a higher priced version of the toy has other capabilities, or maybe it's a multipurpose board that allows for use in different kinds of toys.

The chip power actually goes through what appears to be a 2.8v or 3.0v voltage regulator.  It's marked 7560-1 but good luck finding a datasheet.  I just measured the three terminals on one side and got 0V, 5V, and 3V, when GND and VCC were connected to USB power.  So that means Vcc pins are at 3V.  The datasheet mentioned earlier says the MX1508 can run in the range 1.8-5V.

The 3V line from the regulator connects to the LED+ terminal and also to the pins feeding the 14-pin and 16-pin chips.

 

14-pin board:

14p1 -  R13 (102) - U+ terminal - 1508a InA2 (MDB)

14p2 - 1508a InB1 (MDB)

14p3 - 1508a InA1 (MDB)

14p4 - missing component - 5

14p5 - 16p-6

14p6 - (16p-7) and (14p6 - 103 - 3.0v) -- so perhaps a shared pull-up resistor?

14p7 - 102 - L- (LED A) (damaged pad) -- small current-limiting resistor; assume 1.8v voltage drop in LED and we have about 12mA going through?

14p8 - 102 - L- (LED B)

14p9 - 1508b - InB2

14p10 - 1508b - InA2

14p11 - 3.0v

14p12 - 1508b - inB1

14p13 - 1508b InA1

14p14 - R14 (102) - D+ terminal - 1508a InB2 (MDB) -- presumably the 100 ohm resistor weakens the lift arm so it can stall without grinding gears off.