Go Down

Topic: Advanced crane claw game (Read 290 times) previous topic - next topic

studiopaul

Hi,  Im glad to have made the decision to learn about Arduino and join the Forum.
I am a Newbee and im sure most of you were at some point.
I have watched a lot of tutorial videos, read other projects and are now scanning the forums.
There is a lot of good information out there, but I don't think I have seen a project that fits all the criteria of what I want to build, hence posting here to get some ideas and feedback before I begin.

Heres the functions I would like to implement on arduino UNO to start and as it becomes more complex, then migrating onto another board.


Power supply on, boot arduino with necessary program, functions as follows.

1. coin up mech =  credit input activates start button sequence .                               
I would like to incorporate adjustable payment system 25c per play and variables up.                                                                                                                       

1.B = At some point I want to maybe incorporate a bill acceptor
or RFID card system,  used for credit and that will link data from prize payout back to the card.  (I have been using USB readers with keyboard emulation)

2.   Start button = activates game play & timer that can be adjusted, once timer is reached it will start program for automatic crane drop (Z) and claw grab = solenoid activated.
   
3.   Solenoid program = adjustable in strength with a randomizer or percentage adjuster that grips at full strength    at 10% up to 50% of the time.     
                                               
4.   Joystick = Regular arcade 4 switch (8 way function) to move x, y  or X+Y

5.   Drop Target button = bypasses joystick, drops Z  adjustable rate and length, then activates Grab (Solenoid program)

6.   Return to HOME = program raises crane claw Z and then returns to dispenser shoot  (predetermined left front corner) then opens claw to release prize.   
   
7.   Option here is:  servo trap door to release prize, then reset to start of program…



If I get this far I would then like to start to incorporate new additional functionality as follows;

                                 
8.   im investigating is an rfid reader inside machine,  prize is read (say a reel or object with rfid tag programmed with vales.) once tag has been read a servo can then convey the prize back onto playfield.

9.   Reader transmits signal to customer ID tag or card and then transmitted back to computer to confirm.


10.   Sound triggers maybe used with each function and a music background track
Playback using micro SD card player or memory card.
I would like something of 16bit quality and easy to load new sound and music.


Aesthetically speaking once all programming and Logic functions have been figured out I would also like to DMX a light or led screen that may include fun instructions.


Yes I understand its a lot of project so I want to start basic,  say  X-Y axis movement using joystick live without using GRBL. and I would like Arduino to handle these functions independently unplugged from a laptop or personal computer.


I plan to start basic, I have Purchased;

http://www.ebay.com/itm/Arduino-CNC-Kit-w-UNO-Shield-Stepper-Motors-DRV8825-Endstop-A4988-GRBL-US-H/272573229668?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2057872.m2749.l2649

following these instructions and other online vids
https://www.zyltech.com/cncs.html

Kit includes;
1x Arduino Uno,
1x CNC shield
4x daughter buffer cards,
3x servo motors.
3x End stop switches

I have a heavy duty SMPSU voltage outputs are 5v , 12v  24v  48v

1x arcade Joystick = 4 switch 8way arcade Joystick.

Im about to order the 4th stepper motor

(I have no pcb jumpers to activate the cnc shield options on pcb, so its time to order them along with a 4th servo for the conveyer /dispenser option. )



Other fun parts im playing with are;

U-disk audio player SD card voice MP3 Sound module WTV020-SD-16P
For sound trigger testing

DLP Design DLP-RFID1 RFID Reader/Writer ISO 15693, ISO 18000-3
For RFID tag.


I have checked my arduino boards, I have loaded up basic led flashing codes and played with a bit.

 I have connected stepper motors on test function, but were hesitant until I understand the correct jumpers for my set up on the CNC shield.
Although I do like learning from mistakes, I think I should refrain from burning or damaging components out of stupidity and being eager.


So this is my way of saying hi, getting my feet wet and absorbing as much info I can from the huge resource here.
Any advice, guidance, suggestions or interest would be greatly welcome.
In the mean time I will be ordering parts and going through more of the lessons forum and looking for more online resources.

Thank you!

Robin2

What ever project you are building develop it is the smallest possible steps, learning and testing each part thoroughly before moving on to the next part. And only start bringing the parts together after you can get them all working separately.

Don't be surprised to discover that your initial concept of how to do something is not the best. As you learn, your approach to things will change.

IMHO you should leave everything to do with money (coins, bills) until you have the rest of the thing working.

...R
Planning and Implementing a Program
Two or three hours spent thinking and reading documentation solves most programming problems.

wvmarle

I'd start with the control of the crane, then the control of the claw. That'll be hard enough - especially making it robust enough that it works one time, every time. I hope you understand what usually happens when the machine takes a coin and then doesn't operate? You'll want to make pretty darn sure that this doesn't happen, and if it happens, that the machine can handle the consequences.

When that works you can start adding the extra buttons, the coin op, sounds, etc.

Do those things really use servos? Not regular motors with end stops?
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

studiopaul

yes this is a concept and to see if it can be achieved plus my personal education.
 These will not be at your local walmart or farming for coins at any arcade.

thanks, yes as stated 8 way joystick operation first. x-y and z

Im going to start looking at the pins I/O first to see which pin will be used and then whats remaining for available use.

I was looking for anyone that had experienced anything like this using the CNC board without GRBL. No computer to drive the co ordinates. Just joystick and end limits switches.


