Welcome, Guest. Please login or register.
November 23, 2024, 11:49:04 AM

Login with username, password and session length
* Home Help Arcade Login Register
.
+  Forum
|-+  Other Hobbies and Interests that our NLG members enjoy.
| |-+  Other Hobbies and Interests
| | |-+  New Slot Machine CPU project
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: New Slot Machine CPU project  (Read 18076 times)
BobPrescott
New NLG Member 1 to 100 Post
**

Total Karma Storms: 6
Offline Offline

Posts: 31



« on: May 04, 2012, 11:14:09 PM »

I have a new project. I decided to make a CPU for my slot machine.

A while back I got a Summit Autoslot in need of lite repair and some restoration, so I lurked around here, picked up some tips and bought a manual online. The manual was really useful, even if the schematics were so-so and hard to read.  Blurry. I got the machine working.
In the manual there was a reference to a test board that Summit once made. It let the tech set switches and had testpoints for readings. I got to thinking that I could build a test board too. How hard could it be?

There are plenty of free PCB design software packages out there. I looked a a half dozen and settled on Eagle, from Cadsoft. The free version does just about everything, and I've used it recently.

http://www.cadsoftusa.com/

Well, the board expanded. The more I thought about it, the bigger it got. Rather than lights and switches, I'll add a USB connection to funnel the data to my PC. Rather than design my own computer, I'll use a Arduino single board computer. Arduinos are available everywhere (Radio Shack, Amazon) and have a lot of support in the hobbyist community, tons of kits and tutorials and examples. Cheap too, and the Arduino community has free Eagle PCB daugtherboard examples, they call them Shields.
I'll make a Shield the size of the Summit CPU, plug in an Arduino, and POOF!!, instant slot machine test board.

Arduino has a half a dozen models. I picked the Arduino Mega2560 because it has 55 digital i/o lines, that sounded like enough to me. It can also be powered off of an external 5v supply, like the Summit already has.

The Summit Autoslot has two boards, a CPU and an interface board. I'm keeping the interface board. It has 22 optocoupler/triac pairs and handles all the AC connections for the lights, solenoids and hopper. All I have to worry about is the digital side.
Piece of cake. Right?

Here is a picture of the original Summit board on the left , and my first attempt on the right.


* One.jpg (208.48 KB, 1687x719 - viewed 817 times.)
Logged

Re-inventing the wheel.
BobPrescott
New NLG Member 1 to 100 Post
**

Total Karma Storms: 6
Offline Offline

Posts: 31



« Reply #1 on: May 04, 2012, 11:16:08 PM »

Another couple of pictures, with the Arduino Mega2560 attached.

Is the right forum for stuff like this?

Bob


* two.jpg (196.15 KB, 946x845 - viewed 676 times.)

* three.jpg (151.16 KB, 868x768 - viewed 743 times.)
Logged

Re-inventing the wheel.
BobPrescott
New NLG Member 1 to 100 Post
**

Total Karma Storms: 6
Offline Offline

Posts: 31



« Reply #2 on: May 06, 2012, 07:35:33 PM »

Let me update where I am.
All of the hardware interfaces check out, save one.
From a terminal on my laptop I can switch each light except one.
The seven segment displays work.
I can read the reel sensors, run the hopper, release the handle.
I can read the five input switches; coin in, coin out, jackpot reset, handle pulled, and door open.
I can stop the reels on command.

To do list...
Tower light in-op, I may have misread the schematic.
I found the hopper full/coin diverter had been disabled (wire cut), I may leave it that way. I'll never fill the hopper anyway.

I've started on a GUI for the laptop, made good progress. I hope to post a picture soon.

Bob Prescott
Logged

Re-inventing the wheel.
a69mopar
647-402-1977
Global NLG Site Moderator
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 600
Offline Offline

Gender: Male
Posts: 3508



WWW
« Reply #3 on: May 06, 2012, 11:13:51 PM »

Very interesting project Bob.  Thanks for posting

Wayne
Logged

         www.GTASLOTS.com      647-402-1977              BALLY S6000 GALLERY
