Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

DPDT switch function using MOSFET's: how to?

Status
Not open for further replies.
Solved, how stupid can I be: a load to the 555 output with a LED and a p-channel as well to invert the signal.. Except that I had a n-channel installed.. Sorry for that. Now I have a clean square wave again.

But still having to look as to why the M2 in Wally's schematic does not turn on.. Tomorrow I continue, clearly it gets too late to think non-confused.
 
But still having to look as to why the M2 in Wally's schematic does not turn on.. Tomorrow I continue, clearly it gets too late to think non-confused.

See post #34. To test, stick a 50k+ ohm resistor from Q9 [drain] and to +12V and Q8 [drain] to +12V.

I'm still not sure exactly what you are referring to M2 though since it doesn't match anything in the most recent schematic you posted.

EDIT: Said source by accident instead of drain.
 
Last edited:
To which transistor are you referring to when you say M2?

Which gate are you measuring that alternates? Q9? If so, that's not a relaible indicator of what's going on with the other gates.

Looks to me like the gates of Q11, Q10, and Q8 just go high impedance when you stop driving the gate of Q9 and it opens. That leaves the gate capacitors on the other three MOSFETs isolated retaining their charge which leaves them on. It appears to me that once you turn Q9 it will cause Q10 on, Q11 off, and Q12 off. And then it will stay that way even after you shut off Q9.

MOSFETs don't just turn off when you disconnect their gate. You actually have to discharge the gate capacitor. You can actually test MOSFETs out of circuit this way by using the multi-meter measurement currents to charge up the gate-source cap and then moving the probes to other pins to test if the source-drain is conducting or not.

Is that what you're seeing? I'm behind on this thread and only skimmed it.
I referred to post #8 when talking about M2.

But ok, let's stick to the schematic I posted, with the idea of #8: connect gate of Q8 to drain of Q9. Q8 indeed does not conduct.
 
See post #34. To test, stick a 50k+ ohm resistor from Q9 source and to +12V and Q8 source to +12V.

I'm still not sure exactly what you are referring to M2 though since it doesn't match anything in the most recent schematic you posted.
M2 is in crutschow's schematic, and the same is called Q8 in mine.

Problem solved: I first rebuilt the whole thing, then followed your advice from above: it works now.

Then I removed, just for trying's sake, the resistors you proposed, it works too :confused:. However after some time Q8 stops conducting and gets very hot. Then I re-installed a 100k between source and +12V for Q9 and Q8. Still same issue after a short while.

I guess it gets too late here to try and understand this.
 
See post #34. To test, stick a 50k+ ohm resistor from Q9 source and to +12V and Q8 source to +12V.

(..)
Just to make sure I understand you: you mean a 50k+ resistor between Q8 and Q9 source and 12V? This is just between +12V and ground?
 
ok, installed drain resistors; working fine now for several hours. Thank you for your time and valuable help!

Now there is however another issue popping up, but since this is getting too far from the OP I will post a new topic.
 
I just noticed that your 555 timer is not decoupled. Add a decoupling capacitor across the power pins. You might also want to do the same for the H-bridge itself.

If those don't work, then add a low value resistor (100 ohms or less, maybe even 10) in series with the gate of Q9. I feel like they should not be required though and your problem is something else.
How much capacitance do you recommend?
 
The L298 is a BJT device that has nearly a 2V load drop when on, so will not work well with a 5V supply.

Here's a simple MOSFET H-bridge that should do what you want.
It uses P-MOSFETs on the high side to simplify the gate drive requirements.
You can use other MOSFET part types, but they must be logic-level devices with a max threshold Vgs(th) of 2V or less.