groundFungus

#4
Oct 07, 2017, 02:31 pm Last Edit: Oct 07, 2017, 02:32 pm by groundFungus
The CNC shields that I know of use stepper motors with stepper drivers, not servos.

Quote
4x daughter buffer cards,
What are those?

Robin2

I was looking for anyone that had experienced anything like this using the CNC board without GRBL. No computer to drive the co ordinates. Just joystick and end limits switches.
There should be no problem controlling the stepper motors with your own program. These links may help
Stepper Motor Basics
Simple Stepper Code

also look up the AccelStepper library

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

studiopaul

The CNC shields that I know of use stepper motors with stepper drivers, not servos.
What are those?
Sorry, stepper.. not servos..hmm i think i needed more coffee when typing that!

studiopaul

There should be no problem controlling the stepper motors with your own program. These links may help
Stepper Motor Basics
Simple Stepper Code

also look up the AccelStepper library

...R

Yes I believe I also read your test code..I powered system and can hear the stepper, but no steps as of yet..powered off until i get my pcb jumper pins that I'm missing.. I need to look at switch inputs for my up, down left right.. check the inputs to see if they then register to an output.

studiopaul

#8
Oct 12, 2017, 09:22 pm Last Edit: Oct 12, 2017, 11:54 pm by studiopaul
Having an issue with the current set up.

Im running a MacBook Pro OSX 10.9.5
Arduino 1.8.5 hourly build 2017/10/11 12:12 (working well)


grblUpload = gbl 0.9j


Question for grblUpload,  how do I verify which build?


Serial Monitor has sometimes restarted my computer, upon reboot I can activate codes "$" help etc..

after completing the upload, I quit out of Arduinio

then RUN

Universal Gcode Sender (version 1.0.9 / Nov 11, 2015

Issues so far are..
1. have to type in the port device  (as used in arduino for usb to connect port, but appears to work!)

2. I am able to x- x+   y- y+  z- z+  and hear the motors hum in the amount of time/steps that are meant to move,, However torque is applied to the shafts,  BUT NO MOVEMENT!!!

if tried to research the pins and have seen a few discrepancies.

My stepper motors are;  17HD40005H-22B (zyltech)

there website = https://www.zyltech.com/cncs.html

shows

Nema 17 stepper motor wiring with DRV8825 (I'm using DRV8825 purple board with correct orientation)
but when looking closely at the wiring in the picture it shows

Blue = top pin,
Red
black
green = bottom pin

my stepper motors were pre wired to socket as

Blue
Red
Green
Black

so are wondering if the manufacturer crossed over green and black by accident.

I have no jumper pins set on the CNC board and should be fine with full step.

CNC is powered by a SMPS 12v:6A MAX supply.

CNC board is the red board Probably a China clone, not sure how to see which version.

Any one have any suggestions?

I have been reading this page also to see if its an issue on CNC to arduino issue
https://forum.protoneer.co.nz/viewtopic.php?f=17&t=69

Thanks for your help!



studiopaul

I tried LED trick to show that the wires are in pairs,

BLUE & RED
GREEN & BLACK

not sure if polarity on each would be correct

studiopaul

#10
Oct 12, 2017, 10:20 pm Last Edit: Oct 12, 2017, 10:37 pm by studiopaul
I switched black and green, sounds more higher pitch, Changed back as i don't think this is the issue.

CNC Shield is ver 3.00  robotlinking.com 

im suspecting error program = pinout issue?

Robin2

You need to measure the resistances of the motor coils with your multimeter to know which pairs of wires belong to each coil.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

studiopaul

#12
Oct 12, 2017, 11:57 pm Last Edit: Oct 13, 2017, 12:03 am by studiopaul
yes the pairs are correct, = 2.3 ohms   was wondering if anything to do with polarity although it is just a coil as they pulse around in steps.. ?

Robin2

I think if the polarity is "wrong" the motor will go in the wrong direction.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

studiopaul

#14
Oct 13, 2017, 01:34 pm Last Edit: Oct 13, 2017, 03:05 pm by studiopaul
with 2 coils ? one wired in correct polarity and 1st step sequence pulse and then second in reverse polarity 2nd step sequence pulse? would it not cause the stationary buzz?

now I'm more aware of the real products out there I won't be buying kits from USA distributors using China copies!

Ive been reading some more and have found some people say that the v3 "knock off board" either has incorrect pin configuration and will only work with GRBL 0.8
Can anyone here verify or validate that?

If there is a tutorial on how to edit config to repair issue with 0.9?

reading and trying to understand this article below in link;

http://diyprojects.eu/arduino-cnc-shield-version-3-0-with-grbl-v0-9/

being that I'm learning ad don't want to hack the system to pieces or cause damage to the drivers, I would like to know if anyone has experienced this and if there is a step by step guide.
Considering that V3 boards are very common, I would have though there was a simple guide for Newbies such as myself.
I don't expect everyone to do the work for me,, but would like to know in layman's terms and a confirmation that this set up will actually work.

The variables i think that could potentially be the problem are;

CNC Shield v3.00 (copy) incorrect pin out?
GRBL 0.9 incompatible??
Stepper Motor... wiring or settings/acceleration/step jumpers/ voltage ref.??

Should I now move or create a Thread in another part of the forum to aid in fault finding?
Thanks for your help!
 
 

Go Up