Jump to content



Photo
* * * * * 3 votes

New DIY plunger design


  • Please log in to reply
734 replies to this topic

#21 jkimbrell

jkimbrell

    Enthusiast

  • Members
  • PipPipPip
  • 298 posts
  • Location:Cincinnati, OH

  • Flag: United States of America

  • Favorite Pinball: Star Trek NG, Indiana Jones, South Park

Posted 02 August 2014 - 09:00 PM

awesome!! I had the Sidewinder pro in my first cab (that has since been sold) and I was so tepid about it's performance that I haven't even taken the other one I have out of the box.  In my new cab, I've just been using my second flipper buttons as digital nudge which, honestly, makes things a bit too easy as far as actual game play.  I'm going to go ahead and pick-up a FRDM-KL25Z and anxiously await the release of your code :) :) :)



#22 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,331 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 02 August 2014 - 10:24 PM

awesome!! I had the Sidewinder pro in my first cab (that has since been sold) and I was so tepid about it's performance that I haven't even taken the other one I have out of the box.  In my new cab, I've just been using my second flipper buttons as digital nudge which, honestly, makes things a bit too easy as far as actual game play.  I'm going to go ahead and pick-up a FRDM-KL25Z and anxiously await the release of your code :) :) :)

 

I'll try to get an initial release out soon then!



#23 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,331 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 03 August 2014 - 07:21 PM

Here's the current version of my code changes, if anyone wants to try it out.  This is in manual patch format, but there aren't too many changes, so it shouldn't take too much work to apply.  This should work with any recent VP source branch, but I'm building this myself with the 9.9 branch (I have the 1143 snapshot on the DX9_9 branch).

 

Here's the folder with the current patch source code and binaries:  https://www.dropbox....hcJWkIe6ha?dl=0


Edited by mjr, 01 September 2014 - 05:30 PM.


#24 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,331 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 03 August 2014 - 07:59 PM

One other little update, which might be of interest to anyone else developing a custom plunger device.  

 

I've been studying the VP code that handles the analog plunger motion, trying to understand how the timing of device reports affects the simulation response.  I noticed that a given pull distance could result in a range of energy being transferred to the ball on release, so I wanted to figure out how VP calculates the instantaneous velocity of the plunger.  I was concerned that my 25ms refresh rate was too slow, given that VP runs its physics simulation at a 100 Hz target rate (10ms updates).  Now that I see how this works, it turns out that my refresh rate is probably *too fast*.  The way VP handles analog plunger input is rather nicely thought out - particularly in terms of making a device work well with it.  VP has an internal model plunger, and does all of the velocity/acceleration/force simulation using the model.  The analog plunger readings aren't really involved in figuring the velocity.  Instead, VP continuously compares the model plunger position to the reported analog plunger position, and when they differ, it sets the model plunger in motion towards the position in the physical plunger reading.  The speed and acceleration are controlled by the model; VP doesn't attempt to calculate a first derivative (d/dt) of the analog position or anything like that.

 

This design is perfect for my sensor, and probably for just about anyone else building their own plunger device.  It means we don't have to collect or report readings fast enough to get accurate instantaneous velocity readings.  Accurate velocity readings would be quite difficult for most practical position sensors during the most important plunger motion of all, which is the very rapid acceleration (and subsequent rapid deceleration) when you release it from a retracted position.  I can conceive of a precise position sensor that could collect the data quickly enough, but as far as I can tell you can't just buy such a device off the shelf.  The device I can buy - the CCD array I'm using - collects very precise position data but is relatively slow at reporting it.

 

In fact, I believe I can attribute the inconsistencies I've been seeing in launch force to my reports being too *fast*, not too slow.  I think the 25 ms cycle time was sometimes, but not always, capturing intermediate positions in mid-release, which would give VP the idea that it should send the plunger moving towards a halfway position and stop, and then soon thereafter accelerate again from the halfway position to the rest position.  So I think the ideal way to feed plunger input to VP is to essentially debounce it - if the readings are changing rapidly (at the sub-human perception scale), wait for things to settle out.  So for a typical release motion, VP would see the retracted reading followed immediately by a rest reading - letting VP know that it should do the full swing between the two positions.  We want to set the time scale for the debouncing filter such that manual motions are *not* filtered out - I think that's straightforward since the human perception time scale is up in the 50-100ms range.

 

