Welcome, Guest. Please login or register.
April 25, 2024, 08:05:35 AM

Login with username, password and session length
* Home Help Arcade Login Register
.
+  Forum
|-+  Homebrew Player Tracking and EFT Systems.
| |-+  NLG Homebrew Player Tracking and EFT Systems.
| | |-+  Microcontroller SAS Project
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] 2 3 4 ... 8 Go Down Print
Author Topic: Microcontroller SAS Project  (Read 86739 times)
TZtech
Contributing Gold NLG Member
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 129
Offline Offline

Gender: Male
Posts: 1113



« on: June 03, 2012, 06:32:57 PM »

INTRODUCTION

Hi All - I previously posted here http://newlifegames.net/nlg/index.php?topic=15698.0 about my project to communicate to a SAS machine with a microcontroller instead of a PC based system.
I dont currently have a working machine or TITO hardware to test the project so will be post relevant info here in the hope that someone can use this and further develop the idea.

My main aim was to build a fit and forget box to plug into a machine and allow the user to add credits to the machine via SAS - Currently by toggling the call attendant button or automatically when the machine detects zero credits. Its clear that most US users also would like to see TITO funtionality. My proposal for home use and to keep cost down is to credit a ticket regardless if it has been previously validated. This eliminates the complexity of having to add comms between machines and keep tracks of validation numbers etc.

Would like to do this for under $20 - However for currently available off the shelf hardware cost would be closer to $30 or You would have to invest in additional equipment to program devices with.
Logged
TZtech
Contributing Gold NLG Member
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 129
Offline Offline

Gender: Male
Posts: 1113



« Reply #1 on: June 03, 2012, 06:39:01 PM »

PROGRAMMING

The project was developed using a basic compiler for PIC microcontrollers that can be downloaded from here
http://www.myamicus.co.uk/content.php?245-Free-AMICUS18-Compiler

This compiler is a demo version of ProtonBasic - It has all the features of the comercial version but is limited to 2 PIC microcontroller only.
Logged
TZtech
Contributing Gold NLG Member
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 129
Offline Offline

Gender: Male
Posts: 1113



« Reply #2 on: June 03, 2012, 07:07:44 PM »

HARDWARE

There are a number of off the shelf hardware options. The official Amicus board from the developer of the software is available here.
http://www.crownhill.co.uk/product.php?prod=2203

US members can also get it from Microchip direct
http://www.microchipdirect.com/ProductSearch.aspx?Keywords=TAES001

This is the most user friendly option as the IDE for the compiler programs the board directly but is also pretty expensive and uses the 3.3v PIC 18F25k20.

My preferred board is from a British company and is available from here - Will have to enquire about availabilty from US distributers
http://shop.ciseco.co.uk/xino-pro-for-pic/
The board has an RS232 IC on board and can be ordered with the more capable 18F25K22 IC. You will however need a PC with a serial port or USB to serial adaper and the DS30 bootloader program (Also free). If You do order this specify the 18F25K22 PIC.

The third option is to use a PICAXE board and re program the IC with the DS30 bootloader code. Do do this you will need a microchip device programmer or clone. You will also need to add a RS232 interface of some kind as most machines use RS232 for SAS comms (For IGT we can use the DCS port and dont need RS232)
http://www.techsupplies.co.uk/epages/Store.sf/en_GB/?ObjectPath=/Shops/Store.TechSupplies/Products/AXE401KIT
Logged
TZtech
Contributing Gold NLG Member
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 129
Offline Offline

Gender: Male
Posts: 1113



« Reply #3 on: June 03, 2012, 07:24:31 PM »

NOTICE

The project is for home use only - Protocol info was decoded using data available on the public domain
To keep with the spirit of the project please share any updates and or improvements.
Logged
TZtech
Contributing Gold NLG Member
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 129
Offline Offline

Gender: Male
Posts: 1113



« Reply #4 on: June 03, 2012, 08:04:36 PM »

*

« Last Edit: October 19, 2012, 04:48:58 PM by TZtech » Logged
jdkmunch
Senior Full time Member.
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 624
Offline Offline

Gender: Male
Posts: 2640



« Reply #5 on: June 03, 2012, 10:04:44 PM »

That's awesome!

So let me make sure I have it correct

 1- buy the little chip thingy
 2- program it
 3- wire it into the sas serial port

once this is complete -  whenever I press the change button I get credits or if I run down to 0 I get credits
Logged
zarobhr
Contributing Gold NLG Member
Sr.NLG Member 501 to 1000 Post
*

Total Karma Storms: 178
Offline Offline

Gender: Male
Posts: 622



« Reply #6 on: June 03, 2012, 11:52:12 PM »

Quote
My proposal for home use and to keep cost down is to credit a ticket regardless if it has been previously validated. This eliminates the complexity of having to add comms between machines and keep tracks of validation numbers etc.

the only problem with this idea is there is no way of knowing the credit amount of the ticket if you dont previously validate and keep track of validation numbers and amounts
Logged
TZtech
Contributing Gold NLG Member
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 129
Offline Offline

Gender: Male
Posts: 1113



