Mosfet control issues

Do you have a technical question that doesn't really fit a specific console? Want some general info on electronics, hacking, making cookies, etc? Here's the place to ask! Go nuts.

Moderator:Moderators

Post Reply
User avatar
Rekarp
Portablizer Extraordinaire
Posts:2163
Joined:Thu Dec 28, 2006 1:52 am
PSN Username:Lnghrn_
Steam ID:rekarp
Location:Austin, Tx
Contact:
Mosfet control issues

Post by Rekarp » Tue Sep 07, 2010 9:22 am

Need some help with this one.

I have a 74HC595 that I am shifting bits out to from a propeller chip. Shifting 8 1's and each pin is set high correctly. Each output is connected directly to a IRL530 mosfet's gate. This is a gate level mosfet. All grounds are connected and common.

The flippers on the pinball machine pass through a mosfet so I can turn the flippers off when I want to. Turn on the mosfet and then press the flipper button and the flipper fires.

So I turn it on and check the voltages with my multimeter. 5V at each gate. Press the button to fire the solenoid and nothing happens. Check gate voltages. 0V. Reset the propeller. 5V at gate. Fire solenoid. Nothing happens, 0V at gate.

So see if the mosfets are wired correctly I put 5V directly on the gate from the PSU. Mosfet turns on and solenoids fire.

74HC595's have there decoupling capacitor and everything. If I shift out all 0's then the gate levels are at 0V so the shifting is working correctly. For some reason my 595's are resetting themselves when a load is pulled through the mosfets.

Solutions?
The wood master

Image

"I was under the impression Mac owners don't actually USE their machines, they just parade them around trying to evangelize the masses."

User avatar
Rekarp
Portablizer Extraordinaire
Posts:2163
Joined:Thu Dec 28, 2006 1:52 am
PSN Username:Lnghrn_
Steam ID:rekarp
Location:Austin, Tx
Contact:

Re: Mosfet control issues

Post by Rekarp » Tue Sep 07, 2010 9:28 am

Oh I have tried new mosfets and new 595's. No difference.
The wood master

Image

"I was under the impression Mac owners don't actually USE their machines, they just parade them around trying to evangelize the masses."

Snow_Cat
Posts:463
Joined:Fri Aug 13, 2010 12:40 pm
Steam ID:Snow_Cat
Location:Here
Contact:

Re: Mosfet control issues

Post by Snow_Cat » Tue Sep 07, 2010 11:24 am

The nominal current levels look good, but I've not found the bypass diodes in FET packages adequate to sop up the voltage spikes.

If you have some optocouplers you might try isolating the 595's from the gates.

Do your solonid's have full-travel interrupt switches?

User avatar
Rekarp
Portablizer Extraordinaire
Posts:2163
Joined:Thu Dec 28, 2006 1:52 am
PSN Username:Lnghrn_
Steam ID:rekarp
Location:Austin, Tx
Contact:

Re: Mosfet control issues

Post by Rekarp » Tue Sep 07, 2010 11:36 am

Snow_Cat wrote:The nominal current levels look good, but I've not found the bypass diodes in FET packages adequate to sop up the voltage spikes.

If you have some optocouplers you might try isolating the 595's from the gates.

Do your solonid's have full-travel interrupt switches?
The solonoids have bypass diodes (pinball machine). I tried isolating them with a 2n3904 and I received the same results. I hooked up my 7-segment LED display then ran a mosfet off it. When the button is pressed to activate the solenoid the whole display gets crazy. I wonder if I am having a power issue.

I have plenty of capacitance on all rails though.
The wood master

Image

"I was under the impression Mac owners don't actually USE their machines, they just parade them around trying to evangelize the masses."

User avatar
timmeh87
Senior Member
Posts:3047
Joined:Mon Nov 14, 2005 10:19 pm
Location:Ontario, Canada

Re: Mosfet control issues

Post by timmeh87 » Tue Sep 07, 2010 1:18 pm

Are you sure it isnt your code? If it fails the LED test and you say its hooked up right, theres not much else it could be.

Are you putting in delays? You cant drive these things past 400khz or 1mhz or something like that.

(also some 595's cant (shouldn't) drive LEDS directly. depends on the drive current. Shouldn't matter for mosfets though.)
Image

"Linux is only free if your time is worthless"

Snow_Cat
Posts:463
Joined:Fri Aug 13, 2010 12:40 pm
Steam ID:Snow_Cat
Location:Here
Contact:

Re: Mosfet control issues

Post by Snow_Cat » Tue Sep 07, 2010 1:24 pm

^ - -^ Out of curiousity, what happens if you substitute a lamp for the solonid? They do have some wicked input impedence.

edit: Wait... Does the FET connect the solonoid to the same +5V VCC as the 595, and not an AUX +5V? Does triggering a solonoid that isn't connected to the 595 still reset it?