BobPrescott
New NLG Member 1 to 100 Post
**

Total Karma Storms: 6
Offline Offline

Posts: 31



« Reply #4 on: May 12, 2012, 10:42:19 AM »

Here is my GUI, mostly done.
You have your bell and LED test on the right.
The light buttons toggle lights off and on.
Hopper test in the middle.
On the left is the handle release and the reel strips.
When the reels are spinning you can halt them immediately by the three stop buttons on top, or select a reel symbol with your mouse and use the stop buttons at the bottom.
It's not perfect yet, sometimes it halts off a position. I need to work on the timing.
The text box on the right is for getting debug messages. In this case I tried to stop reel three at position 16, which was "three bars". The reel sensors "A" and "B" should have both been "1". Instead, sensor "A" was a 0, the reel stopped at position 17, a blank.


* summittester.jpg (330 KB, 1311x964 - viewed 759 times.)
Logged

Re-inventing the wheel.
dhellis
Contributing NLG Member
NLG Member 101 to 500 Post
*

Total Karma Storms: 56
Offline Offline

Gender: Male
Posts: 172



« Reply #5 on: May 18, 2012, 01:45:19 PM »

This is one of the coolest projects that I have seen. I have a Summit and for those of us that
were unaware of what we bought having one of these things would be very cool.

Nice work Bob
Logged
BobPrescott
New NLG Member 1 to 100 Post
**

Total Karma Storms: 6
Offline Offline

Posts: 31



« Reply #6 on: May 18, 2012, 04:48:14 PM »

Next on the agenda is to write a slot program, so it runs like a normal slot until a USB is plugged in, then switches to maintenance mode.
I would like to add sound and flash the lights during payout also.
And, and, and. If I can find a three line glass to replace the one line, that would be cool too.
The ideas keep on rollling.
Bob
Logged

Re-inventing the wheel.
BobPrescott
New NLG Member 1 to 100 Post
**

Total Karma Storms: 6
Offline Offline

Posts: 31



« Reply #7 on: May 18, 2012, 04:55:53 PM »

Do to overwhelming demand (one person) I'm going to fill in a few details.
Let me start with my tale of woe picking a schematic package.

I said I picked Eagle software from Cadsoft  because I had used it before, it does everything, and is free. Well, I might have exaggerated that last part. I had confused the free version with the "Hobby" version. The main restriction with the free version is that it is limited to 2"x3" board, the Hobby version does up to 4"x6".  I needed 4"x5". Not till I was mostly done did I find my error. The edge connector is 4.5" wide, would not fit on the 2"x3" board. Everything else fit.

So back to square one. Who else makes free schematic/PCB software? Seems lots of folks do. PCB123 is another full system.  It does everything, nice library. The library has a really cool feature, parts are cross referenced with DigiKey part numbers. That's a huge plus in my books.  The down side? It's tied to only one PCB house. Not at all unreasonable. It's their software, they let you use it free, you should use their house. Kicker is the pricing. For a 5x6 board it's $30 each, in quantity of 25. $196 each in quantity of two. Arrgh. If I was making a board for work and needed a couple of dozen, perfect.

PCBArtist from http://pcb-artist.en.softonic.com/ is equally good as PCB123 but has the same drawback. Tied to one PCB house.  Also has good prices, IF you need a bunch. Full featured. I have to pass.

ExpressPCB/ExpressSCH looked OK at first, but looked cluttered and dated as more componets were added. The componets look like someone opened a data book and redrew by hand. Often, pins in numeric order instead of functional order, like everyone else has them.  Inputs and outputs not lined up across IC's, stuff like that. Schematic crud. I'll pass.

I tried a couple of others also, names escape me.

So back to Eagle. My boss sprung for the $169 hobbyist version. Still free for me. And it is for my hobby, not for work.

Mean people have pointed out that we spent more for the Eagle software than I spent for the Summit Slot Machine.
Bob
Logged

Re-inventing the wheel.
BobPrescott
New NLG Member 1 to 100 Post
**