I'm experimenting with this now, so I'll report back when I know more.



#25 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,331 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 07 August 2014 - 08:34 PM

I've published my KL25Z code on mbed.org, for anyone who wants to take a look at it.

 

http://mbed.org/user...r/wiki/Homepage

 

I think you can view all of the source code from there, and probably even build it on-line if you have a Freescale card to load it onto.

 

It's not quite done yet, but getting really close.  I'm still tweaking the plunger launch behavior.  It's working quite nicely already, but I think the short-pull behavior could be refined a bit more.

 

The nudging is continuing to work great with real tables.  I spent a while playing BK2K last night - that table calls for a lot of nudging, and it was behaving pretty naturally for me.

 

Getting the plunger working with individual tables is turning out to be pretty easy.  I do think I'll be able to get this down to a science and document it.  It seems to be mostly a matter of (a) enabling mechanical plunger mode on the table's plunger object, and (b) positioning the plunger object just right.  

 



#26 J3SteR

J3SteR

    Enthusiast

  • Members
  • PipPipPip
  • 494 posts
  • Location:Michigan

  • Flag: United States of America

  • Favorite Pinball: FunHouse,Tales From The Crypt, T2, Circus Voltair, Adams Family,MM

Posted 08 August 2014 - 04:30 AM

Wow mjr! This is exactly what I want for nudging in my cab. I always felt the buttons were to easy and it felt more like cheating. Few questions... 1. Could you please link to the exact hardware needed to make this work? 2. Is there a way to add the code needed to the next version of VP? (vp10) I thought vp was open source. Maybe you could share this with the devs? 3. Did you know you are awesome for doing this and putting your time into it? :-) Thanks!

Edited by J3SteR, 08 August 2014 - 04:31 AM.


#27 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,331 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 08 August 2014 - 05:37 AM

Wow mjr! This is exactly what I want for nudging in my cab. I always felt the buttons were to easy and it felt more like cheating. Few questions... 1. Could you please link to the exact hardware needed to make this work? 2. Is there a way to add the code needed to the next version of VP? (vp10) I thought vp was open source. Maybe you could share this with the devs? 3. Did you know you are awesome for doing this and putting your time into it? :-) Thanks!

 

I'm actually writing up documentation with all of the hardware details as we speak.  It'll take a few days to get together, I expect, but I'll post it as soon as I have a reasonably complete draft.

 

I do hope to get my VP nudge changes integrated into the official VP release.  I haven't talked to any of the developers about it yet, so I'm not sure how open they are to such changes.  VP is indeed open source, so if they don't want the changes, I can make a mod'ed version available - but I'd obviously rather not have to do that since it'll be a lot of work to keep it up to date as new releases come out.  Much better (for me) to integrate it into the base version, if they'll have it.  I do think it'll need to be conditioned on some new preference setting, since it'll probably be a matter of taste whether you want the special processing or not, but assuming we do that then I don't expect the devs will object to adding the code, as it won't affect anyone who doesn't specifically enable it.



#28 jkimbrell

jkimbrell

    Enthusiast

  • Members
  • PipPipPip
  • 298 posts
  • Location:Cincinnati, OH

  • Flag: United States of America

  • Favorite Pinball: Star Trek NG, Indiana Jones, South Park

Posted 08 August 2014 - 03:22 PM

I installed mjr's nudge code on a Freescale KL25Z and am using it with his patched VP 9.9 exe.  It works so well, it's insane!  I may take some video later but I actually can't imagine nudge working better than this.  Soo  stable and realistic... no calibration or setup other than enabling analog nudge, setting the X and Y axis and setting your gain (I used 1200% for the feel I was looking for).  I highly recommend this setup!  My freescale unit was $30 on Amazon and that included around $12 shipping.   



#29 slashbot

slashbot

    Enthusiast

  • Members
  • PipPipPip
  • 337 posts
  • Location:Ghent

  • Flag: Belgium

  • Favorite Pinball: Scared stiff on vp,Highspeed 2,Fish Tales,T2,Circus Voltaire,Congo

  • 360 Gamer Tag: slashbot

Posted 08 August 2014 - 05:30 PM

I installed mjr's nudge code on a Freescale KL25Z and am using it with his patched VP 9.9 exe. It works so well, it's insane! I may take some video later but I actually can't imagine nudge working better than this. Soo stable and realistic... no calibration or setup other than enabling analog nudge, setting the X and Y axis and setting your gain (I used 1200% for the feel I was looking for). I highly recommend this setup! My freescale unit was $30 on Amazon and that included around $12 shipping.


