Announcement

Collapse
No announcement yet.

Non inverting Schmitt Trigger question

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

  • Dannyx
    replied
    Re: Non inverting Schmitt Trigger question

    Originally posted by Longbow View Post
    At this point, a block diagram of your design is needed. Obviously, the timer approach to window closure is not the one you want. I am unclear on whether you have discarded the car's stock circuit completely? In that case, control of both directions is needed so an H-bridge will do the job. It isn't necessary to re-invent the circuitry for this motor control application since dozens of IC's exist that will do what you want. Bi-directional control of a d.c. motor is a standard industry application so you won't be needing much more than a few peripheral parts. I'm sure that some of the chips have a current sense feature, so all you need is a measurement of motor run and motor stall current to make the chip work with your window motor. Scrap the timer.
    Yes, a diagram will be coming soon - it's getting too complex to follow, I admit. Like I said, I shall replace the box I currently have installed (the one with the timer) and create it from scratch. The car's circuit has not been altered: it consists of just those rocker switches and that's it - no other active components. When I bought the gadget I currently have installed, all I had to do was break the wire that went to the window motor and splice that through the box, so the box could connect it to 12v when it got a signal from the key fob. Now I'll retain that idea, but incorporate a stop feature based on current rather than on time. For controlling direction I think I'll go with a good old fashioned DPDT relay.

    Leave a comment:


  • Longbow
    replied
    Re: Non inverting Schmitt Trigger question

    At this point, a block diagram of your design is needed. Obviously, the timer approach to window closure is not the one you want. I am unclear on whether you have discarded the car's stock circuit completely? In that case, control of both directions is needed so an H-bridge will do the job. It isn't necessary to re-invent the circuitry for this motor control application since dozens of IC's exist that will do what you want. Bi-directional control of a d.c. motor is a standard industry application so you won't be needing much more than a few peripheral parts. I'm sure that some of the chips have a current sense feature, so all you need is a measurement of motor run and motor stall current to make the chip work with your window motor. Scrap the timer.

    Leave a comment:


  • Dannyx
    replied
    Re: Non inverting Schmitt Trigger question

    BTW, does it matter what op amp I use for the amplifier stage after the current sense resistor ? I mean of course it matters, but I'm planning to build this thing with parts found in my junk drawer as much as possible

    Leave a comment:


  • Dannyx
    replied
    Re: Non inverting Schmitt Trigger question

    Originally posted by budm View Post
    When you turn off the FET they do not turn off right away due to GATE capacitance of the MOSFET, you will need to the scope circuit to look at the switching action.
    I don't have a scope sadly, but I understand what you mean. I read somewhere that to overcome the issue of gate capacitance, a NPN+PNP driver can be used, where the gate is driven by BOTH of these, so when one turns on, the other goes off and "discharges" the gate...I just read this today in fact

    Leave a comment:


  • budm
    replied
    Re: Non inverting Schmitt Trigger question

    When you turn off the FET they do not turn off right away due to GATE capacitance of the MOSFET, you will need to the scope circuit to look at the switching action.

    Leave a comment:


  • Dannyx
    replied
    Re: Non inverting Schmitt Trigger question

    Originally posted by budm View Post
    You need to consider dead-time in H-Bridge also.
    I suppose you're referring to the time it takes for the bridge to switch from 1 pair of FETs to the other and make sure they don't "shoot-through" as it's called. In my case, I will still be using the rocker switches, so (I think) there will be a pretty big delay between AD closing and then BC closing - impossible to power BOTH pairs at once if that's what you mean.

    Leave a comment:


  • budm
    replied
    Re: Non inverting Schmitt Trigger question

    You need to consider dead-time in H-Bridge also.
    Last edited by budm; 06-27-2017, 08:56 AM.

    Leave a comment:


  • Dannyx
    replied
    Re: Non inverting Schmitt Trigger question

    Quick update: admitting I go with the simplest P-N channel MOSFET H-bridge, would THIS schematic be good for the purpose ? Don't mind the FETs themselves, they will be different and suitably sized to handle the rush and stall currents of the windows - it's the drive I'm interested in, namely those 2 BC547 transistors. In my setup, since I will not have 4 individually addressable output pins, just a 12v and GND pin, I'm thinking of tying A and D together and B and C together. That way, when AD goes HIGH, the bottom left FET will turn on (since it's N channel) and the NPN on the right will pull the gate of the top-right FET to GND, also causing it to turn on. We've now got current flowing "top-to-bottom" and the motor turns in one direction. To make it go the other way, BC goes high and the mirror image of what I previously said applies. To stop it, all inputs go to GND. Would this circuit work for our purpose ? One thing that's vitally important is very low stand-by power consumption (since absolute zero idle current is obviously not possible), because this thing will be in a car, meaning battery power....the car might not get started for as much as a week to charge the battery, so I wouldn't want to come back to it one morning only to discover the battery is flat and I have to push the damn thing I have a separate car battery I'll use to run extensive tests on the bench before even daring to bring it near the car, so we don't have to worry about that just yet.

    Leave a comment:


  • Dannyx
    replied
    Re: Non inverting Schmitt Trigger question

    Oh btw: any "good" H-bridge MOSFET driver recommendations ? Preferably easily available, aka "common" and easy to find.....let's disregard the price for now.

    Leave a comment:


  • Dannyx
    replied
    Re: Non inverting Schmitt Trigger question

    Originally posted by Longbow View Post
    If you think about it, the premature cutout is due to the current level sensing in your circuit. The design current limit is set too low for this particular job. It isn't a reliability problem at all. In fact, the circuit is working very reliably. Since it is already built, all you have to do is find out how the current sense/current limit is set and change the part values a little. You would be doing the same thing starting from scratch.

    Here is an interesting article on start and stall dc motor current. As you can see, the stall current is actually greater than the maximum start current. The stall current is steady state, whilst the start current is a short pulse (depends upon the load).



    Your particular application is relatively simple because you don't care too much about speed. The load is fairly constant and the duty cycle of each event is short. The automatic closing circuit always runs the motor in the same direction (to close the window). So you don't need a fancy H-bridge, just a relay or a single control FET.
    While that's exactly what I WANT this circuit to do, I doubt the aftermarket box I currently have installed has such a current sensing feature. The box does have a potentiometer on its side, but it's only for setting the maximum roll-up time allowed (from around 5s to 20s I THINK). I can confirm this, because if I sit in the car and lock it, I can hear the relay for each window closing inside this box and staying closed for the same amount of time, regardless of what the window is doing. What I want it to do is close the relay for around 1s, sending 12v into the motor, sense that the motor is stalled (all the way up) then stop and then move on to the next window. Well, the box does this, but based on a timer, not on current drawn.....hope it's not too confusing. Also, yes, I know the H-bridge is overkill and a simple relay would suffice, but like I said: if I also build that "latch" feature, it would just be a matter of sending the "lock" signal the H-bridge in "up" mode.....the window starts going up and does its thing and when it's closed (assuming it was down in the first place), the H-bridge resets to its off state and stops.

    Leave a comment:


  • Longbow
    replied
    Re: Non inverting Schmitt Trigger question

    Originally posted by Dannyx View Post
    The shortcoming is the one in my previous posts: while it DOES work, sometimes it doesn't roll them all the way up, since it doesn't actually know whether the window has closed or not, so if there's a smudge or something sticky on the window or rubbers or for some other reason the window takes longer to roll up, the box will cut out even if it's not up yet
    If you think about it, the premature cutout is due to the current level sensing in your circuit. The design current limit is set too low for this particular job. It isn't a reliability problem at all. In fact, the circuit is working very reliably. Since it is already built, all you have to do is find out how the current sense/current limit is set and change the part values a little. You would be doing the same thing starting from scratch.

    Here is an interesting article on start and stall dc motor current. As you can see, the stall current is actually greater than the maximum start current. The stall current is steady state, whilst the start current is a short pulse (depends upon the load).



    Your particular application is relatively simple because you don't care too much about speed. The load is fairly constant and the duty cycle of each event is short. The automatic closing circuit always runs the motor in the same direction (to close the window). So you don't need a fancy H-bridge, just a relay or a single control FET.
    Attached Files
    Last edited by Longbow; 06-24-2017, 08:43 AM.

    Leave a comment:


  • Dannyx
    replied
    Re: Non inverting Schmitt Trigger question

    Oh yeah, the reason I want an H-bridge is because I thought while we're at it, I might as well add that "latch" function that other cars have, whereby if you press the rocker in one direction and hold it there for a little, the window will go down/up by itself without you having to hold the button down - useful in summer when you hop in and want to buckle up at the same time. I've already simulated this and it works, though building the thing will be.....interesting

    Leave a comment:


  • Dannyx
    replied
    Re: Non inverting Schmitt Trigger question

    Originally posted by Longbow View Post
    Your description of the power windows is interesting. Depends upon how many functions are already controlled by the main computer. How much of the logic is local (inside the door itself)? All this logic CAN be implemented locally, but I would first ask if there is something faulty with the present setup?

    Another example is a powered antenna. My car has a local circuit attached to the motor. That circuit assumes that the antenna is in the down position when the car is shut off. In this case, the antenna is either all the way up, or all the way down. For your window, it seems like the motor should only be required to close the window when you lock the car, regardless of where the window might be. So the direction would only be "up". If the window is already all the way up, then the stall circuit will detect it.

    Since there is no mechanical limit switch, the up and down limit is a circuit that senses the stall current in the motor, and then shuts it off.

    If I have the antenna assembly on the bench, the measured inrush current is not an issue because the motor is relatively small and geared down. The circuit is designed to detect the limit condition by sensing a current peak that lasts for a certain length of time. The stall event can last as long as your design says it should for reliable detection. So, including special circuitry to detect startup (inrush) current is unnecessary. There is no micro on that board, either. Just a couple of relays and a few discrete transistors and other parts.
    Ok cool, let's dig in further and clarify some stuff: the car's computer is not connected to the windows at all. The windows are controlled by the traditional rocker switches for going up or down. There's no electronics whatsoever involved in running them and the car's service diagram confirms this. I already have an aftermarket box thingamajig that sort-of does what I want it to: it taps into the lock signal of the ECU and through a relay, it connects the "up" terminal of the window to 12v, essentially mimicking the button being pressed in the UP position. The shortcoming is the one in my previous posts: while it DOES work, sometimes it doesn't roll them all the way up, since it doesn't actually know whether the window has closed or not, so if there's a smudge or something sticky on the window or rubbers or for some other reason the window takes longer to roll up, the box will cut out even if it's not up yet, so I want to build something more reliable, mostly for the sake of learning and experimenting. Like I said, sadly there's no way I can test this with the car's windows directly, since I don't have a garage, so I grabbed the next best thing which is a motor from a cordless drill and we'll prototype with that instead.

    Leave a comment:


  • budm
    replied
    Re: Non inverting Schmitt Trigger question


    https://www.ametherm.com/blog/inrush...inrush-current

    Leave a comment:


  • Longbow
    replied
    Re: Non inverting Schmitt Trigger question

    Your description of the power windows is interesting. Depends upon how many functions are already controlled by the main computer. How much of the logic is local (inside the door itself)? All this logic CAN be implemented locally, but I would first ask if there is something faulty with the present setup?

    Another example is a powered antenna. My car has a local circuit attached to the motor. That circuit assumes that the antenna is in the down position when the car is shut off. In this case, the antenna is either all the way up, or all the way down. For your window, it seems like the motor should only be required to close the window when you lock the car, regardless of where the window might be. So the direction would only be "up". If the window is already all the way up, then the stall circuit will detect it.

    Since there is no mechanical limit switch, the up and down limit is a circuit that senses the stall current in the motor, and then shuts it off.

    If I have the antenna assembly on the bench, the measured inrush current is not an issue because the motor is relatively small and geared down. The circuit is designed to detect the limit condition by sensing a current peak that lasts for a certain length of time. The stall event can last as long as your design says it should for reliable detection. So, including special circuitry to detect startup (inrush) current is unnecessary. There is no micro on that board, either. Just a couple of relays and a few discrete transistors and other parts.
    Last edited by Longbow; 06-23-2017, 08:57 AM.

    Leave a comment:


  • Dannyx
    replied
    Re: Non inverting Schmitt Trigger question

    Originally posted by budm View Post
    You will need to handle the inrush current when the power is first applied to the motor which will cause fault triggering, but that how you will learn with hands on once you put it to test in the real world.
    You need to find what the inrush current is and how long it lasts.
    Damn, that's true...didn't think of that :| Considering the windows have 30A fuses in the fuse box, I can imagine the current is quite high...understandably, since they're high torque motors. I need to come up with a circuit which only triggers once the current is maintained for longer than 1s or so, that is, when the window has definitely reached its end of travel...perhaps a capacitor that charges up and triggers a zener diode after its charged to a certain level...just a quick n' dirty idea that came through my mind as we speak.

    Leave a comment:


  • budm
    replied
    Re: Non inverting Schmitt Trigger question

    You will need to handle the inrush current when the power is first applied to the motor which will cause fault triggering, but that how you will learn with hands on once you put it to test in the real world.
    You need to find what the inrush current is and how long it lasts.
    Last edited by budm; 06-20-2017, 01:00 AM.

    Leave a comment:


  • Dannyx
    replied
    Re: Non inverting Schmitt Trigger question

    It will part of the current sensing for the motor: when the current draw of the motor rises above a set threshold, the circuit will stop, since the window has reached the end of travel and mustn't "push" any further....at least that's the idea...I simulated something and it appears to work.

    Leave a comment:


  • eccerr0r
    replied
    Re: Non inverting Schmitt Trigger question

    Too Long, Didn't Read - yes, it's a real phenomenon.
    Last edited by eccerr0r; 06-19-2017, 03:48 PM. Reason: Clarification ;-)

    Leave a comment:


  • Dannyx
    replied
    Re: Non inverting Schmitt Trigger question

    Originally posted by eccerr0r View Post
    Eh, well, wall of text will mean TLDR so you'll still need to clarify
    Call me clueless, but what does TLDR mean ? I'm not really on all this internet lingo, other than maybe FYI, DIY LOL ROFL, etc

    Leave a comment:

Working...
X