Jump to content


Photo
* * * * * 2 votes

Arduino as pac-drive alternative?

Arduino pac-drive mamehooker

  • Please log in to reply
185 replies to this topic

#61 eric

eric

    Member

  • Regulars
  • 68 posts

Posted 15 October 2018 - 06:38 PM

Bonjour Konrad,

Je suis impatient d'installer ta version finale de fruit squeezer.J'ai commandé un arduino méga juste pour cela.

c'est une super alternative au pacdrive et vraiment économique.

Super travail

Eric



#62 majoris

majoris

    Fruit Squeezer

  • Regulars
  • 85 posts

Posted 16 October 2018 - 07:53 AM

As always, the biggest obstacle is free time. Kids are unforgiving. They demand atention, and my project is at the bottom of their list of priorities. Of course they are very happy when hopper throws coins, but a moment after that I have half of wires diconnected, because my 2 year son was interrested on their colors. So, I must admit, that those adorable distractors cause major delays on the project progress. But hopefuly... soon.. maybe this weekend. But I don't want to promise anything.

In a meantime I plan to test LED dimming feature. I will use analog pins. I was thinking on PWM dimming but to much coding. Arduino Mega has 12 analog outputs (UNO only 6), so It should be sufficient. The only problem is that this feature complicates connections a bit, and Fruit Squeezer lead idea is simplicity. I will think about it.


Logopit_1542465375366.png


#63 eric

eric

    Member

  • Regulars
  • 68 posts

Posted 16 October 2018 - 07:29 PM

Bonjour Konrad,

Nous sommes tous de grand enfants donc nous comprenons ce que tu vis, il y a d'autres priorités quand nous sommes adultes.

Nous attendrons le temps qu'il faut ne t'inquiète pas car sans toi ce projet n'existerait pas.

Eric



#64 eric

eric

    Member

  • Regulars
  • 68 posts

Posted 20 October 2018 - 05:36 PM

hello Konrad,

 

all is ok for me with the arduino mega  the outputs 2 to 21 are ok

but i cant use the digital pin there is no signal output (22 to 53)

 

Eric



#65 majoris

majoris

    Fruit Squeezer

  • Regulars
  • 85 posts

Posted 21 October 2018 - 07:30 PM

My mistake. Sorry. I'll fix it.


Logopit_1542465375366.png


#66 majoris

majoris

    Fruit Squeezer

  • Regulars
  • 85 posts

Posted 21 October 2018 - 08:34 PM

Eric, I have fixed missing outputs. Please check if it works now.

I can't test it for now, because I'm using a set with Arduino Nano for hopper testing. As soon as I finish with hopper, I'm going to go with Arduino Mega tests.

 

This fix comes along with hopper support. I'm publishing version called 0.50. It sends hopper signals, but I'm not publishing Arduino code yet.

I found that my first version of Arduino code caused some inaccuracy, so it has to be corrected. Now I'm working on this issue.

Squeezer is not going to be much changed with hopper support. For now it sends char "c" for each coin paid out and probably I'll leave it like that.

OK. Enough talking.

In case of any problems, please let me know.

 

Attached Files


Logopit_1542465375366.png


#67 eric

eric

    Member

  • Regulars
  • 68 posts

Posted 22 October 2018 - 06:45 AM

Hello Konrad,

All outputs are good

great job

Eric



#68 majoris

majoris

    Fruit Squeezer

  • Regulars
  • 85 posts

Posted 01 November 2018 - 10:12 AM

OK. So it is.  Arduino with coin hopper payout support. Simple, efficient and 100% accurate.

I've managed to eliminate inaccuracy with payouts. Now my code gives 100% accurate payments. Everything is tested.

 

It is time for official introduction of Fruit Squeezer, but before I do that, I'll try to make simple connection schematics for Arduino and hopper. After I finish, I will publish everything. Arduino source code, Fruit Squeezer and a piece of connection schematics.

 

Take care


Logopit_1542465375366.png


#69 eric

eric

    Member

  • Regulars
  • 68 posts

Posted 01 November 2018 - 11:13 AM

Great Konrad.



#70 majoris

majoris

    Fruit Squeezer

  • Regulars
  • 85 posts

Posted 01 November 2018 - 03:47 PM

Great Konrad.

I agree :)


Logopit_1542465375366.png


#71 eric

eric

    Member

  • Regulars
  • 68 posts

Posted 01 November 2018 - 05:51 PM

Hi Konrad, Do you think it will be possible to automatically launch the fruitsquezzer config file at the same time as the mfme roms ? Eric

#72 majoris

majoris

    Fruit Squeezer

  • Regulars
  • 85 posts

Posted 01 November 2018 - 07:57 PM

I will think about it. Maybe I will be able to do that. Indeed important feature to multi-rom cabinet.

Level of complication is rising. At the beginnig of my idea, and coding I didn't expected that I will go that far.

 

OK. We'll see.


Logopit_1542465375366.png


#73 eric

eric

    Member

  • Regulars
  • 68 posts

Posted 02 November 2018 - 01:40 PM

Hi Konrad,

I know this should not be easy, but that will be perfection, at first an automatic boot directly on the com port open for just 1 rom like mame hooker.

Eric



#74 majoris

majoris

    Fruit Squeezer

  • Regulars
  • 85 posts

Posted 04 November 2018 - 02:51 PM

I'm having a lot of fun adding more features to my program after your comments.