Im realy exited about this project, nudge looks realistic.
ill buy an freescale kl25z board.
Someone can share the patched vp990 exe?

Thnx

Sent from my iPad using Tapatalk HD

r0sqir-4.pngslashbot.jpgttzReplay.gif

Cabinet Bally Radical - setup 40'' Sony Led for playfield, 32''Led LG for Backglass, LCD screen for DMD, running LEDwiz32 12v setup with DOF and boosterboard to power toys 2x Siemens contactors for flipper feedback -2e audiocard + subwoofer setup to emulate VP flippersounds and vibration in cab (sounds fantastic) 1x red police light flasher.Lots of 5050 RGB Ledstrips bottom,back,top. 1x HUD-G for digital nudge all

Check my Visual Pinball cabinet highscores: HERE

TPA artwork resources gallery here


#30 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,331 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 08 August 2014 - 06:25 PM

 

I installed mjr's nudge code on a Freescale KL25Z and am using it with his patched VP 9.9 exe. It works so well, it's insane! I may take some video later but I actually can't imagine nudge working better than this. Soo stable and realistic... no calibration or setup other than enabling analog nudge, setting the X and Y axis and setting your gain (I used 1200% for the feel I was looking for). I highly recommend this setup! My freescale unit was $30 on Amazon and that included around $12 shipping.


Im realy exited about this project, nudge looks realistic.
ill buy an freescale kl25z board.
Someone can share the patched vp990 exe?

 

It's available here:

 

http://mbed.org/user...ape_Controller/

 

There's a link there for the hardware build guide, which has full instructions.

 

[Edit: the following are the preliminary instructions I posted before I finished the documentation.  All of this is in the build guide, with more details and up-to-date information.]

 

The .bin file is the Freescale controller software.  To load this, you have to first set up the boot loader on your Freescale card:

 

 - go here: http://www.pemicro.com/opensda/

 - download the OpenSDA Firmware

 - unzip the files from the download

 - follow the instructions in "Updating the OpenSDA Firmware.pdf"

 

If you're running Windows 8 and you can't get the instructions to work, you'll need to find a Win7 machine (or any other Windows version from XP to Win7).  The factory-installed firmware that was on my Freescale was incompatible with Win8, and the only workaround was to update it using an older Windows version.  Hopefully they're updated the factory version at this point, but it probably depends on where you buy the card - they might still have stock with the old firmware.  If you're not on Windows 8 this won't be an issue; if you are, you'll need an older version just this once to do the update, and after that it'll work find on Win8.

 

Once you get past that step, plug the Freescale into your computer on the *programming* port - the same one you use for the step above to update the firmware.  It should appear on your Windows desktop as a disk drive.  Just drag and drop my .bin file onto the drive - that'll load the software onto the Freescale flash, at which point the card will be ready to use.  Unplug the cable from the programming port and plug it back in on the other port.  Windows should recognize the device as a USB joystick called "Pinscape Controller".

 

The modified VP 9.9 exe file is also in the folder linked above.  Just drop that into your existing VP 9.9 install folder and run it instead of vpinball.exe.

 

If you want to build VP from source, the .txt file contains my source changes to the 9.9 base code.

 

To configure VP for this: mount the Freescale card flat on the floor of your cabinet, with the USB connectors facing the front.  (You can rotate it if needed to make cables reach - just adjust the VP axis settings accordingly.)  In the VP Keybaord preferences, check "Enable Analog Nudge", set X Axis to X and Y Axis to Y.  I use gains of 1000% on each axis, but you might want to bump that up or down a little to get it to feel right for you - I think there's bound to be some variation in how individual cabinets respond, as well as personal taste.

 

Let me know how it goes!


Edited by mjr, 01 September 2014 - 05:32 PM.


#31 slashbot

slashbot

    Enthusiast

  • Members
  • PipPipPip
  • 337 posts
  • Location:Ghent

  • Flag: Belgium

  • Favorite Pinball: Scared stiff on vp,Highspeed 2,Fish Tales,T2,Circus Voltaire,Congo

  • 360 Gamer Tag: slashbot

Posted 08 August 2014 - 06:32 PM

