Non inverting Schmitt Trigger question

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • Dannyx
    replied
    Re: Non inverting Schmitt Trigger question

    I did as instructed and put together a (bad) schematic of how I imagine the direction control for the motor. However, in doing so I encountered a couple of issues that I didn't see coming beforehand, which might make the H bridge the best solution STILL. Just for the sake of it I pushed on with the relay method on paper anyway. Please bare with me, as I KNOW this is the wrong way of doing it, but Longbow was right: no way to spot issues in your design until you sit down and draw.
    Let me walk you through, since I know it's clear as mud: R1 in the middle is in charge of setting the direction: when it's off, sending power to the COM terminals runs the motor up. When the relay switches over, the motor goes up since polarity is now reversed....seems simple and effective for now.

    S1 on the right is the internal diagram of the rocker switch inside the car: it's basically 2 SPDT switches, A and B, in one package, operating in opposite directions. In the middle position, both the out terminals are grounded in the middle (marked 0). When rocked to one side, the switch on that side goes to VCC (marked 1), while the other remains grounded and vice versa. By design, it's impossible to have both sides onto 1 at the same time.

    Since the relay has no OFF position (where the H-bridge has the first advantage), I initially thought of using a FET as a switch in series with the power going to the COM terminals of the relay to cut the power when the motor is not in use. This is the second issue I didn't see coming and quickly became apparent as I was drawing: the FET would need to come on for BOTH the up and down positions of the relay (since the motor needs power for both directions), which I thought I'd achieve by connecting the gate of the FET to the outputs of the switch - HUGE error: because the outputs automatically revert back to GND, the moment I rock the switch in any direction, I'd have a dead-short between OUTa and OUTb, since one is VCC while the other is still GND....NOT gonna work, so don't even mind those resistors I put on the gates, since that's the least of our worries right now.

    I thought I'd work around it by adding another FET so I'd have 1 for each position of the switch and wired the gates separately - this isn't any better either, because the gates would always be grounded when the switch is in its neutral position, so driving the gates with any other signal becomes impossible, since anything I'd apply to them would be directly sunk to GND through the switch. To push this failed idea even further, I'd need yet another FET to allow power to go to the motor when the circuit receives the lock signal, so by this point I already have 3 power FETs AND a relay, so hell: might as well add a fourth relay, get rid of the bulky and possibly expensive relay and build a H-bridge...looks like it's back to the drawing board, but I thought I'd share my thoughts anyway Practice, practice, practice.....I know. Cheers.
    Attached Files

    Leave a comment:


  • Longbow
    replied
    Re: Non inverting Schmitt Trigger question

    Originally posted by Dannyx
    One thing I was told, and this is 100% true, is I'll also have to figure out how to deal with premature/"false" stops caused by the motor's initial rush current.
    To the contrary, referring to the above article, the motor "inrush" or startup current is a relatively brief event, especially in low power systems like yours. You would not normally deal with these circuit tweaks in the output stage (H-bridge), but rather at the input end. The analog solution is a simple time constant circuit, which would not trigger on a short-lived event, but would trigger on the much longer motor stall current. The software solution is similar but could detect both current value and duration in order to make a start/stop decision. Detecting the difference between the two events should not present any real challenge.

    Leave a comment:


  • Longbow
    replied
    Re: Non inverting Schmitt Trigger question

    Originally posted by Dannyx
    I'm not very good at drawing schematics and junk - I just keep everything in my noggin.
    Now is the time to rid yourself of this bad habit. The average person can't remember anything more complex than a doorbell diagram in his head.

    Leave a comment:


  • Dannyx
    replied
    Re: Non inverting Schmitt Trigger question

    Originally posted by budm
    So when the relay is not energized then the motor will still get the power from the normally closed contact, so it means you need another switch ti kill the power to the relay contact. The H-BRIDGE will have all off, on in one direction and on in the other direction, not the same as DPDT relay.
    That is true and I did have that planned out as well, but feel free to correct me, of course: drop a FET in line with the power supply for the motor just before the relay. The FET handles the on/off, while the relay only handles polarity (since it has no OFF position, I know). A schematic is definitely on the way, since it's impossible to explain otherwise, but imagine the relay wasn't there at all and I just wanted a simple on/off function for the motor (nevermind the direction) - a FET should be able to handle that (provided it can handle the full current of course)...just a thought.
    Last edited by Dannyx; 07-08-2017, 02:46 PM. Reason: Correction

    Leave a comment:


  • budm
    replied
    Re: Non inverting Schmitt Trigger question

    Originally posted by Dannyx
    I shall post the schematic of that part indeed, since I have used it before and I know how it operates
    So when the relay coil is not energized then the motor will still get the power from the normally closed contact, so it means you need another switch to kill the power to the relay contacts. The H-BRIDGE will have all off, on in one direction and on in the other direction, not the same as DPDT relay.
    Last edited by budm; 07-08-2017, 02:45 PM.

    Leave a comment:


  • Dannyx
    replied
    Re: Non inverting Schmitt Trigger question

    Originally posted by budm
    BTW, you said you are going to use DPDT relay to power the motor in either directions, did you draw out the diagram as how you will use that relay? I think you forget something about using the replay in place of the H-bridge.
    Thew relay you want to use has Common contact, Normally open contact, and normally closed contact , right?
    simple DPDT relay is not the same as H-Bridge.
    I shall post the schematic of that part indeed, since I have used it before and I know how it operates

    Leave a comment:


  • budm
    replied
    Re: Non inverting Schmitt Trigger question

    BTW, you said you are going to use DPDT relay to power the motor in either directions, did you draw out the diagram as how you will use that relay? I think you forget something about using the replay in place of the H-bridge.
    Thew relay you want to use has Common contact, Normally open contact, and normally closed contact , right?
    simple DPDT relay is not the same as H-Bridge.

    Leave a comment:


  • Dannyx
    replied
    Re: Non inverting Schmitt Trigger question

    Taking a few steps further, I began designing the latching block. Doing a bit of research, I found THIS (more specifically the circuit at the bottom), which is pretty much exactly what I'm trying to accomplish: a "set" signal comes from the ECU when the car gets locked and holds the relay in the UP position (let's just assume it's a simple relay for now). The RESET signal is going to come from that current sensing block we're trying to design, when the window is fully closed and the motor stalls, at least that's the idea.

    One thing I was told, and this is 100% true, is I'll also have to figure out how to deal with premature/"false" stops caused by the motor's initial rush current. At first I didn't know for sure why this should be a problem, but now I understand: when the SET signal is first applied at the base of the top transistor (Q1 let's call it), there would also be a RESET signal showing up at the base of the Q2 (the one below it) immediately after, due to the inrush spike which would be passed as an overcurrent condition by that circuit I messed with in the simulator further down below...not exactly sure how I'll go about this. The back of my head, and please don't quote me on this, is whispering me something about the R-C time constant (cap and resistor charge circuit.....thing ) which only triggers RESET when the overcurrent is maintained for 1-2 seconds.
    Last edited by Dannyx; 07-08-2017, 12:10 PM. Reason: Correction

    Leave a comment:


  • Dannyx
    replied
    Re: Non inverting Schmitt Trigger question

    Interesting article, though it's a bit too complex for what I'm trying to accomplish I keep saying I'll actually rig up something on the bench just to see what happens, but I've yet to do that yet due to lack of time/patience. Yes, I too expect detecting the stalling of the motor to be the most complex part, since latching the thing on and then turning it off SHOULD be easier. The direction control can also be easily achieved with a relay (in theory at least, because right now I'm having so much trouble finding a bloody DPDT relay, it's surreal ! )
    Last edited by Dannyx; 07-07-2017, 10:04 AM.

    Leave a comment:


  • Longbow
    replied
    Re: Non inverting Schmitt Trigger question

    Here is an interesting paper on the design of d.c. actuators (the actual term for these things). In this case, the motors operate a vehicle's HVAC blend doors, but the same theory would apply to operating windows. I have nothing against designing a digital unit from scratch, but be prepared for a major science project. To me, the most interesting part of this subject is going to be detection of the motor stall condition, and the implementation of limit or position sensing (2 different things in many cases). You can see the applications are nearly universal. Controlling the rudder position of a ship, for example. Sensing and driving circuits would be very complex servos, with PID software tweaked for individual systems. Its the same thing on a larger scale.

    Attached Files
    Last edited by Longbow; 07-07-2017, 08:59 AM.

    Leave a comment:


  • Dannyx
    replied
    Re: Non inverting Schmitt Trigger question

    I put together a diagram to simplify the project a bit....or at least I HOPE it does, as I'm not very good at drawing schematics and junk - I just keep everything in my noggin

    So: current comes from the battery (obviously) through the current sense circuit. I imagine the current sensing resistor can be placed either on the positive or the negative wire (for high-side or low-side sensing), because neither of the 2 terminals of the motor are connected to chassis ground, since they are supposed to switch polarity and they would short out in one direction if they were grounded (to get my point, by contrast, the starter motor for instance, has its negative terminal permanently connected to the chassis, so low-side current sensing would be impossible).

    I figured it's easiest to place the current sensing circuit before the direction control, which can be either an H-bridge (which is difficult and probably not space/cost effective) or a DPDT relay which simply reverses polarity (I have done this many times with small projects so I know it works). It is this part that does most of the work: it runs the motor in the UP direction when the ECU sends the lock signal to it through a latching circuit which I have not yet designed but kinda know how it should operate (props to Dave once again ), or of course, when the rocker switches are used like normal, in which case it can also run in the DOWN direction. It seems easier to incorporate the rockers in the circuit as well, rather than trying to wire them separately which can lead to shorts.

    Again, there are no other electronics involved in running the motors, that being said, YES: if you just keep your finger on the button, you'll probably eventually kill the motor and battery (unless it has a thermal overload inside it). Right now, I'm working on the current sensing part. Cheers and as always thanks for putting up with my madness
    Attached Files

    Leave a comment:


  • budm
    replied
    Re: Non inverting Schmitt Trigger question

    "I think you are missing the point. That article is there to get you thinking about how other designers approach a similar problem."
    +1
    And also the reason for why certain circuits are chosen. You can solve the problem in more than one way and what kind of compromise you are willing to accept.

    Leave a comment:


  • Dannyx
    replied
    Re: Non inverting Schmitt Trigger question

    Originally posted by Longbow
    I think you are missing the point. That article is there to get you thinking about how other designers approach a similar problem. Or, if you find the ideal IC for your window control, most likely it will contain the drive transistors, so you won't have to worry about designing a bridge.

    If you WANT to make everything from scratch, high or Low side is something you can decide later, based on decisions that you have NOT made yet. Choosing between an N or P transistor is the same...which one makes sense in your circuit? Current is current.

    Rather than jumping to the schematic phase, define the operation with a block diagram and a logic chart so we know what you want to do. Then we can all offer our 2 cents worth about how to do it. Personally I would use one of the hundreds of analog control IC's for the motor drive.
    Sorry, I know I'm rushing into things, since this is a pretty complex thing I'm trying to achieve here and you're right, there are still many unknown things. Everything makes sense in my head, but sharing my thoughts with the rest of the people willing to help is where I fall a bit short, so I'll back up a bit and offer you a block diagram like you suggested....not too sure what it should look like, so hopefully it's what you're looking for Cheers.

    Leave a comment:


  • Longbow
    replied
    Re: Non inverting Schmitt Trigger question

    Originally posted by Dannyx
    So you're suggesting I should go with high-side current sensing rather than low side ? Math ahoy !
    I think you are missing the point. That article is there to get you thinking about how other designers approach a similar problem. Or, if you find the ideal IC for your window control, most likely it will contain the drive transistors, so you won't have to worry about designing a bridge.

    If you WANT to make everything from scratch, high or Low side is something you can decide later, based on decisions that you have NOT made yet. Choosing between an N or P transistor is the same...which one makes sense in your circuit? Current is current.

    Rather than jumping to the schematic phase, define the operation with a block diagram and a logic chart so we know what you want to do. Then we can all offer our 2 cents worth about how to do it. Personally I would use one of the hundreds of analog control IC's for the motor drive.

    Leave a comment:


  • Dannyx
    replied
    Re: Non inverting Schmitt Trigger question

    This might be a stupid question, but I don't understand in the article budm provided why the negative supply rail (VSS let's call it) of the op-amp is not connected to GND, but instead to the zener diode and resistor. I know how that zener operates - it regulates to 5.1v and the resistor prevents too much current from flowing and burning the zener (though I would've placed the resistor at the cathode, correct me if I'm wrong). Now let's If I have 12v as "Bus voltage" and the zener is 5.1v as the article says, what would the supply for the op-amp be ? 7v ? The article DOES explain the purpose of the zener further down, but it throws some pretty fancy terms around, mainly common-mode voltage which I can't possibly grasp for some reason Other than that, it's just "simple" math

    Leave a comment:


  • Dannyx
    replied
    Re: Non inverting Schmitt Trigger question

    How's this sound ? Seems I'd be better off with an off-the-shelf solution.

    Leave a comment:


  • budm
    replied
    Re: Non inverting Schmitt Trigger question

    You also get common mode rejection too. Car is noisy environment for electronics.
    Last edited by budm; 06-30-2017, 12:01 AM.

    Leave a comment:


  • Dannyx
    replied
    Re: Non inverting Schmitt Trigger question

    So you're suggesting I should go with high-side current sensing rather than low side ? Math ahoy !

    Leave a comment:


  • budm
    replied
    Re: Non inverting Schmitt Trigger question

    http://www.analog.com/en/analog-dial...mic-range.html

    Leave a comment:


  • Dannyx
    replied
    Re: Non inverting Schmitt Trigger question (+circuit)

    Here is the (still crude schematic) of the current sensing circuit I envision. You can simulate it here. Just go to "file", select "import from local file" and load the TXT file I provided (let me know if it works). Now please bare with me as I'm sure it lacks a lot of things and there are probably many others wrong with it and my idea (no filter caps anywhere for example - I know), but that's precisely the point: to polish it and make it work

    This is just the current sense part - I'm still working on the latch and stop circuits which will turn on the circuit when the car is locked, latch it on (since the lock signal is only present for a brief moment) for as long as necessary and then stop it once the window is closed.

    I'll walk you through: in lack of a proper motor piece, I simulated it using a potentiometer on the left: as the motor halts, it will draw more and more current, which can be simulated with that pot....FAR from ideal, but it got the job done in the simulator. The current shunt resistor is a 0.05 Ohm (50 mOhm) resistor, which I imagine is STILL too high for a motor that draws as much as 20-25A when locked, but I chose it because I'm planning to test this out on the bench and the only thing I have handy are some 100 mOhm resistors which I'm going to parallel to drop to 50 mOhms and see if I at least get a reading with that drill motor I told you about.

    Anyway, regardless of what this resistor is going to be, its output will be far too low to drive anything, so it MUST go through the non-inverting op-amp amplifier represented by U1. Here's where the math starts: I've also included that excel calculator with the actual values used in the simulation. The numbers (and Dave from EEV ) tell me that amp has a gain of 11 in this configuration...which it does: 0.1v in results in 1.1v out (the graphs at the bottom of the simulator also show this pretty well: if you move the pot around, as the "load" increases, so does the output of U1).

    The output then goes to the main event: the schmitt trigger represented by U2. After MANY hours spent calculating and researching, I put together the excel calculator to simplify my work and played around with the values to get them as round as possible and used them in the simulator. It works to a degree, but the upper threshold is off: the numbers tell me it should be 2.2v, however I need to crank much higher than that (to around 3v) to get U2 to trip over. The lower threshold works fine though: when current drops enough, the non inverting input of U2 also drops down and when it reaches around 1v, U2 turns off like it should. It could be a simulation error though...let me know what you think and by all means feel free to play around with it and post it back Cheers
    Attached Files

    Leave a comment:

