SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By BushWhacker
#154194
Well, I'm at a loss.... I'm trying to re-purpose an automobile power window motor into a new project. I pulled the switch and motor out of a junked car, but I'm not quite sure what's going on. I tested the switch unit in the vehicle before removing it (stuck a 12 v car battery in, and measured the voltage at the 2 wires coming out of the switch) When the switch was pressed in the "down" position, the multimeter showed 11 to 12 volts. When the switch was pressed in the "up" position it put out -11 to -12 volts, just as you'd expect. Then I tested the motor itself... I pulled it out of the car, and with no load on it, I put 9 volts on the wires leading in and the motor turned clockwise; then I reversed the pos/grnd leads, and the clock turned counter-clockwise... just as it should. The problem comes when I connect the two -- with the switch still connected in the car, I connected the motor to the switch, and the motor turns clockwise when the switch is pressed in the "down" position, but does nothing when the switch is pressed in the "up" position. If I reverse the wire connections, the motor will turn in the opposite direction when the switch is in the "down" position, but still does nothing when the switch is in the "up" position. Now, I know that since the multimeter showed positive and negative voltage coming from the switch, the motor SHOULD be working in both directions, but it refuses to operate when the switch is in the "up" position.... so basically, the switch works as expected in isolation, the motor works as expected in isolation, but once connected, it ain't working... anyone have any idea what I should be looking for --- how do I even decided if the problem is the switch or the motor???????
By Mee_n_Mac
#154207
Do you have the entire circuit ? Is there a controller between the switch and the motor that normally does 1 touch up and down and window reversal on a stall ? Perhaps both the switch and motor are good and there's a controller in between that's gone bad ??
By BushWhacker
#154208
I apologize, I should have been more detailed.... the section of the circuit that I'm dealing with is just the switch and motor, nothing in between. The switch is a "black box" to me, it's the driver side window control, so the box has several switches encased in a single unit (switches for the motor I'm trying to use as well as 3 others for each passenger window, plus lock control) a connector with perhaps a dozen wires plugs into the back of the box, but I suspect there may be some components other than just the switches inside the box. There are two wires that come out the front and go directly to the motor I'm working with (there is a plug style connector between the box and the motor, but no components). When I tested with the multi-meter, I plugged the probes into the switch side of that plug; that's where I got positive and negative voltage depending on whether the switch in the box was pressed to the up or down position. Then I put power to the motor side of the plug and the motor turned clockwise or counter clockwise depending on which way I connected the positive/negative wires (I should note that the motor had been removed from the door an thus was under no load). All of this was just as one would expect things to work, the issue is that when the plug connector between the two is plugged in, the motor will turn in only one direction (actually, will turn in either direction when pressed in the "down" position if the wires to the motor are reversed) but will not turn in either direction when the button is pressed in the "up" position. My guess is that perhaps there is something inside the "black box" that is failing, but keep in mind that the multi-meter says I'm getting voltage from the switch in both pressed positions. So both the switch box and the motor seem to be doing what they should, right up until they're connected together. I want to use the switch and motor in a project to drive the opening and closing of a drawer in a cabinet set, but I'm at a loss as to whether one (or both) of these components is even usable -- thus I turn to the greater wisdom and experience on these boards. Any thoughts on what's likely happening here.... short of actually buying a $70 switch unit, just to see if that works??
By Mee_n_Mac
#154210
The DMM is basically an open circuit to the switch+box. There's no "heavy" current being sourced by the switch+box when you do the measurement. When you plug the motor in there is ... or tries to be. So perhaps the switch+box has some high internal resistance, but only when the switch is pressed in it's up position. Since the motor is good you could buy just a simple switch to replace the auto switch+box. You'll loose whatever the auto controller did (if anything) but that appears to be broken anyhow. For your usage perhaps it wouldn't be a big deal to add a set of limit switches (to detect fully open & closed) and your own "controller" (if needed) to make the cabinet behave as you want ?
By BushWhacker
#154211
Mee_n_Mac.... now you've hit on it.... I has hoping to use the switch box from the car because obviously it has some mechanism inside that times the movement of the motor and controls how far the window goes up or down. I has hoping that I could use that to control how far out (and back in) the motor would move the drawer in my project. But alas, now it seems that nothing is ever simple in this world of electronics, and I'm going to have to actually back up a couple of steps and learn what limit switches are and how they work. Ah well, it was worth a shot, and it's always more fun (if a bit slower) to learn something new with each project. But I am grateful to you and the others for taking the time to at least keep me pointed in the right direction. Thank you.
By Mee_n_Mac
#154212
Depending on just how you want the draw to operate, the controller could be very simple to just a little bit more complicated. Just a couple of switches and perhaps 1 relay might be all that's needed.
By Mee_n_Mac
#154229
OK, 3 switches and a relay and perhaps it can be further simplified. I leave that to you.

As shown below the drawer (blue) is halfway, going from closed (to the left) to open (to the right). Power to the motor is being provided via relay K1 and switches SW2 and SW3.

When the draw finally gets to fully open, it'll push on SW3, opening pole a and closing pole b. Opening pole a will shut off power to the motor. Closing pole b will feed power to SW2, pole b, and through it to the K1 relay coil. Some msecs later the relay will switch. This will do 2 things; it'll reverse the voltage supplied to the motor. What was +V becomes ground and ground becomes +V. It also provides power to it's own relay coil (becomes self energizing) via SW2 pole b. The relay will remain in it's energized state so long as SW2, pole b remains closed ... independent of SW3's state.

With SW3 pole a still open, the draw doesn't move. It remains fully open.

(click on to open and enlarge)
DrawCkt.jpg
To power the motor to close the draw, momentarily push on SW1. This bypassess SW3 (and SW2) and powers the motor, now in reverse mode. The draw begins to close and SW3 goes back to it's normal state, thus providing power to the motor even when SW1 gets released.

The draw continues to close until it pushes on SW2. When it does, it opens both poles. With pole a open the motor looses power and the draw stops. SW2 pole b is also opened and that removes power to K1's coil. A few msecs later and K1 goes back to the state in the pic, with motor power back to "normal" (not reversed).

With the draw fully closed all power is removed, from both the motor and K1's coil, until SW1 is pushed again ... which then starts the opening cycle.
You do not have the required permissions to view the files attached to this post.
By jremington
#154235
Here is a simple circuit with just three switches, which will cause a motor (with terminals M+ and M-) to move to one limit or the other and then stop at the limit. Think of it as "vent all the way open" or "vent all the way closed", which is what I originally used it for. S1 is a "double pole double throw" switch which determines the direction of motor movement. S2 & S3 are "normally closed limit switches" that open up when the motor or vent bumps into them at the extreme limit of motion. I salvaged some limit switches (of the Microswitch variety with built in activating levers) from discarded equipment.

As the switches are set in the drawing the motor will move in one direction until S3 opens, then it will stop. If you flip S1 the other way, the motor will move in the other direction (closing S3) until S2 opens, then it will stop. You can make this circuit stop the motor anywhere in the middle if you replace S1 with a similar switch that has a center position, where it makes no contacts at all. I don't recall what that sort of switch is called, but they exist. Note: you will have to decide which is the correct M+ and M- by experiment.
You do not have the required permissions to view the files attached to this post.