Total Karma Storms: 6
Offline Offline

Posts: 31



« Reply #8 on: May 18, 2012, 05:21:22 PM »

Now what?
Have to make a board.
Excellent tutorials on line.

http://aaroneiche.com/2010/06/24/a-beginners-guide-to-making-an-arduino-shield-pcb/

and

http://www.sparkfun.com/tutorials/109

both with examples geared toward Eagle software.

Now to find a manufacturer. A google search for "PCB Prototype" shows the variety available.

rushpcb  (http://www.rushpcb.com/index.aspx) has cheap introductory prices, three boards for $10 each. Can't beat that.
However I've used them before, so  no introductory price for me. Bummer.

I picked BatchPCB
http://batchpcb.com/index.php/Products

They batch up a bunch of small jobs and summit as one big order. Better prices that way.
Not fast, but reasonable. In two weeks I had my board. I was off on vacation anyway.

Bob
Logged

Re-inventing the wheel.
BobPrescott
New NLG Member 1 to 100 Post
**

Total Karma Storms: 6
Offline Offline

Posts: 31



« Reply #9 on: May 18, 2012, 06:54:51 PM »

Danger Will Robinson. DANGER! (I date myself) Don't try this at home, I'm a trained professional.

Issues with the ArduinoMega. Smoke issues that I barely avoided.

One reason that I picked the ArduinoMega was that it could be powered off of USB, or an external wall wort (9-12 volts DC) OR external 5VDC. Earlier versions of Arduino worked this way, and the Mega was advertised this way.

But, NNoooooo.

While lurking on the Arduino forums, after ordering my board, but before powering it, I read that people were having smoke issues. Burnt parts. Burnt fingertips. Dead boards. The boards would work alone with 5 volts, would work with wall wort, would work with USB. But, run the board off of 5 volts with the USB connected and bad things would happen. Very bad things. Worse, this is Exactly the way I want to run my board.

With the Mega, unlike previous versions, the external 5 volts and the USB are connected together, the USB interface chip will  take the brunt of it, burning up  in a few minutes. I suspect that this couldn't be good for whatever PC was connected, but no one has complained on the forum.
Arduino offered a solution and the forums offered two workarounds.

Arduino's solution was to change the board description, external 5V operation is discourged. (Supplying voltage via the 5V or 3.3V pins bypasses the regulator, and can damage your board. We don't advise it.)   SOME Arduino pages have been updated.

One work around is to remove the transistor from the board that is suppose to swap between supplies. Second work around (the one I chose) was to modify a USB cable. Clip the RED wire.
Bob
Logged

Re-inventing the wheel.
dhellis
Contributing NLG Member
NLG Member 101 to 500 Post
*

Total Karma Storms: 56
Offline Offline

Gender: Male
Posts: 172



« Reply #10 on: May 18, 2012, 07:12:56 PM »

Oooh, now I wish I had asked you about this in the email that I sent you.

I like your idea of a modified USB cable, I would tag that puppy though or
you may find yourself scratching your head wondering why the next thing
you use it on doesn't work.

The other thing I have learned is that once you let the smoke out of
your electronics, it is pretty hard to put it all back in.
Logged
TZtech
Contributing Gold NLG Member
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 129
Offline Offline

Gender: Male
Posts: 1113



« Reply #11 on: May 18, 2012, 07:41:31 PM »

Cool Project - Keep us updated

I have not personally tried them but have seem them recomended on several other forums - http://iteadstudio.com/store/index.php?main_page=index&cPath=19&zenid=toj5qgh91qi5gtvo0vl72c0k01

They also have Mega clones - Maybe these dont suffer from the PSU issue
Logged
BobPrescott
New NLG Member 1 to 100 Post
**

Total Karma Storms: 6
Offline Offline

Posts: 31



« Reply #12 on: May 21, 2012, 08:39:21 PM »

I thought I broke my machine.
I didn't, but I thought I did.

