Claw Machine Claw Test

*Arduino module

*Button/limit switch

*Breadboard

*Claw from claw machine - https://www.ebay.com/itm/48V-S-M-L-Size-Toy-Candy-...

*Diode (SR560 - https://www.amazon.com/CHANGRUN-Schottky-Barrier-R...)

*Power supply for claw (48V)

*& wires

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Wiring

*Make sure power is off first* The GND from BOTH of the Arduino & the external power source. Connect the positive end of the claw to +48V with the diode in parallel (the diode in between power & the solenoid positive with the white piece facing positive and the black between the negative part of the claw & the collector of the transistor). Connect the negative end of the claw to Collector (C). Connect GND to the Emitter (E) of the transistor. Connect the Base (B) of the transistor to an Arduino pin (7). Connect GND from the Arduino to the NO (normally open) part of the button. Connect the COM of the button to an Arduino pin (8). *Make sure to connect the power source before moving on to the next step.*

Step 2: Coding

Here is the code for running a button from the Arduino to the transistor, to the claw.

#define solenoidPin 7 //This is the output pin on the Arduino we are using
#define button 8

void setup() {

pinMode(solenoidPin, OUTPUT); //Sets the pin as an output

pinMode(button, INPUT_PULLUP); }

void loop() {

while(digitalRead(button) == LOW){

digitalWrite(solenoidPin, HIGH); }

digitalWrite(solenoidPin, LOW); }

Step 3: Press the Button & Pick Up the Claw!

Step 4: Troubleshoot

Got any problems? Let me know down below. Here are a few common problems:

*The transistor is hot - connect in the diode that is rated to handle the claw.

*My claw isn't working - did you connect it? If so, then, make sure that the connections are secure, the transistor is in all the way, and that the claw isn't broken.

*The button isn't working - make sure to connect it properly & that the code is correct.

Be the First to Share

    Recommendations

    • CNC Contest

      CNC Contest
    • Make it Move

      Make it Move
    • Teacher Contest

      Teacher Contest

    Discussions