Close

Toy Claw Machine Build

A project log for Toy Claw Machine

Full size Claw machine made from misc. parts.

willbadenwillbaden 02/27/2014 at 03:180 Comments

As I gather more documentation and pictures for this build, it is planned to add later on.  As for now:

Hardware:

Processing power 16F870 @ 20 MHz

Limit switches gnd out the PICs input and inputs utilize a 1K pull up resistor

PIC sends step/dir signals to all three axis using a timer interrupt to keep the correct step pulse rate.

Watchdog timer used to make sure the interrupt timer is still active and to detect if the steppers should be enabled, but the claw drop button is not active.

Port B interrupt used for claw drop button

Left RX/TX  pins open to allow for expansion for computer control (or external uC)

Program structure:

Normal operation uses the interrupt timer for stepping the steppers the correct direction (this is both used for the joystick operation and the homing operation)  The sub will contain checks to see where the state machine is at and if it will allow for the axis to move (I didn't want to be able to move the X and Y axis if the claw is raising/lowering)

The main program (not within the timer interrupt) is a state machine and loop within a state until the prescribed move on condition is met.

Claw drop button uses the port b interrupt along with a short debounce to keep out any noise from interfering. 

Once the claw drop button has gone active and passed the debounce check, then lower the claw for a predetermined amount of time, close the claw (under full 24V power) then raise claw back up until z axis upper limit is active.  Then home machine to prize drop corner.

The program is written in asm as that is what I am familiar with.


Discussions