Jump to content



Photo
* * * * * 3 votes

Pinscape expansion board preview


  • Please log in to reply
285 replies to this topic

#121 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,331 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 01 February 2016 - 07:56 PM

 (I am considering stacking a couple of resistors and a LED in that spot for each channel to provide a visual status of individual gate activation. It will be a useful debugging tool, and besides - I like flashy lights. :) )

 

Nice!  Your cab will have quite a light show on the inside. :)  I wish there were room to put in optional pads for these on the board to make it easier to add those, but I don't think there's any way I could fit them in.

 

 

Adding series gate resistors to the MOSFETs will slow their slew rate slightly, and help moderate any ringing / transients that may occur at switching. 

 

That's the exact reason I have in mind.  I haven't seen any overt effects from that ringing in my testing, but I'll bet it's there, and there's at least one good reason to suppress it even if it's not causing obvious problems: it apparently can cause a lot of EMI emission if left unchecked.  I'm running the PWM clock at 500 kHz, which provides very flicker-free lighting and buttery smooth fades, but it's fast enough to be in the radio spectrum.

 

(There's also a lot of dogma in the Arduino world about needing them to limit the initial surge of current through the Arduino GPIO pin to the gate as it charges or discharges on a switch edge, but after doing the math I think it's mostly superstition.  The gate charge in most FETs is so tiny that I don't think enough the overall power dissipation is significant to the GPIO circuitry.  That's utterly irrelevant for us in any case since the MOSFET gates aren't anywhere near the GPIO pins - we have optos and TLC5940's between here and there.)

 

 

 

I have not researched the opto's characteristics nor the PWM waveforms that drive them. I know that in high speed applications, a gate-ground resistor allows the gate voltage to bleed off much faster and yield a more "controlled" transition to off. It looks like the 1k resistors between gate and ground are targeted to do just that.

 

And in this case, I think the gate-ground resistors are actually required to pull the gates to ground when the outputs are off, because otherwise they'd just float.  In Arduino applications with the gate connected directly to a GPIO pin, the pull-downs would be optional because the GPIO pin would actively assert 0V when at logic low, but with the optos there'd be nothing to pull to ground when the opto isn't conducting.  So the gate would just stay charged and would most likely stay stuck on indefinitely.

 

 

I have to plead ignorance on some aspects of MOSFET operation. I know that most - if not all - MOSFET designs include an intrinsic body diode between source and drain. I understand its primary purpose is to prevent an unstable point in the MOSFETs operational range, and is not so much there as a protective device. What I don't know is what kind of transient it can absorb or if it needs an external device to keep it stable. I expect in this application, with power demands so far below operating limits, this paragraph is moot. :)

 

I haven't studied them in very much depth either, but I'm pretty sure the integrated diode won't offer much protection against flyback current.  I think you'll really want to use a separate diode for each inductive device.  Even separately from protecting the MOSFETs, pin cab builders routinely have problems with spurious logic noise on their PC motherboards and other USB devices throughout the system if they don't have good flyback protection on each contactor, motor, relay, etc.  This is one of the vexing problems that comes up over and over, and diodes are usually the answer.

 

I actually thought about putting flyback diodes on the boards themselves, but there are too many problems with that.  The space budget is pretty much a showstopper for that, but even if there were space, connecting the voltage supply would be a big problem.  Each device's diode has to attach between power and ground for the particular voltage source the device is using.  But the outputs are specifically designed to be used with a mix of voltage supplies - you might want 24V for the contactors, 35V or 40V for the knocker, 9V for the shaker, 12V for the gear motor, 5V for lamps, etc.  To integrate the diodes on the boards, each output would have to be assigned to a particular power supply voltage, which would have reduced the flexibility of the setup.   This is the exact reason almost no one takes advantage of the integrated diodes on the LedWiz.  Plus I think there's something to be said for putting the diodes physically close to the device so that the flyback current is dissipated in the shortest possible length of wire, to minimize antenna effects.


Edited by mjr, 01 February 2016 - 07:58 PM.


#122 NobodyYouKnow