« Reply #7 on: June 04, 2012, 01:56:51 AM »

Is the value not on the barcode? From the logs that Foster posted it looks like the value is in the SAS string thats reported from the machine
Logged
Foster
The S2000 GURU
Contributing NLG Member
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 345
Offline Offline

Gender: Male
Posts: 2872



« Reply #8 on: June 04, 2012, 03:52:27 AM »

All that I can tell is no amount is coded in the validation number.
« Last Edit: June 04, 2012, 04:06:42 AM by Foster » Logged

A Slot Machine and Coca-Cola Addict!!
"If it is not broke do not fix it" I keep forgetting that!
zarobhr
Contributing Gold NLG Member
Sr.NLG Member 501 to 1000 Post
*

Total Karma Storms: 178
Offline Offline

Gender: Male
Posts: 622



« Reply #9 on: June 04, 2012, 09:26:52 AM »

Is the value not on the barcode? From the logs that Foster posted it looks like the value is in the SAS string thats reported from the machine

when you cash out a ticket the validation number and amount are sent to the host, the host records
when you redeem the machine sends the validation number to the host, the host looks up validation number, then the host sends validation number and amount to the machine, then machine credits the amount.

there are a couple more steps in the middle used to ensure host and gaming machine recieved correct info but that is the baiscs

in another thread someone mention about using system validation then encrypting the amount within the validation number, i havent tried that yet, but i believe it will work since on system validation the host creates the validation number and sends to machine.
Logged
TZtech
Contributing Gold NLG Member
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 129
Offline Offline

Gender: Male
Posts: 1113



« Reply #10 on: June 04, 2012, 05:37:50 PM »

Munch - Yes thats correct. That functionality has been confirmed working on a PE+. The great thing is that featues can be added simply by modifying code.

Zarob + Foster - Thanks for the clarification - Afraid standalone TITO wont be viable unless end user has only one machine. Will look into the best method of comms between multiple boards. The Xino board which I am using has an on board socket for a wireless serial module available from same supplier which may be interesting to add to the project.

Foster - The bridge idea You mentioned in Bhinkleys thread is certainly possible . Let me know if I can assist with this in any way.
Logged
Foster
The S2000 GURU
Contributing NLG Member
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 345
Offline Offline

Gender: Male
Posts: 2872



« Reply #11 on: June 04, 2012, 10:00:55 PM »

I would like to know what it would take to do the bridge,

Can the output pins be configured as serial outputs or does it take some very careful and time sensitive programming to emulate serial I/O
I ask because this might also solve a problem for those with more than one machine, use it as a bridge and router
I know it might involve adding a few max232 to the design to handle each machine.

PC - uC - M1
        |
       M2
PC - computer
uC - Micro Controller with max 232 onboard for each machine that is connected via RS232
M1, M2 slot or EGM

How I would code the program for the uC is that address 1 is routed to port 1 and address 2 is routed to port 2 to keep it simple
« Last Edit: June 04, 2012, 10:14:12 PM by Foster » Logged

A Slot Machine and Coca-Cola Addict!!
"If it is not broke do not fix it" I keep forgetting that!
TZtech
Contributing Gold NLG Member
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 129
Offline Offline

Gender: Male
Posts: 1113



« Reply #12 on: June 05, 2012, 05:50:19 PM »

The controller has 2 built in serial comms ports - Its possible to do emulated serial on the other pins but on SW serial its not possible to manipulate the wake up bits so unless something like RS485/fibre is used i think a single controller controlling multiple machines wont work.

Zarobhr / Foster - How are Your current PC based projects communicating with machines ? Do You have a seperate USB to serial convertor for each machine or are You using RS485/fibre
« Last Edit: June 06, 2012, 10:48:58 AM by TZtech » Logged
Foster
The S2000 GURU
Contributing NLG Member
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 345
Offline Offline

Gender: Male
Posts: 2872



« Reply #13 on: June 06, 2012, 11:29:09 AM »

I have one machine and am using a USB to Serial adapter since Microsoft's SerialPort Class in .NET has issues with the Super I/O chip on my motherboard
I gather it does not follow 16550 UART or so standards, Andy's DLL and TestApp has the same issue with my motherboard.