I was testing the hopper control. There are two control lines from the controller to the hopper (via the interface board) One labeled hopper-run (HPRN) the other hopper-safe (HPSF). The hopper-run is kinda self explanatory, not much information about the hopper-safe. I had been pulling it low. The only information I found on line was at http://hms-electronics.com/slot_machines/control_circuits.htm which says the hopper-safe is a pulse which keeps the hopper from timing out. So I tried a few  differant pulse types, then

AAAAAARRRRRRRRORORORORORRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRARARARARARAR

Bad noise. Unplug machine. Restart, try another payout.

AAAAAARRRRRRRRORORORORORRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRARARARARARAR

Bad bad noise again. Unplug. Now I'm worried. I put the factory board back in and feed nickels until I get a payout.

AAAAAARRRRRRRRORORORORORRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRARARARARARAR

Bad bad noise with the Summit board. Time to pull the hopper out.
Lucky.  It wasn't the end of the world after all. When I filled the hopper, somehow a quarter had fallen in with the nickels. Quarter jammed, that was all.

On the brighter side, it did give me the incentive to bring a Oscope home. The hopper-safe turns out to be a five Hz squarewave, running at the same time as the hopper-run is low.
Bob
Logged

Re-inventing the wheel.
dhellis
Contributing NLG Member
NLG Member 101 to 500 Post
*

Total Karma Storms: 56
Offline Offline

Gender: Male
Posts: 172



« Reply #13 on: May 21, 2012, 08:50:43 PM »

I thought I broke my machine.
I didn't, but I thought I did.

I was testing the hopper control. There are two control lines from the controller to the hopper (via the interface board) One labeled hopper-run (HPRN) the other hopper-safe (HPSF). The hopper-run is kinda self explanatory, not much information about the hopper-safe. I had been pulling it low. The only information I found on line was at http://hms-electronics.com/slot_machines/control_circuits.htm which says the hopper-safe is a pulse which keeps the hopper from timing out. So I tried a few  differant pulse types, then

AAAAAARRRRRRRRORORORORORRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRARARARARARAR

Bad noise. Unplug machine. Restart, try another payout.

AAAAAARRRRRRRRORORORORORRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRARARARARARAR

Bad bad noise again. Unplug. Now I'm worried. I put the factory board back in and feed nickels until I get a payout.

AAAAAARRRRRRRRORORORORORRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRARARARARARAR

Bad bad noise with the Summit board. Time to pull the hopper out.
Lucky.  It wasn't the end of the world after all. When I filled the hopper, somehow a quarter had fallen in with the nickels. Quarter jammed, that was all.

On the brighter side, it did give me the incentive to bring a Oscope home. The hopper-safe turns out to be a five Hz squarewave, running at the same time as the hopper-run is low.
Bob



I am trying to keep up with this. When you said that you put back the factory board, was that the factory interface board or was it just the CPU board itself? I am thinking it would be the CPU board because it seems your fear was that you may have blown your Arduino?

By the way, the info at the bottom of Dick Harkey's page is pretty interesting.

"MOC3030 is a zero crossing type (eliminates EMI from coils)

MOC3009 is non zero crossing (used for lights).  Used on the stop solenoids."

Logged
BobPrescott
New NLG Member 1 to 100 Post
**

Total Karma Storms: 6
Offline Offline

Posts: 31



« Reply #14 on: May 21, 2012, 10:00:59 PM »

dhellis,
That was the factory CPU I put back.
I'm using the factory interface card all the time.
I thought that maybe I had blown the hopper interface, or the motor.


TZtech
 those clone Arduinos might work better, hard to tell. I think next one I buy will be a knockoff, just to find out.

Bob
Logged

Re-inventing the wheel.
nightmaretony
In Remembrance of our lost NLG Members
New NLG Member 1 to 100 Post
*

Total Karma Storms: 100
Offline Offline

Posts: 54



« Reply #15 on: May 22, 2012, 06:57:07 PM »

VERY NICE PROJECT, BOB! IT ROCKS!!!

Good luck, but yup, the power issue a bad flaw... at least you got a handle on it.