NobodyYouKnow

    Hobbyist

  • Platinum Supporter
  • 48 posts

  • Flag: United States of America

  • Favorite Pinball: Space Invaders

Posted 01 February 2016 - 10:42 PM

I agree, Mike. In my honest opinion, flyback diodes MUST be placed as close to the device generating the transient as possible. There may be suppression at additional locations for a belt and suspenders backup. I have also heard of the use of a Schottky or zener diode to help the transient dissipate more quickly.

 

This does make me consider what will happen when I use PWM with an inductive device - say I want to slowly build a rumble with a shaker motor. With the PWM clock at 500KHz and anything between 0 and 100% (non-inclusive) duty cycle, transitions will occur 1/500,000=2µs. When we factor in both On and Off cycles, these transitions will come about every 1µs. Looking at the ubiquitous 1N400X devices (these are my go-to diode for flyback), I see a 30µs recovery time. If I am understanding this right, I will need a diode with a much faster recovery time.

 

Maybe it is time to look into a Schottky diode (or maybe even a TVS) for this reason alone. Hmmm . . . :think:



#123 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,331 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 02 February 2016 - 02:05 AM

This does make me consider what will happen when I use PWM with an inductive device - say I want to slowly build a rumble with a shaker motor. With the PWM clock at 500KHz and anything between 0 and 100% (non-inclusive) duty cycle, transitions will occur 1/500,000=2µs. When we factor in both On and Off cycles, these transitions will come about every 1µs. Looking at the ubiquitous 1N400X devices (these are my go-to diode for flyback), I see a 30µs recovery time. If I am understanding this right, I will need a diode with a much faster recovery time.

 

I use 1N4007's for everything in my cab, and it's been trouble-free.  But then again I'm currently driving the shaker with an actual LedWiz, which clearly has a much slower PWM frequency.  I haven't seen their actual numbers anywhere, but given that the LedWiz produces very visible flicker in LEDs at partial brightness, their total cycle time must be less than about 50 Hz; they use about 50 PWM steps, so their clock might be as low as maybe 3 kHz.  I guess we'll have to see how the higher clock rate interacts with motors.  If this does turn out to be an issue, do you think that we could address it by adding a capacitor at the motor to smooth out the square wave and turn it into a DC voltage level for the motor, rather than going to an exotic diode?  (As I've said before, my answer to everything is "add capacitors". :)) Or do we get some kind of complex, non-Euclidean Lovecraftian horror of an RLC system if we try that?



#124 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,331 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 02 February 2016 - 03:10 AM

Hang on - we might be overthinking this.  The 500kHz clock is the internal grayscale clock going into the TLC5940's.  It uses that to count out the 4096-step grayscale cycles.  So the square waves coming *out* of the TLC's are actually at the grayscale clock rate divided by 4096 - so about 120 Hz.  That's the signal rate that the motor will see.  The pulse width can get down to 1/500kHz = 2us at the lowest intensity, but that probably doesn't matter, right?   Because the diode always gets 8ms between downward edges - way longer than the 30us recovery time.



#125 NobodyYouKnow

NobodyYouKnow

    Hobbyist

  • Platinum Supporter
  • 48 posts

  • Flag: United States of America

  • Favorite Pinball: Space Invaders

Posted 03 February 2016 - 02:11 AM

"some kind of complex, non-Euclidean Lovecraftian horror of an RLC system" - I am SO using that.

 

RLC networks lack the nuance of a mechanical component quasi-randomly changing the "L" piece of the RLC network. I think your above assessment of a chaotic system is going to be pretty spot-on. We could always go to H-bridges, but lets leave that adventure for another time.

 

:love39: :love39:ALL HAIL LORD CTHULU! :love39: :love39:



#126 manples

manples

    Hobbyist

  • Members
  • PipPip
  • 20 posts
  • Location:Texas, USA

  • Flag: France

  • Favorite Pinball: TOTAN

Posted 03 February 2016 - 03:16 AM

Hi mjr, I was about to setup a kl25z in my pincab, thanks to your impressive job :-)

Then I've been reading this thread and something caught my attention : 

 

 

