Jump to content



Photo
* * * * * 3 votes

New DIY plunger design


  • Please log in to reply
734 replies to this topic

#381 hauntfreaks

hauntfreaks

    Real 4K Tables Since 2013

  • VIP
  • 2,522 posts
  • Location:South Jersey

  • Flag: United States of America

  • Favorite Pinball: -<3<3<3 All Real Pins



Posted 20 February 2015 - 06:04 AM

tested pin #1 to #6/#12 

Results:

light = 3.3v

dark = 2.87v

 

did a continuity test on all wires, all test fine...

 

so very odd...  oh and yeah I been soldering slot cars, RC stuff for 35yrs... right now i'm using a hakko 936 (at the lowest heat possible)... i wish i could blame the soldering...lol


Edited by hauntfreaks, 20 February 2015 - 06:08 AM.

 26794541816_30ca1cca80_o.gif 43109635392_fc11af1a57_o.gif


#382 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,323 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 20 February 2015 - 07:34 AM

tested pin #1 to #6/#12 

Results:

light = 3.3v

dark = 2.87v

 

did a continuity test on all wires, all test fine...

 

so very odd...  oh and yeah I been soldering slot cars, RC stuff for 35yrs... right now i'm using a hakko 936 (at the lowest heat possible)... i wish i could blame the soldering...lol

 

