Jump to content



Photo
- - - - -

Pinscape Labs update - Plunger Sensors: A New Hope


  • Please log in to reply
71 replies to this topic

#1 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,323 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 25 March 2017 - 09:21 PM

I have some possibly really good news for those of us lamenting the obsolescence of the TSL1410 optical sensors.

 

Now that I'm finally past the IR project, I've been able to get back to finding a new plunger sensor.  The first one on my list, which I'm furthest along on testing, is looking awfully promising.  It's still in the prototype phase at this point, but it's a pretty complete prototype.  If anyone wants to be a beta tester, it's far enough along that I can help you get one going.

 

The basic technology is an optical quadrature sensor, which is the same type of sensor they put in inkjet printers to keep track of where the print head is located along its track.  It's a mature technology that's used in lots of applications that need high-precision position sensing.  There are lots of these sensors on the market, too, so the basic approach is a little less dependent on a single source than the TSL1410 approach was.  That said, the concrete design I have is all based on a particular device, so it would take some rework to adapt it to other devices.

 

A quadrature sensor is basically a little two-pixel optical sensor that moves along a "scale", which is a set of alternating black/white bars.  The sensor picks up the edges as it moves across the bars.  By counting the bars it passes, it can figure its relative position - "I'm 64 bars from the starting point". The two-pixel setup lets it determine which direction it's going, too, so it counts up or down as it moves back and forth.

 

I actually wasn't holding out much hope for this sensor.  My big concern is that quadrature is an inherently relative sensing system, so I was worried that the sensor would occasionally miss bars and make the count drift over time.  And I wasn't sure the sensor could keep up with the high speeds involved.  But in my initial testing, it's looking incredibly solid - it looks like it's even better than the TSL1410 in terms of stability and precision.  The sensor I'm using has a 75 LPI scale, which translates to 300 dpi.  The TSL1410 is nominally 400 dpi for the sensor itself, but the practical resolution is about 100 dpi since we have to interpolate a shadow edge that's never as fine-grained as the pixel pitch.  But we get the full 300 dpi out of the quadrature sensor, and it already feels smoother to me than the TSL1410.

 

The other good part is that the sensor I'm working with is pretty cheap - about $8 from Mouser.

 

Here's what the assembled system looks like (in my lab-bench plunger testing box):

 

plungerwithsensorandscale.jpg

 

The little white plastic part at the tip of the plunger snaps on between the spring and the e-clip.  It holds the circuit board with the sensor, and it's a 3D-printed part, as you might guess.  The white part at the base of the plunger is another 3D-printed part that holds the "scale" in place.  The scale is the brownish rectangular part; it's actually a piece of mirrored acrylic, but you're looking at the back of the mirror here.  That piece is stationary; the sensor carrier slides along it as you move the plunger.

 

Taking it apart so you can see the insides:

 

plungerwithsensor.jpg

 

And the shiny side of the scale: 

 

scale.jpg

 

Those are the black/white bars you're looking at.  They're actually printed on transparency film so that the mirror reflects in the "white" parts, and the transparency film is then stuck onto the acrylic with Scotch tape.  (That part is hokey, but the tape is at the ends where there's no wear, so I think it'll actually hold up.)

 

A closer look at the sensor:

 

sensorcloseup1.jpg

 

 