(It turns out that the library bugs I found have been there all along.  What's more, they affect *everyone* using mbed for KL25Z USB projects.  It's kind of amazing that no one ever noticed until now.  But the nature of the bugs was that they'd only strike randomly, and fairly infrequently in most apps, so I guess everyone has just been blaming the Windows drivers. That's always a plausible excuse since we're all accustomed to a certain level of flakiness from Windows in general.  But in this case Windows was doing everything right.  The bugs were very clear and fixable on the device side.  Windows was uncharacteristically blameless. :))

 

 

Does it mean that you did release or will release a corrected firmware ?

 

Thanks a lot :-)


my wip


#127 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,331 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 03 February 2016 - 04:47 AM

Does it mean that you did release or will release a corrected firmware ?

 

Yes!  

 

It's a little complicated.  The USB updates haven't been published in the Pinscape Controller project yet, because I was in the middle of some sizable changes to the main project when I found the USB problems, and I'm still working on those now.

 

But... I did publish the USB fixes themselves.  That's a separate mbed library called USBDevice, and I published all of my bug fixes in my forked version of it.

 

If you're up for a little manual updating, you can import the USBDevice fixes into the Pinscape Controller project on your own forked version.  It's actually pretty easy to do if you've already set up your mbed account and done a build of the controller software:

 

- Go to the mbed compiler page

- Open the Pinscape Controller project in the tree on the left side

- Find "USBDevice" under the project in the tree

- Right-click USBDevice and select Update

- Click Compile at the top to rebuild with the updated library

 

When I finally publish the next update to the main controller project, the latest USB updates will all be integrated, so this will no longer be necessary.  But you can do the manual update if you want to pick up the changes in the meantime.  Chances are that you won't see any obvious differences - the bugs that I fixed were very in past versions, at least in my cab.  The usual symptom was random USB disconnects, so the fixes might help if you've been having problems of that sort.



#128 kixfan

kixfan

    Hobbyist

  • Members
  • PipPip
  • 20 posts

  • Flag: United States of America

  • Favorite Pinball: fun house

Posted 03 February 2016 - 05:02 AM

@mjr - Am I too late to get in on the order?



#129 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,331 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 03 February 2016 - 05:40 AM

@mjr - Am I too late to get in on the order?

 

There's still time - I haven't placed the order with the fabricator yet.  Let me know what you need and I'll put you on the list!



#130 kixfan

kixfan

    Hobbyist

  • Members
  • PipPip
  • 20 posts

  • Flag: United States of America

  • Favorite Pinball: fun house

Posted 03 February 2016 - 11:59 AM

 

@mjr - Am I too late to get in on the order?

 

There's still time - I haven't placed the order with the fabricator yet.  Let me know what you need and I'll put you on the list!

 

 

1 main, 1 power and 1 chime please.   Thanks!



#131 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,331 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 03 February 2016 - 07:17 PM

 

 

@mjr - Am I too late to get in on the order?

 

There's still time - I haven't placed the order with the fabricator yet.  Let me know what you need and I'll put you on the list!

 

 

1 main, 1 power and 1 chime please.   Thanks!

 

Okay, you're in!



#132 Slydog43

Slydog43

    Pinball Wizard

  • Platinum Supporter
  • 3,008 posts
  • Location:Hackettstown, NJ

  • Flag: United States of America

  • Favorite Pinball: Addams Family, All Williams 90's Games

Posted 03 February 2016 - 07:37 PM

Can't remember if I tried to get on the board list,  I would like to get 4 of each please



#133 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,331 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 03 February 2016 - 08:43 PM

Can't remember if I tried to get on the board list,  I would like to get 4 of each please

 

Nope, I didn't you see you there, but I just added you - 4 each of all three boards.  (If you didn't mean all three, let me know and I'll correct that.)



#134 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,331 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 03 February 2016 - 08:55 PM

The latest designs (hopefully final for this run) are up on the site - http://mjrnet.org/pi...sion-board.html.  The Mouser carts (linked from there as well) are also now up to date with the latest changes.  

 

If no one sees any errors in the next few days, I'll pull the trigger on the group order.



#135 manples