Am working on a Bally 1000 setup myself. Designing a new RAM board and planing a hacker's CPU as well for it based off my new pinball motherboard.

And for software? KICAD. Open source and NO size restrictions.

http://www.nightmarepark.com/6502/Pinball%20Mind/Pinball%20Mind%20partially%20stuffed.jpg (here is my pinball and bally 1000 new mamaboard partially stuffed) It is directly from Kicad.
Logged
BobPrescott
New NLG Member 1 to 100 Post
**

Total Karma Storms: 6
Offline Offline

Posts: 31



« Reply #16 on: May 22, 2012, 10:00:47 PM »

That's SWEET nightmaretony

KICAD was one I did not evaluate, but I later saw a lot of great reviews about it.
I'll have to give it a try, I've downloaded it, but not installed yet.
Too many choices.

Bob
Logged

Re-inventing the wheel.
nightmaretony
In Remembrance of our lost NLG Members
New NLG Member 1 to 100 Post
*

Total Karma Storms: 100
Offline Offline

Posts: 54



« Reply #17 on: May 22, 2012, 10:02:43 PM »

If you give it a shot, throw me an email anytime on questions. I am still not full on the features but can find the way around it.

Love your PC controller program right there. (bows)
Logged
BobPrescott
New NLG Member 1 to 100 Post
**

Total Karma Storms: 6
Offline Offline

Posts: 31



« Reply #18 on: May 27, 2012, 08:06:11 PM »

Kinda Weekly Update...  nothing.

Truth is, Arduino has been kicking my butt. It's been killing me for weeks, but came to a head this week.
I had a lot of what seemed to be good reasons to pick the ArduinoMega2560. In retrospect, they are all still sound good today, but the kludgeiness of the Arduino team is wearing me down. Beating me into the earth.

The Mega2560 R3 has upload issues. Sometimes you can upload a program, sometimes you can't. The Arduino Mega2560 R3 and the Arduino IDE 1.0 don't play well together. Some people (like me) get timeout errors. Timeout errors appear to worsen with programs that are large and use the USB connector. I can't be sure the problem is USB related, but that's my impression.
Trivial programs like the Aruduino example programs mostly work. That is, if an example program is running and you load another example, that fine. Run a large program and then try to load an example, not so good.

I don't post often, but I am a frequent lurker on the Arduino forums. Many people have reported the same problem. Many posters, for months. This is not a new or unknown issue.
The Arduino Team members who frequent the forums were 0 help.

