Jump to content
Electronics-Lab.com Community

Switching idea


Recommended Posts

Hey everyone,

I would like to design a setup that switches a PNP transistor on when a signal reaches near 0v (it would normally be either +ve or -ve), and then keeps that transistor on until the system is reset.

My current thoughts on the matter are to have a window comparator to detect the near 0v, and have that feed into a schmitt trigger with a -ve reference for the turn off level (to keep it on). I figure the reset can be cutting the power to the schmitt trigger.

Would this setup work, or is there a better, more simple way?

BTW this is intended to be an inhibitor for a reverse switch on a motor controller. I hope to be able to interrupt the PWM to a half-bridge driver if reverse is selected while the motor is still turning (ie producing regen current), and then let the PWM pulse through once the motor has come to a stop. It should hopefully do the same when switching back to forward.

Link to comment
Share on other sites


Hi Mr. Heckles,
Your Schmitt Trigger comparator isn't doing anything. It just repeats the output of the window comparator.

The comparators don't have any connection to the PNP transistor.

The PNP transistor will have its base-emitter junction blown if the Signal voltage exceeds 12.7V (forward biased without current limiting) or less than 7V (reverse-biased avalanche breakdown) without current limiting.

post-1706-14279142561514_thumb.png

Link to comment
Share on other sites

How about this?

Trigger2.png

When the window comparator turns on, it pulls the + input of the right comparator below the - input, turning it on. The output of that right comparator pulls the + input low aswell, thus keeping it on (at least until power is removed from the whole circuit) even if the window comparator turns off again.

Does that sound plausible?

Also does shifting that 2k resistor provide some current limitation to protect the PNP transistor now?

The signal is a PWM pulse to a half-bridge driver input.

Link to comment
Share on other sites


When the window comparator turns on, it pulls the + input of the right comparator below the - input, turning it on. The output of that right comparator pulls the + input low aswell, thus keeping it on (at least until power is removed from the whole circuit) even if the window comparator turns off again.

Does that sound plausible?

Yes, I see the latching effect of the Schmitt-trigger now.

Also does shifting that 2k resistor provide some current limitation to protect the PNP transistor now?

On the very 1st day of my engineering job at Philips I was shown the datasheet of a silicon transistor that showed its Absolute Maximum Ratings. The emitter-base junction was rated at 5V. I was told NOT TO GO THERE!
The emitter-base junction is tiny and therefore is not able to dissipate any heat like a zener diode when it has avalanche breakdown. Little hot-spots are melted/eaten in it which reduces the transistor's gain over time until it fails.

You don't show if the PWM signal sinks or sources current so I don't know what the PNP transistor will do as a gate.
Link to comment
Share on other sites

So, is the schmitt trigger better with the diode, or the 10k resistor?

The PWM signal should be sourcing from the left, and sinking to the right (if that makes sense).

Should I set up a voltage divider to get 5v or so (my one has 6v emitter-base voltage) to the base of the PNP transistor.

The idea is to make sure that the transistor is stopping the signal, until the window comparator turns it on (then it stays on), without affecting the signal in anyway.

Link to comment
Share on other sites

Okay - the PWM signal is generated by an SG3524 chip. The output is the 2 open emitters of the chip joined together.

The datasheet says the emitter output voltage is typically 18v, though since the chip is being driven by 12v (or close enough to) I would say that it would be at most 13v (since my battery doesnt tend to give more than that).

I would say that 0v would be the lower limit, unless there are some negative spikes in the PWM signal. I dont have an o-scope so I cant confirm that.

That output connects to the input of an IR2184 half bridge driver, and a connection to ground via a 1k resistor.

BTW this is all from my previous schematics that you have helped me with.

I hope that clears things a little? If not, tell me what I need to find out (and how to, because we can be quite stupid here in NZ sometimes).

Link to comment
Share on other sites

You are in NZ? Isn't everything upside-down there? ;D

When the PNP is supposed to be off, when the PWM's voltage exceeds the divider's 5V by 0.6V then it turns on.
When the PNP is supposed to be on, the LM339 feeds it a weak base current so it will be a resistance that might slow-down the rise and fall times of the PWM signal it passes.

Link to comment
Share on other sites

Yip, but we compensate by walking around on our hands alot of the time, and watching tv standing on our heads so we can understand our northern hemisphere brothers.

That and the water swirls the opposite down the plug hole. Freaks alot of tourists out. They think its some kind of south pacific voodoo equivalent.

If the PNP is going to turn on when the PWM pulse goes 0.6v above the voltage on the base of the transistor, wouldnt 12v with a current limiting resistor be better? Would that stop it from turning on?

Would it be better to try and redesign the system to use an NPN transistor? If I could do that, is there a way to stop the voltage on the base of the NPN(to turn it on) from passing through and messing up the PWM pulse by making the IR2184 go high on the input? (or have I misunderstood things again with these bloody transistors)

Link to comment
Share on other sites

If you want a transmission gate then use a transmission gate. A Cmos CD4066 quad transmission gate IC works well with a 12-13V supply and is about 100 ohms when on and infinite when off. 4 of them in the package can be paralleled for 25 ohms on resistance. The positive supply or a little less turns them on and ground or up to a couple of volts turns them off. ;D

Link to comment
Share on other sites

Hi guys, here is the latest incarnation of the inhibitor switch....

Trigger4.png

Hopefully, it works like this (please correct me if I am wrong)....

When the window comparator is outside the range of say -0.5v to +0.5v then it will be off. That will mean that on the next comparator the - input (9v) is greater than the + input (6v) so it will be on, thus grounding the CD4066 and turning the switch off, inhibiting the signal (and turning on the LED).

When the Vin of the window comparator enters the above range, it should turn on, thus grounding the - input of the next comparator making it less than the + input and turning the comparator off. When it turns off, the + input should now be raised to about 9.5v through the 2k resistor, the LED (hence the drop) and the feedback line from the output. This should also turn on the CD4066 enabling the signal. The LED should also get very very dim at this point.

Now even if the window comparator turns off again (being outside the range) the + input (9.5v) should still be greater than the - input (9v) and keep the comparator off and the CD4066 on.

The only way to reset everything should be to cut power to everything.

How does that all sound?

Link to comment
Share on other sites

Your new circuit depends a lot on a low voltage across the LED (less than about 2V). It would be better if you used an opamp for the Schmitt trigger and have the CTRL input of the CD4066 driven very high and low by its output. Then you can use a little 8-pins LM393 dual comparator instead of the big LM339 quad comparator.
You might as well parallel all 4 transmission gates in the CD4066.

Link to comment
Share on other sites


Just to clarify....

Am I correct in thinking that your standard comparator can only sink current on the output (ie drag the output to ground), and that op-amps can either source or sink current on their output?

Correct. A standard comparator has just the collector of an NPN transistor at its output. An opamp has a complimentary NPN-PNP set of emitter-followers with their emitters (and maybe a series resistor of about 75 ohms) at their output.
Link to comment
Share on other sites

Wouldnt an inverting op-amp cause any positive voltage on the input to change to negative?

The Vin for the circuit is from the sense resistor from one leg of the motor H-bridge. Depending on what the motor is doing, it could be positive or negative.

If it's positive, it needs to stay positive. If it's negative, it needs to be inverted.

Link to comment
Share on other sites

So if the inverting opamp receives a decent +ve input, then it will still only be close to ground for the output?

Have you had any experience with absolute value circuits? I think thats what I need, so I can preserve the value of the input (regardless of whether its positive or negative).

That way I can set up current limitations for forward, reverse, forward regen and reverse regen on the motor.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
  • Create New...