User avatar
Rekarp
Portablizer Extraordinaire
Posts:2163
Joined:Thu Dec 28, 2006 1:52 am
PSN Username:Lnghrn_
Steam ID:rekarp
Location:Austin, Tx
Contact:

Re: Mosfet control issues

Post by Rekarp » Tue Sep 14, 2010 9:06 am

Snow_Cat wrote:^ - -^ Out of curiousity, what happens if you substitute a lamp for the solonid? They do have some wicked input impedence.

edit: Wait... Does the FET connect the solonoid to the same +5V VCC as the 595, and not an AUX +5V? Does triggering a solonoid that isn't connected to the 595 still reset it?
Solenoids are connected to the +48V line. GND is connected. Well I fixed it. Seems that the 595's just pick up noise so updating the outputs every so often fixes the issues. Once every 10,000 cycles seems to do the trick. On the pinball machine it will update it even faster so this is a non issue now.
The wood master

Image

"I was under the impression Mac owners don't actually USE their machines, they just parade them around trying to evangelize the masses."

Snow_Cat
Posts:463
Joined:Fri Aug 13, 2010 12:40 pm
Steam ID:Snow_Cat
Location:Here
Contact:

Re: Mosfet control issues

Post by Snow_Cat » Tue Sep 14, 2010 11:56 am

^ ^ ^ ^ I like that solution.

User avatar
Rekarp
Portablizer Extraordinaire
Posts:2163
Joined:Thu Dec 28, 2006 1:52 am
PSN Username:Lnghrn_
Steam ID:rekarp
Location:Austin, Tx
Contact:

Re: Mosfet control issues

Post by Rekarp » Wed Sep 29, 2010 5:56 pm

Figured out the real problem while working on my displays. Fixed it with software.

My old routine

Latch Low
Repeat x times { Clk low , Shift bit out , Clk high }
Latch High

Seems that when that is low it can easily pick up interference from the data and clock line. To fix this I can put a pull down resistor on the Latch line but this requires me redesigning all my PCBs thus have to pay tooling costs again if I need spares or fix it in software like so.

Latch High
Repeat x times { Clk low , Shift bit out , Clk high }
Latch Low
Latch High

This way the latch hasn't "reset" and eliminates glitches. Working fine now.
The wood master

Image

"I was under the impression Mac owners don't actually USE their machines, they just parade them around trying to evangelize the masses."

Snow_Cat
Posts:463
Joined:Fri Aug 13, 2010 12:40 pm
Steam ID:Snow_Cat
Location:Here
Contact:

Re: Mosfet control issues

Post by Snow_Cat » Wed Sep 29, 2010 9:02 pm

Makes sense, it is the rising edge that triggers things on the output, and if the signal stays logic-level-high it has to rise far higher to effect the output. :D

I take it then that you are not a fan of soldering the resistors to the chips, favoring the clean, professional, "I got it right the first time" look?

User avatar
Rekarp
Portablizer Extraordinaire
Posts:2163
Joined:Thu Dec 28, 2006 1:52 am
PSN Username:Lnghrn_
Steam ID:rekarp
Location:Austin, Tx
Contact:

Re: Mosfet control issues

Post by Rekarp » Wed Sep 29, 2010 11:03 pm

Snow_Cat wrote: I take it then that you are not a fan of soldering the resistors to the chips, favoring the clean, professional, "I got it right the first time" look?
Yup :mrgreen:

Marshall hates me for it. :lol:
The wood master

Image

"I was under the impression Mac owners don't actually USE their machines, they just parade them around trying to evangelize the masses."

Snow_Cat
Posts:463
Joined:Fri Aug 13, 2010 12:40 pm
Steam ID:Snow_Cat
Location:Here
Contact:

Re: Mosfet control issues

Post by Snow_Cat » Thu Sep 30, 2010 9:56 am

Doesn't seem to be as endeerign as my "It is nowhere close to right, but it sure as hell works." strategy (blog entry). Though in the end it works and I guess that's what is important.

User avatar
Rekarp
Portablizer Extraordinaire
Posts:2163
Joined:Thu Dec 28, 2006 1:52 am
PSN Username:Lnghrn_
Steam ID:rekarp
Location:Austin, Tx
Contact:

Re: Mosfet control issues

Post by Rekarp » Thu Sep 30, 2010 10:48 am

Snow_Cat wrote:Doesn't seem to be as endeerign as my "It is nowhere close to right, but it sure as hell works." strategy (blog entry). Though in the end it works and I guess that's what is important.
Yup, I just had to add 1 line of code. Didn't have to change my hardware.

See I have made my own etchings before and it is clearly easier and to just order the PCBs. For the time wasted you could have gone to the pub! :mrgreen:

Now I am saving for a CNC machine which can route pcbs which is clearly a better alternative then etching.
The wood master

Image

"I was under the impression Mac owners don't actually USE their machines, they just parade them around trying to evangelize the masses."

Post Reply