The ribbon cable matches the Pinscape expansion board plunger connector, naturally, so you just plug the other end into your expansion board port, select AEDR-8300 from the plunger type menu in the config tool (yes, I've already added it in my working version :)), calibrate, and you're set.

 

Now we get to the big downside.  The overall system is a lot more complicated to build than the TSL1410 setup was.  It consists of:

 

- two 3D printed plastic parts

- a laser-cut mirrored acrylic part

- a laser-printed-on-transparency-film overlay

- a small (1" square) custom circuit board (for the sensor)

 

All of these pieces are of course in electronic format ready for manufacturing, but the logistics are complex, since it involves ordering parts from Mouser, a 3D print service, a laser cutter service, and a board maker.  And then of course you have to assemble the circuit board - which as you can see is a tiny and simple board, except that it has one rather intimidating part, which is the sensor itself.  The sensor is a tiny surface-mount part with the pads on the bottom.  I've assembled two of them so far; it was much easier than it looked, and both worked on the first attempt, but the smallness makes it intimidating anyway.

 

So, is anyone interested in taking a stab at being the first beta tester?  It's a little bit of a risk, in that I only just got the prototype working, so it's not certain yet if the sensor will prove to be as wonderful in actual use as it looks to be in my test setup.  But I do think at this point that the sensor will work; the beta testing is more for the process of assembling it, to see how hard it really is.

 

 



#2 ScottyVH

ScottyVH

    Novice player, but love the game!

  • Silver Supporter
  • 443 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness, Cirqus Voltaire, Simpson's Pinball Party

Posted 25 March 2017 - 09:25 PM

Awesome!

test5.gif


#3 JasonLyvers

JasonLyvers

    Enthusiast

  • Members
  • PipPipPip
  • 69 posts

  • Flag: United States of America

  • Favorite Pinball: Space Invaders

Posted 26 March 2017 - 02:09 PM

I'd be up for beta testing. Looks like a really nice solution.

#4 kiwiBri

kiwiBri

    Enthusiast

  • Members
  • PipPipPip
  • 369 posts
  • Location:Ontario, Canada

  • Flag: Canada

  • Favorite Pinball: STNG/TAF/IJ

Posted 26 March 2017 - 03:35 PM

If my TSL1410R doesnt materialize from mouser, I was planning on using the pot Slider technique. This is another great solution though MRJ!  thanks!


Completed: (For now ;) )  - My 46/30/DMD Judge Dredd Cab Build


#5 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,323 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 26 March 2017 - 05:41 PM

I'd be up for beta testing. Looks like a really nice solution.

 

Great!  Let me get the plan files together and write up some notes on assembling it.



#6 sparkygoblue

sparkygoblue

    Neophyte

  • Members
  • Pip
  • 6 posts

  • Flag: United States of America

  • Favorite Pinball: Addams Family

Posted 26 March 2017 - 06:11 PM

If my TSL1410R doesnt materialize from mouser, I was planning on using the pot Slider technique. This is another great solution though MRJ!  thanks!

 

I recently made an order from mouser using mjr's parts lists and the TSL1410R is listed as pending shipment with an availability on June 26, 2017.  I also ordered the pot slider, but would prefer the optical solution.  We'll see if they're able to deliver.



#7 JasonLyvers

JasonLyvers

    Enthusiast

  • Members
  • PipPipPip
  • 69 posts

  • Flag: United States of America

  • Favorite Pinball: Space Invaders

Posted 26 March 2017 - 09:07 PM

Sounds good. I'll try to document the process from my side too - maybe we will get lucky and end up with a build guide when we are done.


I'd be up for beta testing. Looks like a really nice solution.

 
Great!  Let me get the plan files together and write up some notes on assembling it.


#8 Onevox

Onevox

    VP Zealot

  • Members
  • PipPipPip
  • 269 posts
  • Location:Virginia, USA

  • Flag: United States of America

  • Favorite Pinball: The Getaway, High Speed II

Posted 29 March 2017 - 04:08 PM

Have you thought about using the Sparkfun ZX Distance and Gesture Sensor? Wonder if the sensor was pointing directly at the tip of the plunger?

 

There's a video on this page that demos the software that shows the distance of an object from the sensor.

 

https://www.sparkfun.../products/12780


_____________________

 

My build: The Joker Poker.

http://www.vpforums....showtopic=37574


#9 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,323 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 29 March 2017 - 05:18 PM

Have you thought about using the Sparkfun ZX Distance and Gesture Sensor? Wonder if the sensor was pointing directly at the tip of the plunger?

 

There's a video on this page that demos the software that shows the distance of an object from the sensor.

 

https://www.sparkfun.../products/12780

 

I haven't looked at that sensor in particular, but these distance sensors in general aren't very good solutions for this - they're mostly low resolution and unstable.  There's a different class of these known as TOF (Time Of Flight) sensors that looks like they should have good enough precision, but I don't think they'll fix readings on a moving object fast enough.


Edited by mjr, 29 March 2017 - 05:18 PM.


#10 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,323 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 30 March 2017 - 06:06 AM

I'd be up for beta testing. Looks like a really nice solution.

 

Great!  Let me get the plan files together and write up some notes on assembling it.

 

All right, I've posted a first draft of the build chapter for the sensor.  All of the electronic plans are linked from the chapter.  

 

http://mjrnet.org/pi...hp?sid=aedr8300

 

The one piece I have yet to publish is the updated firmware with the support for this sensor, which is obviously pretty critical to getting it working!  It's all implemented and working, so I can publish it any time you're ready with the hardware, but I'm holding off for now pending any more tweaks in further testing on my end.



#11 JasonLyvers

JasonLyvers

    Enthusiast

  • Members
  • PipPipPip
  • 69 posts

  • Flag: United States of America

  • Favorite Pinball: Space Invaders

Posted 30 March 2017 - 01:28 PM

Wow. That's a pretty nice guide. I'll start buying parts tonight and let you know when I'm about to start.

#12 kiwiBri

kiwiBri

    Enthusiast

  • Members
  • PipPipPip
  • 369 posts
  • Location:Ontario, Canada

  • Flag: Canada

  • Favorite Pinball: STNG/TAF/IJ

Posted 30 March 2017 - 05:37 PM

WOW!  Quite the build! Good job, though far to complex for something I want to attempt ;-p


Completed: (For now ;) )  - My 46/30/DMD Judge Dredd Cab Build