manples

    Hobbyist

  • Members
  • PipPip
  • 20 posts
  • Location:Texas, USA

  • Flag: France

  • Favorite Pinball: TOTAN

Posted 04 February 2016 - 02:37 AM

Thanks for your answer about the firmware ;-)
Can you add me on the order please ?
- 1 main
- 1 power
- the best shipping method
How do I pay you ? paypal ? will you PM to get the adresses ? (btw I live in USA)
Thanks a lot

my wip


#136 NobodyYouKnow

NobodyYouKnow

    Hobbyist

  • Platinum Supporter
  • 48 posts

  • Flag: United States of America

  • Favorite Pinball: Space Invaders

Posted 04 February 2016 - 05:55 AM

Hey Mike - For the gate and pull-down resistors on the latest MOSFET board, is it your vision that we stand the resistors on end, or maybe bend the leads nearly flush with the ends of the resistor body? Mechanically, that is a very tight spot for 1/4w resistors. Since the fit against the MOSFET will be the same regardless of horizontal / vertical orientation, I think I will go vertical with them. That said, there are 1/8w resistors out there, but I don't know if they are hefty enough - especially for the pull-down.

 

Thoughts?



#137 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,331 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 04 February 2016 - 06:53 PM

Hey Mike - For the gate and pull-down resistors on the latest MOSFET board, is it your vision that we stand the resistors on end, or maybe bend the leads nearly flush with the ends of the resistor body? Mechanically, that is a very tight spot for 1/4w resistors. Since the fit against the MOSFET will be the same regardless of horizontal / vertical orientation, I think I will go vertical with them. That said, there are 1/8w resistors out there, but I don't know if they are hefty enough - especially for the pull-down.

 

I actually started out thinking I'd need to vertical-ize those resistors to get them to fit, but after looking at my built board more closely I realized that wouldn't be so good.  The problem is that the MOSFETs are packed pretty tightly together with those resistors, and the MOSFETs have those big metal heat fins on the back, which are electrically connected to the drains.  I think there'd be too much of a risk of intermittent shorts between the resistor leads and drain fins if you installed the resistors vertically.  (Which wouldn't create any great risk of damaging anything - it would just turn on the shorted output by connecting the output to ground or +12V - but no one wants intermittent random firing of their outputs.)

 

Fortunately, there's no need for vertical installation if you use the resistors in the Mouser carts.  Those are incredibly teensy little metal film resistors - the 1/4W 1K and 47R parts are 3.2mm x 1.7mm.  They'll fit the 5mm lead spacing on the MOSFET boards quite comfortably.  (And they're fairly high precision - 1% - to boot.)

 

You could also just use 1/8W parts if you want, although you should bump the pull-downs to 2.2K if you do - that'll get them down to 65mW.  The 1K's will run at 144mW, which would technically be too much for 1/8W parts.  The 47-ohm gate resistors can be about as small as you want in terms of wattage since the only current they ever move is the tiny gate charge/discharge flow.


 

Thanks for your answer about the firmware ;-)
Can you add me on the order please ?
- 1 main
- 1 power
- the best shipping method
How do I pay you ? paypal ? will you PM to get the adresses ? (btw I live in USA)
Thanks a lot

 

Hi - you're on the list for 1 main + 1 power.

 

PayPal is probably the easiest way on my end, and yes, I'll get in touch by PM to get the mailing details.



#138 GeCh

GeCh

    Neophyte

  • Members
  • Pip
  • 8 posts

  • Flag: France

  • Favorite Pinball: terminator 2

Posted 05 February 2016 - 08:48 AM

 

Does it mean that you did release or will release a corrected firmware ?

 

Yes!  

 

It's a little complicated.  The USB updates haven't been published in the Pinscape Controller project yet, because I was in the middle of some sizable changes to the main project when I found the USB problems, and I'm still working on those now.

 

But... I did publish the USB fixes themselves.  That's a separate mbed library called USBDevice, and I published all of my bug fixes in my forked version of it.

 

If you're up for a little manual updating, you can import the USBDevice fixes into the Pinscape Controller project on your own forked version.  It's actually pretty easy to do if you've already set up your mbed account and done a build of the controller software:

 