Related Topics

Collapse

  • martonmiklos
    Dyson DC45 trigger board burnt brush motor driving SO8 IC
    by martonmiklos
    Hi fellows,

    I am trying to repair a Dyson DC45 battery powered hoover.

    There is a trigger board in it which hosts an Attiny48 and some power stage to drive the brush motor.


    Unfortunately a SO8 component burned to hell in it together with a 0603 resistor and the IC could not be identified.

    The Attiny output looks to be survived the problem because when pulling the trigger it outputs high for a while and then turns off.
    It is likely that it measured the current on the R10 shunt and this is why it is shut down.

    I have attached...
    06-29-2024, 12:21 PM
  • kamel
    Lenovo Ideapad 3 15IML05 MB : GS452/GS552/GS752 NM-C781 not trigger
    by kamel
    Hi Ideapad when Plugged in 3.3vALW and 5vALW are on, but 1.05vALW and 1.8vALW absent. Power led lights and remains always on and laptop not trigger..
    Found a burned spot on LV5075B IC, replaced with a new imported IC, but 1.05vALW and 1.8vALW still failing. .
    EC IT8586E working voltages and signals are all ok except PBTN_OUT# 2.44V not changing when power button is pushed and EC_RSMRST# always 0.1V ??
    Reflashed EC IT8586E and Main bios with newly download dump from Lenovo site to no avail.
    Should I fix again a new L5075B and replace IT8586E to solve the issues....
    04-20-2025, 08:19 AM
  • DAVEMAC02
    Inverting op amp circuit
    by DAVEMAC02
    Yamaha Stagepas 300 pa system. I have a problem with the attached inverting op amp circuit. I have no output at pin 1 of the B amp. I have audio across cap 221. I've checked resistancr values and grounds and are all ok. I've checked for diode function on IC204 pins 2 & 3 and check ok. I don't know what other components are in IC204 and how to check. There is FET Q208 & Transistor Q205 and I don't their purpose in the circuit. I don't think IC204 is bad , but I don't know how to prove it is good or bad. Don't want to replace it if it is good as I will still have the problem. Need...
    09-30-2024, 12:13 PM
  • DAVEMAC02
    Inverting op amp follow up
    by DAVEMAC02
    Follow up to my op amp diagram of Q208 FET and IC204 for NJM 2068M op amp. I took took the following DCV readings on the Q208 (2SK246) and IC204 pins:
    pin 1 0v, pin 2, 0v, pin 3 0v, pin 4 -15.6v, pin 5 0v, pin 6 .08, pin 7 0v, pin 8 +15.9v

    Q208 source -.006, gate -15.5v, drain -.102. These readings are from the op amp Q208 that has no output on pin 1. I don't know what state ie (On or Off ) Q208 should be when op amp is working correctly. This circuit is on the filter/limiter stage of the PA system. Any help is appreciated. Thanks
    10-03-2024, 01:08 PM
  • simabilisim
    HP LA-C701P REV 1.0 does not trigger
    by simabilisim
    HP LA-C701P REV 1.0 does not trigger after shutdown. However, when we remove the adapter and plug it in, it gets triggered.
    10-01-2022, 12:36 PM
  • Loading...
  • No more items.
Working...