#13 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,323 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 30 March 2017 - 06:28 PM

WOW!  Quite the build! Good job, though far to complex for something I want to attempt ;-p

 

It is a bit on the complex side - a lot more parts than the TSL1410R approach.  But it's not really as bad as it looks.  Soldering the surface-mount sensor is definitely intimidating, although I've done it twice now and it honestly looks about 20 times harder than it really is.  The rest is mostly logistics.  



#14 kiwiBri

kiwiBri

    Enthusiast

  • Members
  • PipPipPip
  • 369 posts
  • Location:Ontario, Canada

  • Flag: Canada

  • Favorite Pinball: STNG/TAF/IJ

Posted 05 April 2017 - 06:24 PM

 

WOW!  Quite the build! Good job, though far to complex for something I want to attempt ;-p

 

It is a bit on the complex side - a lot more parts than the TSL1410R approach.  But it's not really as bad as it looks.  Soldering the surface-mount sensor is definitely intimidating, although I've done it twice now and it honestly looks about 20 times harder than it really is.  The rest is mostly logistics.  

 

 

So I took a read of the build. Doesn't sound as difficult as I thought. The surface mount soldering could be the trickiest part.. but if it goes according to how you describe, it should work out. The price of a tube of the solder paste is around $CA22 here,  and the cost of shipping in the precut acrylic could also be $$.  Would be good candidate for a group buy/order and build process perhaps. 

I guess the attraction of this over the Pot Slider is getting the reliability of an *accurate* plunger system. You mention you think its reading in at 300 DPI where as the TSL1410R is around 100 DPI in real world usage?


Completed: (For now ;) )  - My 46/30/DMD Judge Dredd Cab Build


#15 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,323 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 05 April 2017 - 10:47 PM

I guess the attraction of this over the Pot Slider is getting the reliability of an *accurate* plunger system.

 

The pot is actually pretty accurate and stable by all accounts.  I haven't done any measurements with one of these to see what its precise resolution is, but I think generally that a good pot plus a good ADC gives you about 1% accuracy, which would translate to about .03" resolution or about 30 dpi.

 

 

You mention you think its reading in at 300 DPI where as the TSL1410R is around 100 DPI in real world usage?

 

Re the 300 dpi: it's not what I think, it's just the way it works. :)  The quadrature scale for this sensor is 75 bar/window pairs per inch, and the sensor knows its position to 1/4 of a pair, which is 1/300 of an inch.

 

The TSL1410R is a 400dpi sensor at the pixel level, but we can't take full advantage of that.  The limiting factor is the shadow sharpness, since the shadow tells us the position.  The shadow is usually at least a few pixels wide, so its position can't be resolved to a single pixel; it has to be interpolated to the range of pixels it covers.  This reduces the effective resolution to around 100dpi.

 

If you have a 1920x1080 display, the on-screen plunger is about 60dpi, so 100dpi is sub-pixel resolution as far as the on-screen plunger is concerned.  That is, it takes more than one "notch" on the physical plunger to see one pixel of motion in the on-screen plunger.  There's some benefit in terms of animation smoothness and stability to having about 2-3x the on-screen pixel density.  There's also incremental benefit in terms of simulation physics to higher input resolution, since VP operates at joystick resolution, which is almost unlimited (up to about 25000 dpi).

 

 

 

The price of a tube of the solder paste is around $CA22 here,  and the cost of shipping in the precut acrylic could also be $$.  Would be good candidate for a group buy/order and build process perhaps. 

 

Yes, probably so - the tools and materials needed do create some economies of scale.  I could probably pre-build a few of the sensor boards if there's enough interest, since I'm already set up.  The assembled boards plus acrylic guides would probably run about $12-$14 in parts, plus shipping.  I'm not sure if there are any price breaks for the 3D parts, so those might be best ordered separately, but if I can find any deals on a bulk order of those I might be able to put together a full kit.



#16 kiwiBri

kiwiBri

    Enthusiast

  • Members
  • PipPipPip
  • 369 posts
  • Location:Ontario, Canada

  • Flag: Canada

  • Favorite Pinball: STNG/TAF/IJ

Posted 06 April 2017 - 01:08 AM

MJR, thanks for the excellent explanation. I read it 3 time before I fully understood it ;)   Count me in for a set of boards/acrylic please! :)   I was also going to ask about the transparency sheet - do you need to buy a large pack from staples, or can it be purchased per sheet? Another one for the economies of scale?

 

