Thank you to the guys at HEGE supporting Badcaps [ HEGE ] [ HEGE DEX Chart ]

Announcement

Collapse
No announcement yet.

Non inverting Schmitt Trigger question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #41
    Re: Non inverting Schmitt Trigger question

    Originally posted by Dannyx View Post
    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.
    Is it plugged in?

    Comment


      #42
      Re: Non inverting Schmitt Trigger question

      Originally posted by Longbow View Post
      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.
      Wattevah...

      Comment


        #43
        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.
        Never stop learning
        Basic LCD TV and Monitor troubleshooting guides.
        http://www.badcaps.net/forum/showthr...956#post305956

        Voltage Regulator (LDO) testing:
        http://www.badcaps.net/forum/showthr...999#post300999

        Inverter testing using old CFL:
        http://www.badcaps.net/forum/showthr...er+testing+cfl

        Tear down pictures : Hit the ">" Show Albums and stories" on the left side
        http://s807.photobucket.com/user/budm/library/

        TV Factory reset codes listing:
        http://www.badcaps.net/forum/showthread.php?t=24809

        Comment


          #44
          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
          Wattevah...

          Comment


            #45
            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.
            Is it plugged in?

            Comment


              #46
              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.
              Wattevah...

              Comment


                #47
                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
                Wattevah...

                Comment


                  #48
                  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.
                  Never stop learning
                  Basic LCD TV and Monitor troubleshooting guides.
                  http://www.badcaps.net/forum/showthr...956#post305956

                  Voltage Regulator (LDO) testing:
                  http://www.badcaps.net/forum/showthr...999#post300999

                  Inverter testing using old CFL:
                  http://www.badcaps.net/forum/showthr...er+testing+cfl

                  Tear down pictures : Hit the ">" Show Albums and stories" on the left side
                  http://s807.photobucket.com/user/budm/library/

                  TV Factory reset codes listing:
                  http://www.badcaps.net/forum/showthread.php?t=24809

                  Comment


                    #49
                    Re: Non inverting Schmitt Trigger question

                    Originally posted by budm View Post
                    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
                    Wattevah...

                    Comment


                      #50
                      Re: Non inverting Schmitt Trigger question

                      Originally posted by Dannyx View Post
                      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.
                      Never stop learning
                      Basic LCD TV and Monitor troubleshooting guides.
                      http://www.badcaps.net/forum/showthr...956#post305956

                      Voltage Regulator (LDO) testing:
                      http://www.badcaps.net/forum/showthr...999#post300999

                      Inverter testing using old CFL:
                      http://www.badcaps.net/forum/showthr...er+testing+cfl

                      Tear down pictures : Hit the ">" Show Albums and stories" on the left side
                      http://s807.photobucket.com/user/budm/library/

                      TV Factory reset codes listing:
                      http://www.badcaps.net/forum/showthread.php?t=24809

                      Comment


                        #51
                        Re: Non inverting Schmitt Trigger question

                        Originally posted by budm View Post
                        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
                        Wattevah...

                        Comment


                          #52
                          Re: Non inverting Schmitt Trigger question

                          Originally posted by Dannyx View Post
                          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.
                          Is it plugged in?

                          Comment


                            #53
                            Re: Non inverting Schmitt Trigger question

                            Originally posted by Dannyx View Post
                            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.
                            Is it plugged in?

                            Comment


                              #54
                              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
                              Wattevah...

                              Comment


                                #55
                                Re: Non inverting Schmitt Trigger question

                                Did you think about the failure mode of the relay contacts, I.E. one of the Contact welded closed? Nice big sparks!
                                Analyze, analyze......
                                Attached Files
                                Never stop learning
                                Basic LCD TV and Monitor troubleshooting guides.
                                http://www.badcaps.net/forum/showthr...956#post305956

                                Voltage Regulator (LDO) testing:
                                http://www.badcaps.net/forum/showthr...999#post300999

                                Inverter testing using old CFL:
                                http://www.badcaps.net/forum/showthr...er+testing+cfl

                                Tear down pictures : Hit the ">" Show Albums and stories" on the left side
                                http://s807.photobucket.com/user/budm/library/

                                TV Factory reset codes listing:
                                http://www.badcaps.net/forum/showthread.php?t=24809

                                Comment


                                  #56
                                  Re: Non inverting Schmitt Trigger question

                                  Originally posted by budm View Post
                                  Did you think about the failure mode of the relay contacts, I.E. one of the Contact welded closed? Nice big sparks!
                                  Analyze, analyze......
                                  If one of them got stuck, the motor would just have both its terminals connected to the same potential (GND or VCC), assuming the other contact DOES spring loose like it's supposed to. This holds true only for the schematic you just posted, since in my flawed application, there would indeed be a short and a blown fuse. This does not necessarily mean that an H-bridge is bullet proof and can't short out, but at least there's no mechanical failure caused by arcing.
                                  Wattevah...

                                  Comment


                                    #57
                                    Re: Non inverting Schmitt Trigger question

                                    You do not see it?
                                    https://www.badcaps.net/forum/attach...0&d=1499710455
                                    Look at your diagram, if the relay contact on the right is stcuk on normally closed, and when the relay is energized, the Com left contact will make contact with the N.O. contact so you will have current flowing through the relay contacts to one stuck contact and the N.O. contact through MOSFET to GND!
                                    Not the same as my schematic, so if you hook the motor as shown, nothing will be damaged.
                                    Attached Files
                                    Last edited by budm; 07-10-2017, 02:08 PM.
                                    Never stop learning
                                    Basic LCD TV and Monitor troubleshooting guides.
                                    http://www.badcaps.net/forum/showthr...956#post305956

                                    Voltage Regulator (LDO) testing:
                                    http://www.badcaps.net/forum/showthr...999#post300999

                                    Inverter testing using old CFL:
                                    http://www.badcaps.net/forum/showthr...er+testing+cfl

                                    Tear down pictures : Hit the ">" Show Albums and stories" on the left side
                                    http://s807.photobucket.com/user/budm/library/

                                    TV Factory reset codes listing:
                                    http://www.badcaps.net/forum/showthread.php?t=24809

                                    Comment


                                      #58
                                      Re: Non inverting Schmitt Trigger question

                                      Originally posted by budm View Post
                                      You do not see it?
                                      https://www.badcaps.net/forum/attach...0&d=1499710455
                                      Look at your diagram, if the relay contact on the right is stcuk on normally closed, and when the relay is energized, the Com left contact will make contact with the N.O. contact so you will have current flowing through the relay contacts to one stuck contact and the N.O. contact through MOSFET to GND!
                                      Not the same as my schematic.
                                      I believe that's exactly what I just replied, just under different words
                                      Wattevah...

                                      Comment


                                        #59
                                        Re: Non inverting Schmitt Trigger question

                                        So leaving the relay idea behind, let's focus on the H-bridge....since there are a lot of options for N-channels and P-channels to choose from, I decided the most sensible thing would be to actually write down a list of choices which I consider suitable. However, soon after putting down around 10 options, I realised I screwed up during my searches because I went WAY overboard with the maximum drain current Id. I used the transistor tool of Mouser.com to select whatever parameters I wanted the FETs to have and then narrowed it down even further to what I'd be able to find locally, since there are obviously some very obscure, niche FETs dedicated to very specific applications which are impossible to find in my country, let alone my electronics store.

                                        I originally selected everything 80A and up, which, I KNOW, is overkill, since even though I haven't measured the motors to know exactly their current consumption, I referred back to that article BudM provided on car accessories power figures and it estimates it to be around 30A peak. Now that I think of it, I have NO idea why I went so high initially, since I DID read that article before and even the bloody fuses are rated at 30A...lost my train of thought perhaps :| That's not to say a transistor capable of handling 80A wouldn't work, but the price is likely higher and the higher the current is, the harder the part is to source. I'd say, and please don't quote me on this, that 40A continuous Id would be enough...probably STILL too high, so feel free to correct me on this.

                                        Also, the on resistance (RdsON) is a factor which I understand is important - the lower, the better ? The on resistance of my list of (oversized) transistors I put together before realising I chose too high a current, ranges from 4mOhms to around 15mOhms. It's also slightly higher with P-channels I reckon, but I didn't get that far yet. The shunt resistor will also add its own resistance to the mix, so I reckon I should keep RdsOn as low as possible, which is 4mOhms for an IRF1404...ok, I believe that's enough rambling. Cheers guys
                                        Wattevah...

                                        Comment


                                          #60
                                          Re: Non inverting Schmitt Trigger question

                                          This might be something for you think about so hear out

                                          How easy would it be to put a optic sensor on the window or a switch on window mechanics when the window is up and when it down

                                          or encoder on the motor or a travel encoder on the window slide

                                          as for as the current amp sensing to that not as easy you think and here why

                                          is most DC amp probe that I have used you must zero it before you can use it

                                          This could be a problem if for some reason the amp probe showing let say 5 to 10 amp or even 2 or 3 might cause you some problems

                                          Keep mind that I am just thinking out loud
                                          Last edited by sam_sam_sam; 07-13-2017, 04:25 PM.
                                          9 PC LCD Monitor
                                          6 LCD Flat Screen TV
                                          30 Desk Top Switching Power Supply
                                          10 Battery Charger Switching Power Supply for Power Tool
                                          6 18v Lithium Battery Power Boards for Tool Battery Packs
                                          1 XBox 360 Switching Power Supply and M Board
                                          25 Servo Drives 220/460 3 Phase
                                          6 De-soldering Station Switching Power Supply 1 Power Supply
                                          1 Dell Mother Board
                                          15 Computer Power Supply
                                          1 HP Printer Supply & Control Board * lighting finished it *


                                          These two repairs where found with a ESR meter...> Temp at 50*F then at 90*F the ESR reading more than 10%

                                          1 Over Head Crane Current Sensing Board ( VFD Failure Five Years Later )
                                          2 Hem Saw Computer Stack Board

                                          All of these had CAPs POOF
                                          All of the mosfet that are taken out by bad caps

                                          Comment

                                          Working...
                                          X