So Eric, configuration files are saved by autonomous code - this very useful feature is ready to go. I have tested it, and it should work fine, but in case of trouble, please report any errors. I'm getting close to an end.

 

All the config files are saved in Fruit Squeezer folder. After first run of Squeezer, you have to push "Squeeze" button. But this is done only once, after this action Fruit Squeezer is autonomic (if properly configured).

 

After this action it checks if config file is already created:

if YES -> loads it's content

if NO -> config file is created

You have to stick to one rule. In MFME Configuration menu, in Game Details->Caption, you have to keep all your games with different names, otherwise, config file will be overwritten. I wont add 'overwrite warning' message.

Another thing, new config file is created with values from last used game. If it does not fit your needs, press RESET button.

 

Next. After config file is created, you make all the changes you want, and press SAVE button. From now it can be reused. It will be automatically loaded after change of game. Also payout divider is saved. Payout divider is used for machines that pay in different units. For ex. Super Red Bar pays 5 coins with 50 pulses. Normally you would have 50 coins but this is not our point. This is why I added divider. It spits one coin after divider is manualy changed - not always, but id does. Small inconvinience, but only at configuration phase. After config is set, it runs without miss shots.

 

What else... Oh. I'm posting my source to Arduino. Still not Mega (not tested). Code contains hopper support. Hopper pins are as stated in Fruit Squeezer: 2-sensor, 3-motor. Rest is pure electric connection. As for sensor pin, it needs pull up resistor. It is needed in my case. I'm using Cube Hopper MKII which has high output from the sensor. It goes LOW when coin is paid. Arduino and coin hopper must share common ground. Hopper power source is controlled by standard relay. No need for SSR.

 

As for automatic COM port choice, well I don't think I'm able to do that. I can try, but I can imagine a computer with few COM devices connected. I have no idea how to make to choose right device (Arduino).

 

For now, this is all I have done yet.

Enjoy. :)

Attached Files


Logopit_1542465375366.png


#75 eric

eric

    Member

  • Regulars
  • 68 posts

Posted 04 November 2018 - 03:32 PM

Hi Konrad,

great job i will try now

Eric



#76 majoris

majoris

    Fruit Squeezer

  • Regulars
  • 85 posts

Posted 04 November 2018 - 09:10 PM

I found a problem with renaming of game. Squeezer creates unwanted files during renaming.

I will correct it as soon as I can but not today. I'm not feeling well, and I'm tired. This is not goos basis for thinking and coding. I will probably make more damage in this condition so, I better not touch the code anymore.


Logopit_1542465375366.png


#77 eric

eric

    Member

  • Regulars
  • 68 posts

Posted 05 November 2018 - 04:43 AM

Hi Konrad,

takes the time, we wait, health and familly above all.

Take care

Eric

 

 

takes the time, we wait, health above all,



#78 majoris

majoris

    Fruit Squeezer

  • Regulars
  • 85 posts

Posted 09 November 2018 - 09:06 PM

After some thinking on your suggestions Eric, I've understood that automatic serial connection is also very important for cabinet construction. So, now Squeezer is reworked a bit.

Here is how it works.

Squeezer after runned searches for MFME 6.1 game. At this short moment Fruit Squeezer's user interface is a bit unresponsive (lags). Responsivenes gets back after MFME game is found.

 

As for serial connection. It can be achieved as it used to be done - manually. This should be done after first connection of Arduino hardware to find out on which COM port it is connected. When we know the port we can set the automatic connection. It is done by typing to the yellow field the port name. Field is not case sensitive, so we can type for ex. "COM10" or "com10". Doesn't make any difference. After this address is typed in, configuration should be saved. Textbox value will be stored and loaded every time when this rom game is loaded. Serial connection is triggered automaticaly. IMPORTANT - yellow field may contain only existing and proper name of Arduino COM port. Typing wrong value will cause program crash and for now I can't do anything about it. For now...

 

Fruit Squeezer baceme pretty automatic software. As for the cabinet, I think only action to be taken is to run it in autostart, after Windows boot. Rest is going to happen automatic. Of course after propper configuration of outputs but this is obvious.

 

After short testing I will publish new version of Fruit Squeezer. I also wil publish a tiny correction to Arduino code. I forgot to turn on internal pullup resistor to avoid necessity of connecting external pullup current. Probably tomorrow everything will be ready.

 

Take care.


Logopit_1542465375366.png


#79 eric

eric

    Member

  • Regulars
  • 68 posts

Posted 10 November 2018 - 11:07 AM

Hi Konrad,

You make a perfect job.

Take time.

Eric



#80 majoris

majoris

    Fruit Squeezer

  • Regulars
  • 85 posts

Posted 10 November 2018 - 10:40 PM

:goofy:

 

Fruit Squeezer in 'developer mode'.

At this video - fruit machine VFD screen text sent to Arduino LCD display. Realtime. Cool ha?

LCD seems to be to slow to refresh. I have few original VFD screens. Maybe someday I'll connect them to my set.

 

===

Konrad

 

ps.

Tomorrow we (Polish people) celebrate 100 YEAR ANNIVERSARY OF POLAND REGAINING INDEPENDENCE :).

Following the partitions and 123 years of serfdom, Russification and Germanisation, after great uprisings, free Poland was reinstated on the map of the world. 

 


Logopit_1542465375366.png






Also tagged with one or more of these keywords: Arduino, pac-drive, mamehooker

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users