Thanks a lot for sharing, before i buy the card, ill first try the modded vp exe with my microsoft freestyle pro to see what it does, if nothing changes ill buy the card.




Sent from my iPad using Tapatalk HD

r0sqir-4.pngslashbot.jpgttzReplay.gif

Cabinet Bally Radical - setup 40'' Sony Led for playfield, 32''Led LG for Backglass, LCD screen for DMD, running LEDwiz32 12v setup with DOF and boosterboard to power toys 2x Siemens contactors for flipper feedback -2e audiocard + subwoofer setup to emulate VP flippersounds and vibration in cab (sounds fantastic) 1x red police light flasher.Lots of 5050 RGB Ledstrips bottom,back,top. 1x HUD-G for digital nudge all

Check my Visual Pinball cabinet highscores: HERE

TPA artwork resources gallery here


#32 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,331 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 08 August 2014 - 07:05 PM

Thanks a lot for sharing, before i buy the card, ill first try the modded vp exe with my microsoft freestyle pro to see what it does, if nothing changes ill buy the card.

 

Definitely worth trying - I'll be interested to hear what you find.  I expect you'll see some improvements (or difference, at least) in the physics, since the filtering should be generic to any type of accelerometer.  But I'm afraid it won't help with calibration drift issues - the auto-calibration is in my Freescale code rather than the VP side.



#33 slashbot

slashbot

    Enthusiast

  • Members
  • PipPipPip
  • 337 posts
  • Location:Ghent

  • Flag: Belgium

  • Favorite Pinball: Scared stiff on vp,Highspeed 2,Fish Tales,T2,Circus Voltaire,Congo

  • 360 Gamer Tag: slashbot

Posted 08 August 2014 - 08:35 PM

Can u post a video from the accelerometer test table so i can compare? It seems to work with the freestyle pro with my default settings. Ill post a video so u can see the behavior with the sidewinder pro. Abracadabra gameplay vp990 exe mod Sometimes the ball goes a little to much up on y axis, can this be fixed by myself? Sent from my iPad using Tapatalk HD

Edited by slashbot, 08 August 2014 - 09:07 PM.

r0sqir-4.pngslashbot.jpgttzReplay.gif

Cabinet Bally Radical - setup 40'' Sony Led for playfield, 32''Led LG for Backglass, LCD screen for DMD, running LEDwiz32 12v setup with DOF and boosterboard to power toys 2x Siemens contactors for flipper feedback -2e audiocard + subwoofer setup to emulate VP flippersounds and vibration in cab (sounds fantastic) 1x red police light flasher.Lots of 5050 RGB Ledstrips bottom,back,top. 1x HUD-G for digital nudge all

Check my Visual Pinball cabinet highscores: HERE

TPA artwork resources gallery here


#34 boiydiego

boiydiego

    Pinball Fan

  • Members
  • PipPipPipPip
  • 978 posts
  • Location:baal

  • Flag: Belgium

  • Favorite Pinball: flinstones,t2 chrome edition,wcs,afm,fish tales,medieval,rollercoaster tycoon,taxi

Posted 08 August 2014 - 10:29 PM

is the sidewinder better with the moded vp version slashbot?


boiydiego___gebruik-n2kbkyc.png


#35 slashbot

slashbot

    Enthusiast

  • Members
  • PipPipPip
  • 337 posts
  • Location:Ghent

  • Flag: Belgium

  • Favorite Pinball: Scared stiff on vp,Highspeed 2,Fish Tales,T2,Circus Voltaire,Congo

  • 360 Gamer Tag: slashbot

Posted 09 August 2014 - 01:15 AM

After some testing with the modded exe and ms sidewinder pro everything seems to work, but the thing ive noticed is less x-axis power when doing a nudge even with higher x-axis rates. So for me the gameplay is more difficult/harder then before.
I was already used to playing original vp analog settings.
On the other side this mod gives more realism in nudgeing than ever before, and its a first step in years for better gameplay, good job !

maybe it has to be more optimized for different accelerometer devices?

I would like to see some gameplay nudge videos from people who use the bord with new code so i can see the difference between the 2 devices.
Could someone post some videos?

Then i can decide if i also buy this new card (forgot the name)needed for the perfect nudge, its not that expensive.

Could someone also compile a physicsmod2 and 5 version , mukuste put the source somwhere on an svn site but i dont have the link i tought it was discussed in the physics overhault treat.



