Jump to content



Photo
- - - - -

[Resolved] My Transistors Aren't Transisting

homemade transistor mosfet driver electronics noob

  • Please log in to reply
8 replies to this topic

#1 Gornkleschnitzer

Gornkleschnitzer

    Hobbyist

  • Members
  • PipPip
  • 22 posts

  • Flag: ---------

  • Favorite Pinball: Twilight Zone

Posted 06 October 2017 - 02:06 AM

Note to mods:  Cross-posted from the general pinball board by request.  Hope that's okay.

 

Well, it's really happening.  I'm building a fully functional pinball machine from scratch.

 

https://imgur.com/a/xapEa

 

Cabinet construction and wiring are basically done, power supply and sound system is done, Pi 3 is awaiting configuration and programming, VP version of playfield prototype is laid out, and almost all playfield parts are collected in a box.  Basically... this thing is really happening.

 

Detecting switches is no problem.  And thanks to a batch of 8-in-1 driver packages, controlling the LED lights - and sending them a variable signal to fade them in and out - also works like a dream.  Now here's where the problem lies:  Harnessing all that power.

 

The high power side is giving me some grief.  Between my Pi brain and my solenoids sits a trio of Teensy controllers, which output 3.3-volt signals.  From what I'm told, this might not be enough to switch an amply powerful MOSFET for my 56-volt 5-amp solenoids.  (56 volts was the closest I could get to the standard 50 when I was transformer shopping.)

 

I had gotten a batch of IRL510s and IRF530s, whose data sheets seemed to imply they could handle the power, but my bench test killed a 510 - and the 530, at the very least, could not successfully switch a flipper coil.  The power supply circuit works fine, as the flipper works great if I touch the wires together and bypass the transistor.  Tried the same for the knocker coil and found that it was delightfully loud.

 

Has anybody else tried anything like this?  Is there a simple solution to driving 56 volts from 3.3, or do I need to stock up on enough resistors and transistors to build Darlington pairs?  And which components would you recommend?  Am I asking too many questions?


Edited by Gornkleschnitzer, 07 October 2017 - 11:55 AM.


#2 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,266 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 06 October 2017 - 04:33 AM

Hi!  This is indeed something we virtual people do, since we want the simulation on the PC to be able to control high-power devices for feedback effects.

 

Could you post a schematic for your setup?  I think you're probably right that you're going to need a higher gate-drive voltage, but there could be something else wrong too, so it might help if we could look at your circuit design. 

 

Re gate voltage, IRL510 looks like it's rated for a minimum of 4V on the gate.  If you look at the Vgs graph in the data sheet, 3.3V on the gate will give you maybe 2A max on the drain, but it'll be in the partially conducting region at that voltage, so I expect it'll get awfully hot.  As for IRF530, that one looks far less friendly to logic inputs.  They rate it at a 10V gate drive, and it looks like it basically doesn't conduct at all below 4V.

 

I can see two solutions.  First is to look for a more logic-friendly MOSFET.  But I think you've already found your best bet there with the 510 - I don't think there's anything out there with lower gate drive voltage that will handle pinball coil voltage and current levels.  So you'll probably have to go with the second option, which is to tweak your circuit design to increase the gate drive voltage.  One easy way you could do that would be to use a "level shifter" IC, which will let you turn a 3.3V input into a 5V output.  You can also do the same thing with a simple NPN circuit, which would let you kick it up to 10V for the IRL510.  Yet another approach to increasing the voltage is to use an optocoupler.



#3 Gornkleschnitzer

Gornkleschnitzer

    Hobbyist

  • Members
  • PipPip
  • 22 posts

  • Flag: ---------

  • Favorite Pinball: Twilight Zone

Posted 06 October 2017 - 11:16 AM

Thank you!  I will write up a schematic sometime after work today, along with a photo of my grotesque-looking test circuit for visual reference.  Lamps give me easy access to 6V for a gate boost, and I'm loving your optocoupler idea.



#4 Gornkleschnitzer

Gornkleschnitzer

    Hobbyist

  • Members
  • PipPip
  • 22 posts

  • Flag: ---------

  • Favorite Pinball: Twilight Zone

Posted 07 October 2017 - 12:46 AM

Well, I promised pictures and here they are.

 

Schematic:

https://imgur.com/a/A6VQU

 

I double-checked my numbers and my original transistors were in fact IRF510, not IRL510.  Supplier Jameco Electronics doesn't seem to carry IRL510, which is disappointing.... anyone know where to get them?

 

Pin 13 of the Teensy board is the test driving pin, because this pin is also connected to the status LED.  If the orange light is on, the flipper should be, too.  My original test, which lacked the 6-volt gate power borrowed from my lamp circuit, just connected P13 directly to the main driver without the smaller transistor in between.  Both setups used the pulldown resistor, for which I chose 10K based on advice gathered from various sources.

 

Now here's the actual circuit, sitting in the bottom of my cabinet.  If you are an electrician or a formal electronics hobbyist, brace yourself as this photo may induce a heart attack.

https://imgur.com/a/qzQld

 

Leave it to a set of alligator clips to make things look not pretty!  Granted, it was late at night when I hooked this up, but as far as I can tell it matches the schematic.  All ground pins on the chips on my logic board are connected in some way - tested for continuity - and connected to the IRF510's source leg by way of a long blue wire.  The red flashlight is there to counteract the springiness of one of the wires and can be ignored.

 