View attachment 111291
hi crutschow, I used your schematic in a pcb design (see attachment). When this circuit is built on breadboard, it works fine: it oscillates the 4 MOSFET's as it should do. When I built the same oscillator per the schematic, the H-bridge does not oscilate.
I built just the parts needed for the oscillator (555 and its components, and the H-bridge mosfets and required resistors and load.
What happens is that on startup the H-bridge makes one pulse and then stops. Using your designations for the circuit your show above (M1, M2, M3 and M4) I measure on the gate of M1 of course the 555 pulses.
The drain of M1 starts low then stays high, drains of M4 and M2 (and gate of M3) start high then stay low.

In the schematic, M1 = Q7, M3 = Q6, M4 = Q10, M2 = Q11

So this H-bridge starts off good, but after one puls stays locked. Can you please give a pointer?
Thank you,
Erik
 
I added pull down 10k between Q7 and Q11 gate and source: now D5 and D7 start pulsating lighting. Q11 still gets very hot.
All Mosfet's replaced, still the same.
In annex, scope output: yellow = 555 output, image taken right at start-up, blue = joint drain Q6, Q7 (M1, M3 in crutschow drawing).
Second annex: yellow = 555 output, image taken right at start-up, blue = joint drain Q11, Q10 (M2, M4 in crutschow drawing).
Both same time and voltage scale.

Annex 3 and 4: same as above, but expanded timescale.
 

Attachments

  • DS1Z_QuickPrint55.jpg
    DS1Z_QuickPrint55.jpg
    75.8 KB · Views: 86
  • DS1Z_QuickPrint56.jpg
    DS1Z_QuickPrint56.jpg
    74.9 KB · Views: 95
  • DS1Z_QuickPrint57.jpg
    DS1Z_QuickPrint57.jpg
    81.6 KB · Views: 81
  • DS1Z_QuickPrint59.jpg
    DS1Z_QuickPrint59.jpg
    81.6 KB · Views: 86
Last edited:
And this is measured across the load, yellow = jont drain Q6, Q7
blue the other side (joint drain Q10 Q11)

Edit: I placed a 100nF from pin 5 to ground
 

Attachments

  • DS1Z_QuickPrint60.jpg
    DS1Z_QuickPrint60.jpg
    74 KB · Views: 92
Do you have decoupling capacitors directly from the bridge voltage to ground, such as a 0.1μF ceramic in parallel with a 10μf electrolytic?

Is there a short ground connection between the bridge ground and the 555 ground?
 
Do you have decoupling capacitors directly from the bridge voltage to ground, such as a 0.1μF ceramic in parallel with a 10μf electrolytic?
There was not, but now there are: 47uF and 100nF ceramic, next to the 555 and the bridge

Is there a short ground connection between the bridge ground and the 555 ground?
There is a ground backplane on the pcb, and 555 is about 1cm from the bridge

Scope in annex, view across the load: yellow = joint drain Q6, Q7, blue = joint drain Q10, q11

At least now the bridge first conducts one way, then next the other. But that is it.

EDIT: the stupid breadboard circuit works, every time I switch it on. I am sure if it could it would be laughing :banghead:

EDIT2: breadboard versus pcb :arghh:
 

Attachments

  • DS1Z_QuickPrint61.jpg
    DS1Z_QuickPrint61.jpg
    71.3 KB · Views: 79
  • DSC_1475.JPG
    DSC_1475.JPG
    958 KB · Views: 84
Last edited:
With a 10k resistor across drain-gate of Q11 (M2 for crutschow) the lower part of the load starts to oscillate (yellow = joint drain Q6, Q7: oscillates; blue = joint drain Q10, Q11, stays high).

Now what to do to get the blue section to switch on and off?
 

Attachments

  • DS1Z_QuickPrint62.jpg
    DS1Z_QuickPrint62.jpg
    73.7 KB · Views: 82
This design is junk.

Impossible to get the inverted signal to work properly from the drain of M1. Only solution is to invert the incoming square wave (gate Q7) with an external inverter (in my solution using a p-channel with gate to signal and drain connected to gate of M2 and 10k load to ground) and apply that to the gate of Q11.

The reason it worked on a breadboard is due to stray capacitances and impedances. On a properly designed pcb with short leads and proper ground as is the case here its flaw appears: timing contradictions between both bridge leg drivers.
 

Attachments

  • DS1Z_QuickPrint63.jpg
    DS1Z_QuickPrint63.jpg
    76.6 KB · Views: 84
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top