Sent from my iPad using Tapatalk HD,

r0sqir-4.pngslashbot.jpgttzReplay.gif

Cabinet Bally Radical - setup 40'' Sony Led for playfield, 32''Led LG for Backglass, LCD screen for DMD, running LEDwiz32 12v setup with DOF and boosterboard to power toys 2x Siemens contactors for flipper feedback -2e audiocard + subwoofer setup to emulate VP flippersounds and vibration in cab (sounds fantastic) 1x red police light flasher.Lots of 5050 RGB Ledstrips bottom,back,top. 1x HUD-G for digital nudge all

Check my Visual Pinball cabinet highscores: HERE

TPA artwork resources gallery here


#36 sliderpoint

sliderpoint

    Pinball Fan

  • Members
  • PipPipPipPip
  • 760 posts
  • Location:Spokane, WA

  • Flag: United States of America

  • Favorite Pinball: Metallica

Posted 09 August 2014 - 01:20 AM

I just tried it with a PS3 controller with the ever terrible motioninjoy driver. I makes a significant difference. Running straight 9.9 I can pretty much nudge the ball all over the level test table. With this modified version the ball always tries to return to its starting position.

Nice job!!
-Mike (Funny enough, a different Mike R than this mjr Mike R...)



#37 jkimbrell

jkimbrell

    Enthusiast

  • Members
  • PipPipPip
  • 298 posts
  • Location:Cincinnati, OH

  • Flag: United States of America

  • Favorite Pinball: Star Trek NG, Indiana Jones, South Park

Posted 09 August 2014 - 02:15 AM

I'll take a video tonight and put it up.  Trust me, you want the freescale board.  Best $30 I've spent on my cab.  It's super steady and works like a real ball would with real gravity.  With the sidewinder I had in my old cab, it would always over compensate and wasn't even across the two axis.  This works really well and is really small footprint in the cab.  Vid to come later.  My upload speed is terrible so it will take a while.



#38 blashyrk

blashyrk

    Pinball Fan

  • Members
  • PipPipPipPip
  • 549 posts
  • Location:Norway

  • Flag: Norway

  • Favorite Pinball: Attack from Mars, Medieval Madness, White Water

  • PS3 Gamer Tag: Blashyrk

Posted 09 August 2014 - 07:25 AM

Just ordered the freescale board, guess I'll have no use for my freestyle pro then.
Awesome work mjr.

#39 javier1515

javier1515

    Pinball Fan

  • VIP
  • 574 posts
  • Location:Villa Maria Cordoba

  • Flag: Argentina

  • Favorite Pinball: The Addams Family, Hook



Posted 09 August 2014 - 03:40 PM

Hi mjr! this FRDM Freescale Cortex-M4 Freedom k20d50m would serve me for this?

 

It's the only thing I can get in my country.  :wimper:


"Learning without thought is vain, thought without learning is dangerous." (Confucius)
 
"Aprender sin pensar es inútil, pensar sin aprender es peligroso". (Confucio)

 

 

Please, if you can help me with a small contribution to update my work team and continue to make more tables I will be eternally grateful.
 

#40 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,331 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 09 August 2014 - 07:12 PM

Hi mjr! this FRDM Freescale Cortex-M4 Freedom k20d50m would serve me for this?

 

It's the only thing I can get in my country.  :wimper:

 

Unfortunately, I don't think so.

 

The specs look very similar to the KL25Z, but it doesn't look like it's designed to be software compatible.  It uses a different CPU (Cortex M4 vs M0+ on the KL25Z), and the pinouts on the M4 schematic are definitely somewhat different from M0+.  It also has some different on-board peripherals not on the KL25Z.  My guess is that the CPU uses the same instruction set but has differences in the register and pin layout that would require some changes to the low-level code.  If mbed.org supported the KL20D50M, I could try recompiling my existing code with the different target, but the only Freescale board they can target right now is the KL25Z.

 

Sorry!  You could always try anyway if you're willing to take the risk, but if there's any way you can get a KL25Z via eBay or something like that, that would be a much surer route.

 

Edit: according to this article: http://www.element14...e-arm-cortex-m4, the two are supposed to be "software and pin compatible (with limited adaptations)", so maybe it'll work after all.  I'm not sure what to think of that "limited adaptations" qualifier, though.


Edited by mjr, 09 August 2014 - 07:18 PM.