I have used 3dhubs.com for my 3d printed parts and it is way cheaper than using places like Shapeways. 3DHubs crowdsources local people with printers to make your prints. My DMD frame only cost me $15 delivered. Took about 4 or 5 days.  I think the printed parts for this system would come in for me around $15 a set based a quick check. (Depends on whom you use and what material/colour you print with).  


Completed: (For now ;) )  - My 46/30/DMD Judge Dredd Cab Build


#17 llamastick

llamastick

    Neophyte

  • Members
  • Pip
  • 7 posts
  • Location:Sheffield, UK

  • Flag: United Kingdom

  • Favorite Pinball: Star Trek TNG, AC/DC

  • PS3 Gamer Tag: llamastick

Posted 11 September 2017 - 11:12 AM

Hi MJR,

Quick question. Looking at the spec sheet that comes with the sensor, it appears to my extremely untrained eye that the two pads in the middle (the i shape) do not need to be soldered - is that correct?

 

The six pairs of 'legs' says - Note: The shaded areas are the leads for soldering.

The 'i' shape says - Note:The shaded areas are not encoder pin-outs. They are electrically grounded and physically exposed. PCB layout with tracks running across these areas should be avoided.

 

I will probably put paste on all of it, like you have, but I was wondering whether successful soldering of the 'i' was essential or not.

 

Many thanks for all your innovation in this area!

 

Steve.



#18 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,323 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 11 September 2017 - 05:05 PM

Quick question. Looking at the spec sheet that comes with the sensor, it appears to my extremely untrained eye that the two pads in the middle (the i shape) do not need to be soldered - is that correct?

 

Exactly right!



#19 Barsk

Barsk

    Neophyte

  • Members
  • Pip
  • 2 posts

  • Flag: Sweden

  • Favorite Pinball: Star Trek

Posted 14 September 2017 - 10:52 AM

Hi!

 

I'm new to the Pinscape world as of today. I was thinking of building my own controller board with a nudge sensor when I stumbled upon the Pinscape project - which solves everything! And more! Really impressive work, and it is going to save me probably houndreds of hours. :) Thanks!

The first culprit I encountered was the sensor issue. And then I found this thread. Looks very interesting indeed!

 

A thought is whether one could print the scale bars on a vinyl cutter, and then apply it to say metal foil to work as a reflective surface. Might that work? The bars are thin (about 1.6 mm) but I think it is doable with a Cameo for instance. Thoughts?

 

You also mention the scale (acrylic) be laser cutted. Why? Are the dimensions that critical? I'm thinking of 3D-printing the scale and then applying the foil and vinyl on top of that.


Edited by Barsk, 14 September 2017 - 10:53 AM.


#20 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,323 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 14 September 2017 - 04:20 PM

I'm new to the Pinscape world as of today. I was thinking of building my own controller board with a nudge sensor when I stumbled upon the Pinscape project - which solves everything! And more! Really impressive work, and it is going to save me probably houndreds of hours. :) Thanks!

 

On the other hand, sorry to deprive you of the fun!

 

 

The first culprit I encountered was the sensor issue. And then I found this thread. Looks very interesting indeed!

 

A thought is whether one could print the scale bars on a vinyl cutter, and then apply it to say metal foil to work as a reflective surface. Might that work? The bars are thin (about 1.6 mm) but I think it is doable with a Cameo for instance. Thoughts?

 

I think it would be worth trying.  I experimented a bit with different materials when I was first setting it up, and metal foil is definitely reflective enough for it.  It does need to be something highly "specular" like a metal foil or mirror; white surfaces like paper or white plastic aren't good enough.  My big reservation about trying to hand-cut the bars into foil is that the bar widths have to be pretty consistent to get accurate quadrature counts.  I think there's a good chance you'll get a reasonable degree of responsiveness out of the sensor, but it won't be able to keep count accurately, so when you move it X cm in one direction and then move back X cm to the starting position, the counts won't quite match, which will make the on-screen reading drift from the original starting position.  The software can actually deal with that to some degree by re-zeroing the position periodically, but if the missed count rate is too high, the drift will become noticeable.

 

 

You also mention the scale (acrylic) be laser cutted. Why? Are the dimensions that critical? I'm thinking of 3D-printing the scale and then applying the foil and vinyl on top of that.

 

I only use laser cutting because it's easy.  Precision isn't nearly as important with this - I think you could get a perfectly good result with hand cutting a piece of acrylic with a plastic cutting knife.  It's just a rectangular piece, after all.  I'd still suggest using acrylic or something similar, though.  If you use 3D printing, the edges will be too rough, and the plastic will be too soft.  The rough edges will create a lot of friction between the guide and the sensor carrier, so I don't think the motion will be as smooth as you want, and it'll probably get a lot of wear over time.  Cut acrylic (especially if you use laser cutting) will have really nice smooth edges, and it's a really hard plastic so it'll stand up to a lot of use.