Hmm...  It's interesting that you're seeing *some* voltage difference between light and dark.  It suggests that the sensor isn't completely dead.  But the dark output voltage is way too high - according to the data sheet, that shouldn't be higher than 0.3V.  (I'm assuming you're measuring this with the device hooked up to the KL25Z and with the KL25Z program running to send the clock signal - otherwise the output port on the sensor just has the last latched voltage, which will have a random power-on charge if you haven't clocked it at all since applying power.)

 

I don't know what else to try.  It does just seem like it's a bad sensor.  I guess if you want to try getting out that oscilloscope and looking at the waveforms, that might turn up something new, or at least confirm that the inputs all look like they should and the output is just mysteriously inert.



#383 lemming77

lemming77

    Hobbyist

  • Members
  • PipPip
  • 12 posts
  • Location:Australia

  • Flag: Australia

  • Favorite Pinball: Scared Stiff

Posted 24 February 2015 - 05:46 AM

 

Hi
 
Thanks for sharing the code for this great project.
 
I've changed some code to get it to work with a slide potentiometer for the analog plunger instead of the CCD array:
 
http://www.ebay.com....tm/231268347558
 
It works out to be much cheaper.
 
I've still got a bit of tweaking to do but it looks like it will work out fine.
 
Has anyone else had a go at using something other than the CCD?
 
Thanks


That's great! I was about to fork the code to do this myself. I am planning to use this with my LVDT plunger.



Did you fork the code and is it available?

 

http://developer.mbe...troller_Slider/

 

Uses pin PTB0


Edited by lemming77, 24 February 2015 - 05:59 AM.


#384 lemming77

lemming77

    Hobbyist

  • Members
  • PipPip
  • 12 posts
  • Location:Australia

  • Flag: Australia

  • Favorite Pinball: Scared Stiff

Posted 24 February 2015 - 06:10 AM

Has anyone released a fork for this code using an analog input and an A/D? Lemming had said he worked on it.

Hi

 

I have uploaded a fork.

 

To tell you the truth, it only took 3 lines of code to get it working.

Uses PTB0 for the analog input

It basically just takes the analog reading of the potentiometer and remaps it to the z axis instead of the CCD reading.

My changes are in the main.cpp file and are commented with //lemming

You may need to adjust the -0.2 value to account for where your pot is at rest.

https://developer.mb...troller_Slider/

 

I might revisit the code at some point, but it works for me just fine.

I have 3D printed a holder for it all. Dropbox link

 

 

Here is a pic of it installed --> How can I embed the photo?

 

PS - Perhaps Mike could add official support for analog linear pots and other similar devices that report a simple analog 0~1023 range with calibration functionality in the Windows configuration utility etc. He's a much better coder than I.


Edited by lemming77, 24 February 2015 - 10:31 PM.


#385 Zilverone

Zilverone

    Hobbyist

  • Members
  • PipPip
  • 27 posts
  • Location:East Tennessee

  • Flag: United States of America

  • Favorite Pinball: Twilight Zone, Silverball Mania, Jurassic Park, too many to list.

Posted 25 February 2015 - 01:52 AM

Lemming, that is an interesting design.  And it lends itself to an idea that I would like to try when I start on my own cabinet.  I've watched a lot of video about cabinets that people have built and one thing has always bugged me about their plungers.  When let go, it bounces several times because it didn't strike a ball.  It would be nice to put an object at the end of the plunger so that when you pull back and release, there will be that feedback of the plunger hitting something and it won't bounce.  Maybe a real pinball captured in a tube angled down towards the plunger so when struck it will go a short distance, hit a bumper or spring then come back for the next ball.



#386 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,323 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 26 February 2015 - 05:34 AM

 

Has anyone released a fork for this code using an analog input and an A/D? Lemming had said he worked on it.

 

I have uploaded a fork.

 

PS - Perhaps Mike could add official support for analog linear pots and other similar devices that report a simple analog 0~1023 range with calibration functionality in the Windows configuration utility etc. He's a much better coder than I.

 

Thanks for publishing your updates!

 

I'll definitely look at integrating that into the main branch at some point.  I agree that it would be worthwhile to make it work with the calibration scheme to get the rest position calibrated correctly.  That shouldn't be hard conceptually; it'll just take a little rearranging of the code.



#387 lemming77

lemming77

    Hobbyist

  • Members
  • PipPip
  • 12 posts
  • Location:Australia

  • Flag: Australia

  • Favorite Pinball: Scared Stiff

Posted 26 February 2015 - 08:46 AM

 

 

Has anyone released a fork for this code using an analog input and an A/D? Lemming had said he worked on it.

 

I have uploaded a fork.

 

PS - Perhaps Mike could add official support for analog linear pots and other similar devices that report a simple analog 0~1023 range with calibration functionality in the Windows configuration utility etc. He's a much better coder than I.

 

Thanks for publishing your updates!

 

I'll definitely look at integrating that into the main branch at some point.  I agree that it would be worthwhile to make it work with the calibration scheme to get the rest position calibrated correctly.  That shouldn't be hard conceptually; it'll just take a little rearranging of the code.

 

Much appreciated.

 

When I was looking into getting your calibration program working with my changes, I thought of sending reports back to the calibration program with dummy CCD data based on the z reading I calculated from the linear pot. The advantage would have been that your calibration tool would work fine without modification.

 

Perhaps a better way though would be to make the app aware of the possibility of the two different sensor types. You could save this option to non-volatile memory and write code to account for it.

 

In the case of the non-CCD plunger sensors, you could save on CPU cycles and perhaps free up 2 extra ports for more LEDWiz outputs.

 

I hope you understand my ramblings...



#388 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,323 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 28 February 2015 - 10:36 PM

I've just posted a fairly big update of the Pinscape controller software - it's available on the mbed.org repository page as usual at http://developer.mbe...ape_Controller/.

 

New features and improvements:

 

* Potentiometer support for the plunger sensor.  You can now use a slide pot instead of the CCD.  This is a cheaper and somewhat easier (electrically, anyway) alternative to the CCD.  The build guide has some pointers to pots that should work (including the exact one that lemming77 is using) and instructions on how to set it up.  

 

* "ZB Launch Ball".  Zeb of zebsboards came up with a clever scheme for his digital plunger kit that lets the plunger simulate the Launch Ball button for tables that don't have plungers.  No scripting is required on the table; it's all handled in the plunger.  I borrowed this feature and put it in the Pinscape software.  This is a really nice feature if you don't like the clutter of having both the mechanical plunger and the Launch Ball pushbutton, because it lets the plunger serve as the universal launcher for all tables.  Even if you have both buttons (as I do), it's still a nice enhancement.  I've noticed friends playing plunger-less games on my cab always reach for the plunger first, and I even have this reflex myself a lot of the time, so it's great to have the plunger just do the right thing rather than sit there inertly and force you to press the other button.

 

It takes a little bit of configuration work to get the ZB Launch Ball feature set up, so please read the build guide for details.

 

* Better code organization of the configuration options.  All of the options that you might want to change for your personal cabinet setup are now isolated in a separate file, config.h.  This makes it easier to find the code you might want to edit to customize the various settings, but more importantly, it will make it much easier down the road to merge any changes you make with future updates I release.

 

* Faster and smarter plunger sensing.  I don't know if anyone else noticed this (if so, you were kind enough not to mention it :)), but in past versions of the Pinscape software, the *strength* of the plunger wasn't as consistent as I'd like.  The position sensing was always good, but the speed sensing when releasing the plunger varied more than it should.  I've understood the root cause of this for a long time - it has to do with the plunger moving so quickly when released that it turns into a motion blur on the CCD image capture, like a car whizzing by in a photo.  The motion blur made the position sensing imprecise at the moment you released the plunger, and that translated to imprecise force/strength in VP.  I had some heuristics in the software to try to deal with this, but they caused a small amount of latency in the position sensing and weren't as effective as I wanted them to be.

 

Anyway, I've finally cracked this nut, through a combination of faster sensor readings and improved heuristics.  The release speed sensing now seems very consistent and realistic, plus regular tracking has practically no latency now.

 

* Faster key encoding.  The latency of key encoding is now practically zero.  I changed the debouncing algorithm to work prospectively rather than retrospectively, so key state transitions are now reported immediately (as fast as the USB reports can go, anyway).

 

* Improved code modularity for plunger sensors.  As part of adding the potentiometer sensor option, I set things up so that new types of sensors can be easily added in a well-defined way.  If you have any ideas for new types of sensors that you want to try out, it should now be clear how to integrate them into the code base.  I'd of course be happy to integrate code for any new sensors that anyone comes up with into the main project.

 

 



#389 lemming77

lemming77

    Hobbyist

  • Members
  • PipPip
  • 12 posts
  • Location:Australia

  • Flag: Australia

  • Favorite Pinball: Scared Stiff

Posted 01 March 2015 - 12:41 AM

Video of slide potentiometer in action on test table



#390 sliderpoint

sliderpoint

    Pinball Fan

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

  • Flag: United States of America

  • Favorite Pinball: Metallica

Posted 01 March 2015 - 01:53 AM

Awesome feature on the ball launch. I asked about that in the vp10 thread because TPA a and PFX2 already have that built in. But there wasn't any reply about it.

-Mike

#391 sliderpoint

sliderpoint

    Pinball Fan

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

  • Flag: United States of America

  • Favorite Pinball: Metallica

Posted 01 March 2015 - 02:30 AM

New build from mbed not working for me.  crosshairs when not being touched much more scattered than normal and the z axis with the CCD not working at all,  even after attempt at calibration.  Went back to build as of 1/25 and it's back to working. 

 

-Mike



#392 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,323 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 01 March 2015 - 03:04 AM

New build from mbed not working for me.  crosshairs when not being touched much more scattered than normal and the z axis with the CCD not working at all,  even after attempt at calibration.  Went back to build as of 1/25 and it's back to working. 

 

Strange - I didn't change anything about the accelerometer code, but maybe there's some other interaction causing the problem.  When you say more scattered than normal, are you talking a matter of degree, or do you mean qualitatively different, like wildly random?  Do you have any input buttons wired to the KL25Z or output devices on it (LedWiz emulation)?

 

Thank goodness for source control, at least.  If you have a chance, you might try installing the new version again and take a look at the CCD exposure meter in the Windows config tool to see what it's showing.  That might provide some clue about why the plunger isn't working, at least.

 

It might also be worth a shot to install the new code and then disconnect the USB cable(s) for at least 10 seconds or so to power cycle the KL25Z and make sure the Windows USB connection resets, just in case it's a USB glitch.  (And close all of the Windows software that might be accessing the device when you do this.)



#393 sliderpoint

sliderpoint

    Pinball Fan

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

  • Flag: United States of America

  • Favorite Pinball: Metallica

Posted 01 March 2015 - 06:09 PM

OK, I tried this again and messed around a bit to see if I could figure out what was going on. X/Y seems fine now. but the Z was an issue with the light sensitivity.  Everything setup and testing the z axis has two points that it will go to when pulling the plunger.  rest(about 1/2) and about 3/4 back, not moving to those points as much as jumping to those points.  Then When I opened my coin door, it lets in more ambient light and it then worked as normal.

 

I previously had a small micro switch position at the end of the plunger that I used for auto launch tables (push the plunger all the way in to activate the switch). That operated off a small wire (coin slot switch).  Previously it only showed a very light grey line on the exposure tool and didn't interfere, but it was being picked up quite a bit more with the newer build.  Once I removed that switch it was back to working normal.

 

Now I need to get the ZB launch setup.  Where can I find that build guide?

 

-Mike

 

EDIT: nevermind about the build guide.  I just realized you meant your updated build guide.


Edited by sliderpoint, 01 March 2015 - 06:15 PM.


#394 sliderpoint

sliderpoint

    Pinball Fan

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

  • Flag: United States of America

  • Favorite Pinball: Metallica

Posted 02 March 2015 - 12:11 AM

Geez, trying to install and configure DOF just to get the auto launch is a pain. I think I have it setup other than I don't understand what my cabinet.xml file should look like when I don't have any of the things mentioned in the DirectOutput instructions for cabinet setup (toys,colors, etc.).  Can someone help me with a cabinet.xml with only the FRDM-KL25Z and whatever is needed for the ZB Launch Ball with the default port numbers?

 

-Mike



#395 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,323 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 02 March 2015 - 05:29 AM

OK, I tried this again and messed around a bit to see if I could figure out what was going on. X/Y seems fine now. but the Z was an issue with the light sensitivity.  Everything setup and testing the z axis has two points that it will go to when pulling the plunger.  rest(about 1/2) and about 3/4 back, not moving to those points as much as jumping to those points.  Then When I opened my coin door, it lets in more ambient light and it then worked as normal.

 

I previously had a small micro switch position at the end of the plunger that I used for auto launch tables (push the plunger all the way in to activate the switch). That operated off a small wire (coin slot switch).  Previously it only showed a very light grey line on the exposure tool and didn't interfere, but it was being picked up quite a bit more with the newer build.  Once I removed that switch it was back to working normal.

 

Now I need to get the ZB launch setup.  Where can I find that build guide?

 

-Mike

 

EDIT: nevermind about the build guide.  I just realized you meant your updated build guide.

 

Glad you got it going!  I should have thought of the light level for the CCD.  The new code reads the CCD faster, which gives it less exposure time per frame, so it certainly stands to reason that the new version might require a little higher brightness on the light source.  I didn't run into this myself, so it didn't occur to me that this might be an issue.


Geez, trying to install and configure DOF just to get the auto launch is a pain. I think I have it setup other than I don't understand what my cabinet.xml file should look like when I don't have any of the things mentioned in the DirectOutput instructions for cabinet setup (toys,colors, etc.).  Can someone help me with a cabinet.xml with only the FRDM-KL25Z and whatever is needed for the ZB Launch Ball with the default port numbers?

 

If you do everything with the defaults on the Pinscape code side, these should be the settings you need:

 

1.  In DOF Configtool, in your FRDM-KL25Z port list, set port 32 to "ZB Launch BalL"

 

2.  In VP, open the Preferences | Keys dialog, and in the drop-down list under Plunger, select "Button 24"

 

I don't think you need to create a cabinet.xml file at all if you use the DOF Configtool - I think you just need the directoutputconfig8.ini file, which goes in the DirectOutput Framework install directory (where the DOF DLL files are).



#396 sliderpoint

sliderpoint

    Pinball Fan

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

  • Flag: United States of America

  • Favorite Pinball: Metallica

Posted 02 March 2015 - 07:23 AM

hrm... not working yet.  For the account settings should it be 1 LEDWiz and 1 FRDM-KL25Z?  The 1 LEDWiz was there by default, but I removed that.

 

EDIT:   Nevermind.  My plugins folder was in the wrong directory.  It's working now.

 

Thanks for all your efforts MJR!

 

Oh and to answer my own question for anyone else who reads this, it doesn't matter if you say you have 1 LEDWiz.

 

-Mike


Edited by sliderpoint, 02 March 2015 - 07:33 AM.


#397 voliveira

voliveira

    Neophyte

  • Members
  • Pip
  • 4 posts

  • Flag: Portugal

  • Favorite Pinball: Elvira

Posted 02 March 2015 - 11:28 AM

Mjr and Lemming77, you are now my gods for some weeks period!

 

I am going to implement the plunger with the potentiomenter and also try to put two KL25Z running all the five RGB's, flasher, flippers, buttons, shaker, knocker, gear, etc!

 

My thankful regards,

 

Vitor 



#398 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,323 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 02 March 2015 - 09:07 PM

hrm... not working yet.  For the account settings should it be 1 LEDWiz and 1 FRDM-KL25Z?  The 1 LEDWiz was there by default, but I removed that.

 

EDIT:   Nevermind.  My plugins folder was in the wrong directory.  It's working now.

 

Thanks for all your efforts MJR!

 

Oh and to answer my own question for anyone else who reads this, it doesn't matter if you say you have 1 LEDWiz.

 

Yay!  Glad you got it working.  


I am going to implement the plunger with the potentiomenter and also try to put two KL25Z running all the five RGB's, flasher, flippers, buttons, shaker, knocker, gear, etc!

 

I'll have to add an option so that you can configure the second KL25Z purely as an output device, with the joystick reporting turned off.  It would probably confuse things in VP (or at least create USB overhead) to have both devices reporting accelerometer inputs all the time.  It should be fairly easy to turn that off - I'll have a look and let you know when an update is available.



#399 hauntfreaks

hauntfreaks

    Real 4K Tables Since 2013

  • VIP
  • 2,522 posts
  • Location:South Jersey

  • Flag: United States of America

  • Favorite Pinball: -<3<3<3 All Real Pins



Posted 03 March 2015 - 01:49 AM

Video of slide potentiometer in action on test table

 

I'm sure i'm late to the party... can you post a link to the potentiometer you used??

 

EDIT:  oops... I found it...


Edited by hauntfreaks, 03 March 2015 - 06:44 AM.

 26794541816_30ca1cca80_o.gif 43109635392_fc11af1a57_o.gif


#400 sliderpoint

sliderpoint

    Pinball Fan

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

  • Flag: United States of America

  • Favorite Pinball: Metallica

Posted 03 March 2015 - 05:52 AM

I just found that the ZB Ball Launch doesn't work so well for Champion Pub.  This is a table where you should hold in the launch button and then release it at a certain point to get "stuff".  I don't know how many other tables there are like this one, but the forward push on the plunger doesn't "hold" the launch button down, just fires it. Where should I post this kind of issue (if Zeb is interested in reworking it).

 

-Mike