Need help with odd H-Bridge control

Discussion in 'The Projects Forum' started by dyak, Jun 24, 2008.

  1. dyak

    Thread Starter New Member

    Jun 24, 2008
    2
    0
    Hi, I'm a newbie :)

    I'm trying to adapt window switches from one car to another, and I'm having trouble figuring out how to wire them. The old switches are laid out like this:

    [​IMG]
    where pins 1 and 8 go to the motor, 3 is 12V, 4 and 5 are ground. It's a basic reversing controller that gets the job done, but the switches themselves deteriorate over time due to being overly mechanical (and about 20 years old).

    Anyway, the new switches are laid out like this:
    [​IMG]

    Since the car these switches came out of uses a central control module to do everything, they don't control the motor directly. Here, pins 1 and 2 are control bits, 3 is 12V and 4 is ground. Currently I'm only interested in switch positions 1 and 2 (although making positions 3 and 4 not instantly let out the magic smoke is nice), and have been looking into ways of making this work.

    I'm pretty sure that I want a MOSFET-based H-bridge to control the window motors. However, I'm not clear on how to make this work with the new switch, as it does not produce clear high or low: When the newer switch is in positions 0, 1, and 2, at least one of the two signal wires is disconnected, resulting in a floating value.

    So, is there any way or electrical component that will let that on-float output become on-off? Any advice for a different and better way to do this?

    TIA,
    Dmitriy
     
  2. thingmaker3

    Retired Moderator

    May 16, 2005
    5,072
    6
    If I'm reading the schematic right, pin 1 grounded & 2 floating will close window, pin 2 grounded & 1 floating will open window, both pins grounded will do something "automatic."

    You can use a pair of pull-up resistors from pins 1 and 2 to 12V to replace "floating" with "12V."

    Perhaps you could invert the output, run it through an XOR, and use the XOR output to gate the inverted switch output to an H-bridge.

    windows.jpg

    I'm sure this circuit could be simplified to a pair of NAND gate chips for a lower component count.
     
  3. dyak

    Thread Starter New Member

    Jun 24, 2008
    2
    0
    Aha! "Pull-up resistor" is the keyword I needed. Reading a bunch of stuff about that now. Thanks, that will fix my floating issue.

    The "Automatic" position is used for one-touch raising or lowering, where you press the button and the window goes up or down the entire way. It seems like it will take a bunch of logic to make that work, though. Is there any way to detect when a DC motor (e.g. a window motor) suddenly has a lot more load? That would be much simpler and more elegant than putting sensors into the car doors. In any case, to make automatic windows work, I probably will need a microcontroller or a very, very clever way of using flip-flops.
     
  4. thingmaker3

    Retired Moderator

    May 16, 2005
    5,072
    6
    When the mechanical load of a DC motor suddenly increases, the motor current will also suddenly increase. By placing a small value resistor in series with the motor, and monitoring the voltage across the resistor, we can monitor the current through the motor.
     
Loading...