By trial and error, I found a nine step system that works.
1 Hit upload. Upload hangs. Always hangs on first attempt.
2 Hit upload a second time. Get a "comm port in use" error.
3 Unplug USB from PC
4 replug USB
5 Hit upload. Get a "comm port not found" error
6 unplug USB from PC
7 replug USB
8 Wait five seconds.
9 Hit upload. Success!!! Most of the time step nine works.
(side note, NEVER use three exclamation points in a row or the upload will never work. I'm not kidding, two is the max allowed.)

Any idea how frustrating it is to make a small change and attempt to test it, only to take 45 minutes getting to the point where you can run the 10 second test?

Another suggestion from the forum was to hold down the reset button for several seconds after hitting upload, then, LIKE MAGIC, things will work sometimes. Kinda works, but with my board, the reset button is not accessable anyway.

A Fix....
OK now, Arduino IDE uses a separate upload program (ARV). It's transparent to the user, but it's there. A couple (several) forum posts suggested to overwrite the up-loader in the IDE 1.0 folder with one from an earlier version. Specifically, one from IDE 0022 or IDE 0023. I over-wrote the uploader with that from IDE 0022 and guess what?? NO MORE PROBLEMS!! (<- note, only two exclamation points, don't tempt fate)
Note: above fix came from forum users, not Arduino team.

And Yes, it took me too long to try this. I was both incredulous that the Arduino team wasn't more proactive, and HOPEING that when version IDE 1.01 came out the problem would go away. It didn't.

So, with IDE 1.01 and ARV from 0022 I have never one had an upload failure.

So now I'm back in business.
Happy trails.

I'll stick with Arduino for now, but any more surprise issues and the whole lot gets chucked across the room.
Bob
Logged

Re-inventing the wheel.
nightmaretony
In Remembrance of our lost NLG Members
New NLG Member 1 to 100 Post
*

Total Karma Storms: 100
Offline Offline

Posts: 54



« Reply #19 on: May 27, 2012, 08:27:33 PM »

For the example and larger programs, is there a way to clear the program memory? It might be an end of program thing as a leftover which can confuse a program.

For the usb timeout errors, methinks it may be more due to the Atmel chip syncing up correctly with the protocol used for uploading. Methinks that was not an issue for tiny programs used for testing the units, so this issue was never noted in the original IDE programming. This is more their ptotocol design fault rather than a USB issue.

That sucks where the Arduino team is not much help in their forums on that issue. Support is one thing that is always important to me. Still glad you got something going there.





As a small history on my own board, Arduino didnt exist when I started my own design. Been having some fun user and company support on 6502.org since that is what I am using for it. But it is also an original design gig.

Logged
ramegoom
Contributing NLG Member
NLG Member 101 to 500 Post
*

Total Karma Storms: 40
Offline Offline

Posts: 183



« Reply #20 on: April 03, 2013, 10:50:56 PM »

Bump for the latest on this. Very interesting.
Logged
Op-Bell
Contributing Gold NLG Member
Sr.NLG Member 501 to 1000 Post
*

Total Karma Storms: 326
Offline Offline

Gender: Male
Posts: 854



« Reply #21 on: July 18, 2013, 03:50:11 AM »

Sounds like a fairly advanced project, Bob. If I can make a comment:

Clipping the red wire on the USB cable isn't a good idea, because almost all USB interfaces detect the presence of 5V on that pin to determine whether or not they're connected to a host. A lot of your download connect problems could be for that reason. If the interface doesn't detect the 5V pin rising, it may not drive the correct "present but disconnected" voltage levels on the bus and the hub may not spot it. Also it will not disconnect and go idle when you pull the plug out of the hub, so when you replug it and the host asks it to identify itself, it will reply "WTF" or something equally irritable.

I took a look at the Arduino schematic and can see the problem. IC7B is comparing the input voltage to the USB voltage and will turn on the transistor T1 (allow USB power) if the input voltage is less than 6.6V. If you are supplying only 5V, the power inputs will always be connected together. The only solution to this is to cut transistor T1 out of the circuit - cutting its leads from the body with a sharp X-Acto knife is the best way to deal with such tiny things without screwing up the PCB. That leaves USBVCC alone to go to pin 31 of IC4, where it can do its job of detecting connections.
Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  


If you find this site helpful, Please Consider Making a small donation to help defray the cost of hosting and bandwidth.



Newlifegames.com    Newlifegames.net    Newlifegames.org
   New Life Games    NewLifeGames  NLG  We Bring new Life to old Games    1-888-NLG-SLOTS
Are all Copyright and Trademarks of New Life Games LLC 1992 - 2021


FAIR USE NOTICE:

This site contains copyrighted material the use of which has not always been specifically authorized by the copyright owner.
We make such material available in an effort to advance awareness and understanding of the issues involved.
We believe this constitutes a fair use of any such copyrighted material as provided for in section 107 of the US Copyright Law.
In accordance with Title 17 U.S.C. Section 107, the material on this site is distributed without profit to those
who have expressed a prior interest in receiving the included information for research and educational purposes.

For more information please visit: http://www.law.cornell.edu/uscode/17/107.shtml.

If you wish to use copyrighted material from this site for purposes of your own that go beyond fair use,
you must obtain permission directly from the copyright owner.

NewLifeGames.net Web-Site is optimized for use with Fire-Fox and a minimum screen resolution of 1280x768 pixels.


Powered by SMF 1.1.20 | SMF © 2013, Simple Machines
Loon Designed by Mystica
Updated by Runic Warrior
Page created in 0.132 seconds with 20 queries.