Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Need suggestion for my little automotive project

  1. Jun 2, 2004 #1
    My car has 4 power windows, and i'm trying to make a circuit that would roll down the window with just a touch of a button. I used a 555 timer monostable mode to create a logic latch for X amount of second which in turn drive a relay that give power to the window motor.

    Now I need a way to detect when the window motor is already fully down to avoid overload it (I might not even a need 555 timer). I know when the motor stops, current draw increases but i'm not sure how to build the circuit that can detect it. Is there a simplier way to detect an overload beside looking at current draw?
  2. jcsd
  3. Jun 2, 2004 #2


    User Avatar
    Science Advisor

    Current draw is the most popular and makes sense. But you asked for alternatives.

    Another method used by Pontiac for their late model Firebird's with their pop-up headlights was to drive the electric motors with a pulsed output and in-between the pulses measure the back EMF of the motor to determine if its spining or not. Given how poor the mechanical design of the rest of the headlight system is engineered, probably not worth copying. Plus the drag of the window assembly doesn't really let the electric motor freewheel so this would likely be ineffective.

    Limit switches?

    Rotary encoder on motor shaft?

    You'll also need to delay the current measurement a few hundred ms to avoid your tripping your threshold current draw measurement at motor startup. But a workable but not elegant means might be a .1 ohm 15W resistor inline would get you a 1V reading at 10A which should be more than enough, you could feed the 1V into an op-amp with a pot for the feedback to adjust the gain to then feed into the compartor on another 555 to use as a threshold for the current draw. That 555 output would then obviously kill the relay output. Ghetto fabulous!

    That or you could buy one of the commercial units, but there isn't much fun in that.

  4. Jun 2, 2004 #3
    "But a workable but not elegant means might be a .1 ohm 15W resistor inline would get you a 1V reading at 10A which should be more than enough,"

    The resistor is connected in series to the motor? The concept is unclear to me.

    What is the most efficient way to do this project? I doubt using 555 is the most efficient. Maybe PIC?
    Last edited: Jun 2, 2004
  5. Jun 2, 2004 #4


    User Avatar
    Science Advisor
    Gold Member

    Maybe use these 1v or "whatever works" as an input to an LM324 quad-op-amp used as comparitors. One amp for each window.

    It shouldn't be to hard use find a way to trigger the operation and unlatch the power to the motors once the load exceeds your limit.

    One circuit for each motor with a common trigger/switch.

  6. Jun 3, 2004 #5
    what about the delay? I don't want to use another 555.
  7. Jun 3, 2004 #6
    Forget the 555 altogether. Use an 8 pin PIC, or AVR. Use the ADC to monitor motor voltage, one pin to monitor the up switch another to monitor the down switch, one pin to activate a mosfet to roll the window up, and another pin/mosfet for down. One pin for source, and one for ground leaving one free pin. Use a 74hc14 to debounce the switches along with 22k resistor and .1uF cap in the input pin of the 74hc14. A .iuF tantalum cap should be used on the MCU source pin. You should be able to drive the mosfets directly from the MCU. A 7805 and a 390 ohm resistor should suffice as a supply.

    The MCU route would be more versatile than a 555 because you can easily program different delays ie a 555 timer would only allow all the way up or down whereas a small MCU can be programmed to bypass the auto up/down function if the switch is depressed longer.

    my 2 cents. good luck.
  8. Jun 3, 2004 #7


    User Avatar
    Science Advisor

    A PIC is almost like cheating, too easy. :)

    It seems quite easy to debounce the switches right at the PIC too, now the part count has fallen even more.

    An ammeter works by measuring the voltage drop across a shunt of known resistance. The series resistor inline with the motor emulates this setup and I suggested a high resistance value to (hopefully) make filtering unnecessary.

    Obviously there is far more than one way to accomplish this, some easier than others. BTW a 556 gets you two 555s on one chip. But a PIC is perfect for this app.

  9. Jun 3, 2004 #8
    Yeah, you can debounce right at the pin itself using a pullup and a capacitor without a problem. I tend to add a little layer between switches and MCU's in harsh environments though which the electric system on a auto qualifies as a harsh environment IMO. A Schmitt is more hearty than a input pin on a PIC. David, if you go with a PIC, you may want to subscribe to the PIC list. Its an e-mail list and most questions are answered promptly and thourghly.

    As an aside, I haven't used a 555 timer in a long time. I use small MCU's because they can produce frequencies up to 1MHz with a variable PW below and above 50% duty cycle using fewer parts. The freq's are more stable as well. Plus, MCU's make board layout so much easier because you can designate any one of six pins as the driver pin vice having to use pin 3 only...

    In retrospect you'll have to drive two mosfets per function not one. Assign one pin on the motor and call it 1 and the other pin 2. Run one mosfet pair (driven from the same MCU pin) so you have the plus supply going to pin 1 and the other pin connected from ground to pin 2. The other pair will be connected in the opposite manner thus giving auto up/down functionality. If you want to controll all four windows from the same PIC then you'll probably want to use a 16 series 14 pin MCU. It would probably be easier to have seperate modules for each window moter IMO.

    Finally, if you do whip something up like this I'd suggest using some form of conformal coating to prevent corrosion of the PCB.

    Well, again good luck.
  10. Jun 3, 2004 #9


    User Avatar
    Science Advisor
    Gold Member

    Personally I think you are all making this way more complicated than it needs to be. I would use a limit switch and set up a relay to latch upon the push of the button. The limit switch will unlatch the relay.
  11. Jun 5, 2004 #10
    I can't seem to make it work.

    When the motor is not in use (not connected to ground), the inline resistor voltage is 12 which is higher than the overloading voltage that I set which is at 11 volts. As a result, the comparator output (goes to pin #4 of 555, reset pin) goes low and forever resets the 555. How do I work around this?

    when the motor is in use(complete path), comparator compares 1v v.s. 11v = no overload, output high, good. When motor not in use, 12v vs. 11v = false overload, output low, permenently set 555 to reset mode.
    Last edited: Jun 5, 2004
  12. Jun 5, 2004 #11


    User Avatar
    Science Advisor
    Gold Member

  13. Jun 5, 2004 #12


    User Avatar
    Science Advisor

    I'm lost. How does a resistor in an open circuit show any voltage across its leads? And the voltage across that resistor is proportional to the current flowing across it per ohm's law.

    Pin 4 will reset at around .7V regardless of Vcc so you'd want to use a pot to make a voltage divider to adjust this threshold.

    David, you are building some sort of H-bridge to drive the motor, correct? Or were you planning on a simple single transistor drive with a DPDT switch to change direction?


    P.S. There isn't much fun in simple. :)
  14. Jun 5, 2004 #13
    nevermind I got it to work. I can tell that I've confused the crap out of you.
  15. Jun 11, 2004 #14
    Been busy with school but now that i'm out, back to work on my project. The last step is to make a delay. I could use another 555 but that would be ineffcient. Is it possible to use the current 555 to act as two different delay?

    Should I be worry about fly-back (voltage spikes) damaging the chips?
    Last edited: Jun 12, 2004
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook