Mosfet control issues
Moderator:Moderators
- Rekarp
- Portablizer Extraordinaire
- Posts:2163
- Joined:Thu Dec 28, 2006 1:52 am
- PSN Username:Lnghrn_
- Steam ID:rekarp
- Location:Austin, Tx
- Contact:
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?
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?
- 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
Oh I have tried new mosfets and new 595's. No difference.
Re: Mosfet control issues
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?
If you have some optocouplers you might try isolating the 595's from the gates.
Do your solonid's have full-travel interrupt switches?
- 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
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.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?
I have plenty of capacitance on all rails though.
Re: Mosfet control issues
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.)
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.)
"Linux is only free if your time is worthless"
Re: Mosfet control issues
^ - -^ 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?
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?
- 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
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.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?
Re: Mosfet control issues
^ ^ ^ ^ I like that solution.
- 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
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.
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.
Re: Mosfet control issues
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.
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?
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?
- 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
YupSnow_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?
Marshall hates me for it.
Re: Mosfet control issues
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.
- 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
Yup, I just had to add 1 line of code. Didn't have to change my hardware.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.
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!
Now I am saving for a CNC machine which can route pcbs which is clearly a better alternative then etching.