- Go to the mbed compiler page

- Open the Pinscape Controller project in the tree on the left side

- Find "USBDevice" under the project in the tree

- Right-click USBDevice and select Update

- Click Compile at the top to rebuild with the updated library

 

When I finally publish the next update to the main controller project, the latest USB updates will all be integrated, so this will no longer be necessary.  But you can do the manual update if you want to pick up the changes in the meantime.  Chances are that you won't see any obvious differences - the bugs that I fixed were very in past versions, at least in my cab.  The usual symptom was random USB disconnects, so the fixes might help if you've been having problems of that sort.

 

Much much better on my side..

No disconnection since I updated USB library..

Big thanks.



#139 JiePieWie

JiePieWie

    Neophyte

  • Members
  • Pip
  • 6 posts

  • Flag: Netherlands

  • Favorite Pinball: Kiss

Posted 05 February 2016 - 08:58 AM

A few question from my side: do i need the power board when using programmable leds and normal led strips? Or do I only need the pinscape main board? And does the mouser-cart contain everything i need for all three boards? If so, is it possible to 'split' this cart into three (one for each board)? That would make it a bit easier for me to buy only the stuff i need :-)

 

BTW, great work on the board. I am also following mk47 on the german forum but i am truly in awe about what you have achieved  :love39:



#140 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,331 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 05 February 2016 - 05:28 PM

A few question from my side: do i need the power board when using programmable leds and normal led strips? Or do I only need the pinscape main board?

 

It basically depends on how many outputs you need and what the power requirements are.  The main board has:

 

- 16 outputs suitable for high-current LEDs like flashers and strobes - enough for the standard setup with five RGB flashers plus a strobe.  Those outputs can drive up to 1.5A each, so they're perfect for the big "star" LEDs, but they're not powerful enough for big physical feedback devices like motors or solenoids.

 

- Another 16 outputs for small, low-power LEDs, up to about 50mA per channel.  These are meant for RGB flipper and MagnaSave buttons - it's enough for five independent RGB LEDs (a separate channel for each flipper button and each Magna Save button, and one left over for something else, like maybe a Fire button).

 

- One high-power output with timer protection, meant specifically for a replay knocker.  This output has a MOSFET driver, so it can handle the current for a knocker coil directly.

 

So if you can fit all of your LEDs and LED strips somewhere into that set of outputs, you only need the main board.  

 

The power board simply adds 32 general-purpose MOSFET outputs that can handle about 4A each.  Those are suitable for just about any feedback device that runs on DC power - so really just about anything in a virtual cab.  These should definitely be good for any LED strips that fit within the amperage limit.

 

If your LED strips have their own power amplifiers, you might be able to connect them to the "small LED" outputs on the main board if you're not going to use those for flipper buttons.  You should check what kind of power they need for the inputs - if they have their own amplifiers, they might not need much at all.  

 

But on the other hand their switching electronics might not be compatible with the small LED outputs, which are really designed to drive ordinary LEDs directly.  They have constant-current drivers that will sink a constant 20mA to 60mA each (you set the exact current level by selecting the size of one of the resistors on the main board).  It might be necessary to add some external interface electronics to switch an amplified strip - this might just be a matter of adding an optocoupler for each strip output, which the "small LED" outputs would happily drive directly (because an optocoupler actually is an LED on the "input" side).  If you could give us more details on exactly what you're planning to use, I or someone else here might be able to help you figure out what's needed.

 

 

And does the mouser-cart contain everything i need for all three boards? If so, is it possible to 'split' this cart into three (one for each board)? 

 

There are actually three separate carts, one per board.  The links from the Parts List section on the main page (http://mjrnet.org/pi...sion-board.html) are broken out by board.

 

There are a couple of optional subsystems on the main board where you can leave out the components if you're not going to use them, like the TV-ON switcher.  So some of the items in the Main Board cart are optional.   I don't think the Mouser system has a way to add comments to line items, and I didn't want to create a bunch of separate carts for the main board, but I'll try to provide a good detailed breakdown of which components do what when I write up documentation for building the boards.


Edited by mjr, 05 February 2016 - 05:37 PM.