I will need to set up a 12VDC circuit to drive the flashlamps, and if necessary I could probably tap it for gate power, maybe by way of that optocoupler you suggested.  I suppose this would also protect my logic board from frying to death if something significantly malfunctions on the driver board.

 

Does this seem like a reasonable optocoupler choice if I go that route?

https://www.jameco.c...DIP_878286.html



#5 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,266 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 07 October 2017 - 01:36 AM

I double-checked my numbers and my original transistors were in fact IRF510, not IRL510.  

 

Well, there's your problem. :)  What a difference one little letter makes.  IRF510 needs about 10V on the gate to turn on, so it's definitely not logic-friendly.

 

 

 

That looks reasonable, except for the gate drive voltage.  I think if you replace that 6V power supply with a 12V power supply, you can make it work with the existing MOSFETs.  Otherwise it seems like it should work.  The 2N7000 seems like it should serve as the voltage level shifter I was talking about, so you're covered there, you just need to shift higher for the parts you're using.

 

One thing you might want to add is a small resistor in series with the gate input to the IRF530, something in the mid double digits, like a 22 or 47 ohm.  Put it in place of the straight line between the 10K and the IRF530 gate.  MOSFETs apparently can have some weird effects due to little signal spikes bouncing off of the gate's capacitance during on/off transitions (known as "gate ringing"), and a small resistor leading into the gate is the standard way to suppress those.

 

 

Supplier Jameco Electronics doesn't seem to carry IRL510, which is disappointing.... anyone know where to get them?

 

Jameco is good for what they have, but they have a very limited line.  For a full-line electronics distributor, the top choices are Mouser.com and DigiKey.com.  A quick check on Mouser says they have the IRL510 type in stock.  (And many alternatives, more than you'd ever want to look through.)

 

 

Does this seem like a reasonable optocoupler choice if I go that route?

https://www.jameco.c...DIP_878286.html

 

Yep, I use the same type for similar purposes.  That'll work fine.

 

You're right about optos being good for the isolation benefits as well.  If you use them right you can get a nice firewall between the delicate 3.3V logic side and the giant 50V coils.



#6 Gornkleschnitzer

Gornkleschnitzer

    Hobbyist

  • Members
  • PipPip
  • 22 posts

  • Flag: ---------

  • Favorite Pinball: Twilight Zone

Posted 07 October 2017 - 01:57 AM

You definitely need a medal or something, because I couldn't ask for a more perfect answer to basically all my questions about this system.

 

Here's a new schematic crammed onto the back of an envelope.  https://imgur.com/a/ZJGf9  So the extra resistor is indeed 22 ohms, not 22K ohms, correct?  If you think this looks like it will work, I'll go order myself some resistors and optos.  Thank you so much!



#7 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,266 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 07 October 2017 - 02:44 AM

Here's a new schematic crammed onto the back of an envelope.  https://imgur.com/a/ZJGf9  

 

That looks like it'll do the trick, except that you'll need a resistor in series with the opto input, between the Teensy pin and the opto anode.  The opto input is an LED, so you need the standard current-limiting resistor for an LED.  Let's see...  the nominal IF on the LTV847 is usually 20mA, and the Teensy is fine driving that, so you take the 3.3V supply voltage, the LTV847 1.2V foward voltage and 20mA forward current, and you get a 120 ohm.

 

(The 847 will fully switch on down to about 6mA on the LED, actually, so if you want to be a little gentler on your Teensy you could up the resistor to 220 ohms for a 10mA opto current.  That'll be plenty to drive it and will be well under the Teensy limits.)

 

One more tiny suggestion.  You could reduce the 10K between the MOSFET gate and ground to 1K if you wanted.  It would make the circuit a little more general-purpose by making the MOSFET switching time slightly faster.  That's utterly irrelevant for a flipper - we're talking fractions of a millisecond - but it might matter if you wanted to apply the same circuit to drive a light source with PWM dimming, because that would have a high-frequency input.  The resistor size affects the switching time because the MOSFET gate acts like a capacitor:  the gate charges up when the drive voltage is on, and the accumulated charge has to go somewhere when the drive voltage switches off.   The path it takes is through the resistor, so the size of the resistor controls the discharge time.  Bigger resister = longer discharge time.  The switching time effect is because the accumulated charge acts like a drive voltage and keeps the gate switched on until it discharges to a sufficiently low level.  Now, you can't just get rid of the resistor entirely for infinite switching speed - you need some resistance there to serve as a voltage divider and to limit the current through the opto junction.  I like 1K as a happy medium.

 

 

 So the extra resistor [on the MOSFET gate input] is indeed 22 ohms, not 22K ohms, correct?

 

Exactly.  Just plain ohms, not K.


Edited by mjr, 07 October 2017 - 03:08 AM.


#8 Gornkleschnitzer

Gornkleschnitzer

    Hobbyist

  • Members
  • PipPip
  • 22 posts

  • Flag: ---------

  • Favorite Pinball: Twilight Zone

Posted 07 October 2017 - 11:55 AM

Again... best answers I've ever gotten about my electronic questions.  I guess it really matters where you ask!

 

I've written down all your advice and will get some parts ordered.  Thank you so much!



#9 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,266 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 07 October 2017 - 07:20 PM

Again... best answers I've ever gotten about my electronic questions.  I guess it really matters where you ask!

 

Well, everyone knows that for electronics questions, you should come to a virtual pinball forum. :)

 

Glad I could help.  Good luck with the project!







Also tagged with one or more of these keywords: homemade, transistor, mosfet, driver, electronics noob