A friend that I setup up my program on a computer he bought has 2 machines and using the 2 com ports in his computer. They must be 16550 UART's
His is running 2 forms in one program space, which helped response times with tickets.
Prior version I did for him had it as a program per machine created a lag issue for one machine or the other depending on which program had a higher priority at that time.
Theoretically my program should be able to do 4-8 machines as long as it the serial ports to match,
May need a rewrite or modification for multiple machines on a single com port (RS485 card or using a RS232 to RS485 adapter.

« Last Edit: June 06, 2012, 11:45:52 AM by Foster » Logged

A Slot Machine and Coca-Cola Addict!!
"If it is not broke do not fix it" I keep forgetting that!
TZtech
Contributing Gold NLG Member
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 129
Offline Offline

Gender: Male
Posts: 1113



« Reply #14 on: June 06, 2012, 11:50:15 AM »

If You use the official Amicus board its got an onboard FTDI usb to serial converter. For the Xino board You can use a USB to serial convertor cable.
Do You think its practical to run them from a USB hub and assign each a seperate comm port ?

Will order some more Xino boards and bluetooth modules and start playing around with comms between boards.
Logged
TZtech
Contributing Gold NLG Member
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 129
Offline Offline

Gender: Male
Posts: 1113



« Reply #15 on: June 06, 2012, 12:22:21 PM »

Foster - Are You using a FTDI chip? Have You considered using their D2XX drivers instead of windows (http://www.ftdichip.com/Support/Documents/ProgramGuides/D2XX_Programmer's_Guide(FT_000071).pdf

There is a DLL and example code on their site - http://www.ftdichip.com/Support/SoftwareExamples/CodeExamples/CSharp.htm

This may be a alternative for those doing PC based projects to get past the windows serial issues.
Logged
Foster
The S2000 GURU
Contributing NLG Member
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 345
Offline Offline

Gender: Male
Posts: 2872



« Reply #16 on: June 06, 2012, 07:38:53 PM »

Yes by luck my USB to Serial is FTDI chip set
I dont know if I can use it in C#.

Logged

A Slot Machine and Coca-Cola Addict!!
"If it is not broke do not fix it" I keep forgetting that!
kibble
Contributing NLG Member
New NLG Member 1 to 100 Post
*

Total Karma Storms: 16
Offline Offline

Gender: Male
Posts: 100



« Reply #17 on: June 09, 2012, 09:37:41 AM »

I have one of the Amicus18 boards with the PIC18F25K20 do i have to change the device in the program before loading? I hope to have time this weekend to try on my s2000
Logged
TZtech
Contributing Gold NLG Member
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 129
Offline Offline

Gender: Male
Posts: 1113



« Reply #18 on: June 09, 2012, 09:52:09 AM »

Hello Kibble

For the S2000 You can use the DCS port which works at 5V levels so You dont need and additional RS232 converter.

Where did You get the Amicus board from - Any additional supplier info in the USA would be good.

Regards
Ian
« Last Edit: June 09, 2012, 07:03:50 PM by TZtech » Logged
TZtech
Contributing Gold NLG Member
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 129
Offline Offline

Gender: Male
Posts: 1113



« Reply #19 on: June 09, 2012, 07:08:49 PM »

*
« Last Edit: October 19, 2012, 04:50:11 PM by TZtech » Logged
kibble
Contributing NLG Member
New NLG Member 1 to 100 Post
*

Total Karma Storms: 16
Offline Offline

Gender: Male
Posts: 100



« Reply #20 on: June 10, 2012, 10:29:48 AM »

I got to load new program today the program loaded fine no compile errors, I did hook up to my machine but i don't have any communication I think. Have some family time today, will check out my configuration on the machine late tonight or tomorrow after work.

we got the board here but seems the price went up

http://www.newark.com/jsp/displayProduct.jsp?sku=79R5806&CMP=KNC-G-SKU-AMICUS&mckv=s0s7B3Mt3|pcrid|10057067661|plid|
Logged
TZtech
Contributing Gold NLG Member
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 129
Offline Offline

Gender: Male
Posts: 1113



« Reply #21 on: June 10, 2012, 10:46:32 AM »

Hi Kibble

"For the S2000 You can use the DCS port which works at 5V levels so You dont need and additional RS232 converter" - Apologies my statement here was incorrect as the official amicus board runs at 3.3v. Not sure if its enough to switch the DCS port.

How did You wire it to the DCS port? Do you have maybe have a RS232 module to try it on the comms board?

Ian
Logged
kibble
Contributing NLG Member
New NLG Member 1 to 100 Post
*

Total Karma Storms: 16
Offline Offline

Gender: Male
Posts: 100



« Reply #22 on: June 10, 2012, 01:08:01 PM »

Got it to work adds ten credits  here is a link to a crappy video and a snapshot of the parts i used,  Hail Cheer Leader

<iframe width="560" height="315" src="http://www.youtube.com/embed/tetPKV_PvQU" frameborder="0" allowfullscreen></iframe>


* IMAG0197.jpg (817.1 KB, 3264x1840 - viewed 497 times.)
Logged
TZtech
Contributing Gold NLG Member
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 129
Offline Offline

Gender: Male
Posts: 1113



« Reply #23 on: June 10, 2012, 01:54:43 PM »

Great Stuff - Nice to see it working on somebody else's machine. Guess 10 credits is not really suitable for a 90 coin S2000  Tongue Out
It looked like it worked ok on both zero credits and service button toggle?
Logged
TZtech
Contributing Gold NLG Member
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 129
Offline Offline

Gender: Male
Posts: 1113



« Reply #24 on: June 10, 2012, 02:06:49 PM »

Hello Kibble

Change line 79 in the add legacy bonus 10 subroutine to
HRSOut $8A,$00,$00,$10,$00,$00,$EC,$36.
This should add 1000 credits at a time
Logged
Pages: [1] 2 3 4 ... 8 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.097 seconds with 19 queries.