Controlling a12v car window lift motor

I have a window lift motor from a late model car which appears to have an encoder built into the worm gear chassis. I have an idea to use this motor to raise and lower a window shade from a wireless remote with several preprogramed positions i.e, 1/4, 1/2, 3/4 and full open.

There are a total of 7 wires consisting of what appears to be 2 x 16-gauge wires which are for 12v power (red/black) and 5 smaller 20-gauge wires red, white, black, yellow and blue. The yellow and blue wires are routed into the gear box that I assume is for the position feedback sensor.

So far, I have only seen 3 wire servos, so I am wondering if this kind of motor setup is compatible with Arduino drivers and programing and how I should connect this multitude of wires to an Arduino in order to control the motor position.

Here are some pics of the motor and the full wiring schematic in PDF.






GW.fm.pdf (128.9 KB)

Most likely not compatible with Arduino without motordrivers and/or voltage converting from 12 to 5/3.3 volt depending on the type of Arduino used..

Oh, one other thing. The motor isn't just on a switch. It is also controlled by a MPU that controls to the anti-pinch feature. This feature detects when something is blocking the window as it goes up and reverses automatically for safety. I would imagine that 5v would be what the MPU is using to communicate with the motor.

You will need a driver for the motor. An Arduino can control a motor through the driver, but cannot power the motor.

You must pick a motor driver based on motor supply voltage and the motor stall current. Stall current can be many times the running current. The motor will draw stall current, briefly, every time that it starts. Until you know the stall current you cannot, intelligently, choose a driver. The stall current should be listed on the motor data sheet. If not, one can estimate the stall current. Measure the motor winding resistance. Short the meter leads and measure the lead resistance so that you can subtract lead resistance from the final reading. Take several measurements rotating the motor a bit between readings. Use the lowest reading in the calculation. The estimated stall current is the motor supply voltage divided by the measured resistance (after subtracting lead resistance). Pololu has a good line of modern DC motor drivers at reasonable prices and they have instructional pages for each of their products.

Then you will need a power supply capable of supplying the stall current.

As to the encoder, I suggest that you start with a search for "auto power window encoder" to get an idea of how they work and how to figure out what you have.

1 Like

My 1st thought is a relay. No need to drive the motor but use relay to turn 12v on/off. 2 relays perhaps. 1 for up, another for down. That will at least get you part way there :wink:

1 Like

Usually 2 relays are used. One SPST to control power and a DPDT to control direction of rotation.

1 Like

Do you have a wiring diagram for the car?

Do you have a multimeter? I'd expect a relay coil to read around 100 Ohms and the motor maybe less than 10 Ohms. If there's a relay built-in you probably can't read the motor resistance (or run the motor) until the relay is activated.

It should just be a regular (geared-down) DC motor which can be reversed by reversing the + & - connections. That can be done with an H-Bridge driver, or a pair of DPDT relays.(1) Relays are a bit "safer" because the motor will require quite a bit of current... More than a "typical" Arduino motor driver can provide. You'd still need a driver circuit to drive the relay coils.

There may be relays built-into the mechinism.

I've never looked inside my car door, but there is no limit switch... If the window is up and I push the up-button, the battery voltage drops a little indicating that the motor is drawing current.

Ignoring any limit switches, this would require 4-wires. Power, ground, a connection to the up-relay coil and a connection to the down-relay coil.

It's fairly common in cars to switch the ground so *typically, one end of each relay coil would be connected to 12V. Then the other two wires go to the up-down switch, with the center switch terminal connected to ground (and of course, it's a double-pole center-off switch... It turns-out that MOSFET and transistor drivers are easier to build if they also switch the ground.

That "position sensor" is probably just a limit-switch to turn-off the motor at the end. It might be two switches with a common ground or it might be one switch that's activated at either limit.

(1) You'd only use the common and normally-open contact pairs (4 of the 6 terminals on each relay). And obviously, the connections to one relay are "reversed" so the motor runs the opposite direction.

1 Like

I don't have a wiring diagram, but I am going to look into that. I know that it is for a Nissan 350z. Hopefully I can find something online.

I found a wiring diagram for this motor and attached it to the other pics above.

No, one relay for up and one for down. :thinking: Simpler and substantially more reliable. Same as an H-bridge.

1 Like

I'd say the easiest approach is to remove the encoder and processor altogether, start with just the 2 wires powering the motor.
Use 2 relays and control those 2 wires to control the motor. Control the relays through the arduino.

Yes, but I want to experiment with what is possible. It has an encoder and I want to hack it.

Nothing to remove. If you were to look at the actual pictures you will see that he does not have the processor, just the motor assembly. :roll_eyes:

I performed the ohms test and found a low of .4 ohms making the stall current 30.75a at 12.3vdc from a fully charged 7ah battery. I just ordered a cheap 40 amp driver with a heat sink and compatible with an Arduino Uno and PWM.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.