Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Detect car power window max-rolled up or down??

Status
Not open for further replies.

settra

Member
hello forum! In my car, i have retro-fitted power window motors, which basically just "rotate" the old mechanical mechanism, from the inside of the door..

what i want to do now, is install some kind of "sensor" to be able to tell, if the window is rolled full up, or full down. I know that in cars, this is being done, by installing 2 mechanical switches, in the windows path, that when pressed, they ground the motor and stop the rotation..

But in my case this is very hard to be done, becouse in order to reach the actuall window, i have to un-screw and remove 2-3 sheets of metal...
so i was wandering, is there any easy (no MUC required) way to detect if the window is on a MAX position??
i have seen that you can generally detect motor stall, by back emf, but i dont know how i could use this in a "memory" way...
thanks!
 
Use a high-side current monitor to detect motor stall. Works at both ends of travel. The ratio of running current to stall current is likely to be 1:4 to 1:10.
 
Most of the older style good window controllers simply measured the voltage drop across a resistor, some even had a thermal reset that tripped to remove power during a stall.
An opamp and a few passives along with a power relay should do you. Giggle opamp current measurement :)
 
i see! thanks for the fast replies !
Those methods seem good for detecting if a stall is happening right now, and to cut of the power. but what happens if i want to know if a stall has had happened?

my situatuation is this:
i control my windows, both from switches, and from an MUC(that has no feedback, and cannot get one). both just provide GND, to the power window relay. So what i wann do, is have the MUC, continiusly provide GND, in order to do a full window roll-up/down. But the only method i can use, is time-based, which does not work if the window is arledy half the way rolled, cause of stall.

so what will happen, (if i detect stall and cut power) if the MUC says "roll down for 6 seconds" and it takes only 3?? at 3secs, motor will stall, and power will be cut off. but then the power returns, and motor stalls again ... etc..

is there some way , to cut the power, for as long as the button/MUC signal is active??
 
If the window is not at an end position, there is no stall current, just it's normal running current. Set a couple of flags in your mcu to signal when a stall occurs, and only allow the window switch to activate going in the opposite direction to that when the stall occurred. So for example if it's on it's way down, i.e you are currently pressing the down switch and then a stall is detected, because the window is now all the way down, set your flags to remove power and only allow the window to roll up, i.e use your mcu to inhibit the down switch function, same for the other end of travel, when it's all the way up, set your flags again but the this time inhibit the up switch and only allow a down signal etc. You get the idea? There is no memory function required here, just detect the stall and reverse the direction...

Before you ask, you already know in which direction it's travelling in, as you telling the mcu by pressing a switch for that direction of travel ;)
 
well yes :p but as i sed, i am trying to do it in a way that no extra feedback is attached to the MCU. if i cut open the board now, i will probably ruin it all together :p and saddly right now it does not have any from the windows... :/

EDIT: How about this? :
So i got a "main relay" somewhere, that is being energized when a stall occures (by a V+ signal that is risen when a stall happens). so, if i connect the (-) of the coil, to the same GND signal that comes from the buttons/MCU, and make this relay , into a latching relay, then it will stay latched for as long as the original signal stays !
 
Last edited:
Ok, having re-read your posts, I think we are getting confused here. You said that you retro fitted these motors, and that you are controlling them from a couple of switches. So I have to assume that the car had no power window controls fitted to begin with. If that is the case, then you are simply measuring the current of the motor with an opamp etc and flipping a relay over to reverse the motor direction and inhibit switch function. You have also now mentioned that you have an MCU in the mix, is this a window controller or are we talking about something else here? If you retro fitted the motors, then surely you also retro fitted the wiring for them including power directly to a fused source. If this is something else, ie you are using pre-existing wiring etc, it would be beneficial if we knew. You mention that the GND is coming from the MCU, again, I'm not following you here.

I think you need to lay out exactly what you have to work with, how it's wired up and exactly what you are trying to achieve so that we can all be clear on your goals...
 
hehe you are absolutely right:p

so: I am running a CarPc that controls an arduino-board(the MCU). i control the PC, the PC controls the arduino, and the arduino controls many electronics in the car, like power windows or AC. the power windows are controlled, by providing GND to their relay coils (by an NPN transistor)

but since the software is not to be always trusted, i want to also have a hardware solution... hence the switches!

How things where, doesn't matter, since i am planing their new version :p my main guideline is to have as less wires as possible running in the car (i already have to many), and this is why i "cant" provide feedback to the MCU (and also because the switches bypass it completely anyway)

i am planing on installing the power window relays, inside the doors, mainly because i have too much space free there :p

so now if i want to add a feature like "complete roll up/down" the only way i can do this, is by timing... etc by energizing the relay for 4 seconds. but as you can imagine , this does not work so well.. so what i want to do, is set the timing to something like 8seconds, and provide some failsafe, that when the motor stalls, the power will be cut.

i can remove the door panel (obviusly:p) but i cant remove the rest of the stuff required, in order to install some hardware "position sensors" in the window.. :p i can only reach the motor, and this is why i look in a stall current method :p

P,S 1: i also run fuses, and relay interlocking, but those would just complicate things even more :p
P.S2: i think that cars, get rid of this problem, by installing some special siwtches in the top and bot of the window track, when the window reaches the max position, it presses the siwtch, and the switch, grounds the motors positive supply... so the only way for the window to move , is the other way :p
 
and what i was rubling 2 posts above looks like this :p :
powerwindows.png


the "power relay" will act as a latching one.
the op-ampl symbol is NOT an actual op-amp !! just means a method that will provide a 12v pulse when the motor stalls (could have used a blank rectnagle now that i think of it... )

also, the motor is connected to the normaly open contacts... i did a mistake in the schemantics!!
 
Last edited:
Your circuit does not make sense. I would expect the current sense op amp to be connected to the sense resistor R1. A possible alternative method if you can still get to the shaft on the motor would be to but a small gear on the shaft driving a large gear that did less than one revolution for the full window travel. If you then put a pin on this wheel then it could operate limit micro switches. You could use a toothed belt and pulley to achieve the same thing. Is the motor a permanent magnet motor that you reverse by reversing the polarity ? If not can you explain how the motor reversing works ?

Les.
 
as i stated below the circuit, the op-amp symbol, is not an Actuall op-amp... i used it as a "symbol", to represent the method that will provide a 12v output when the motor stalls... (back emf or current sensing)... And the R1 is there, to provide the minimum current required , to keep the power relay latched, after it has been energized.

as for the larger gear, this is a great idea! actually all-together this will be my first goal, but i am not sure that i will be able to find a gear like that where i leave, and also, i dont think that it will fit in there anyway... :/

yes the motor is a permanent magnet one. just reverse the polarity (in the circuit there should be enother relay but i omited it for simplicity)
 
Ahh, well that now looks like a completely different picture to the one you initially started painting in my mind :)

As you mentioned it, and as I understand it, the arduino is controlling relays which in turn, I assume, directly control the window motors by switching a GND to them. In order to do so, I further assume that your window control switches are not connected directly to the motors, but are connected either to the CarPC which, you stated, controls the arduino, or directly to the arduino itself.

So here's what I reckon is a good starting point. The sensing resistor(s) is/are placed in the + supply lead to each window motor. The trip point for detecting a motor stall is going to be much the same as the window travels in either direction, however the running current wont be. When the window is going down, gravity is helping to some degree, but on the way up it is hindering to some degree, therefore the current will be higher on the way up. So I think I would be looking at dimensioning a "window detector" (giggle that term) that covers the running current range, and trip on anything beyond that. The output of your current sensor will control another relay that effectively changes the direction of the motor by inhibiting the appropriate window control switch. I'll let you wrap your brain around the relay contact arrangement required :)
 
I think something like this should work.

Image5.jpg





The current sense resistor should drop about 0.8 volts when the motor is stalled. This is how it works. When there is more than about 0.7 volts across the current sense resistor the 2n3904 conducts this causes the 2n3702 to conduct after about 0.5 of a second. (This is to avoid the starting current tripping the circuit.) The 2n3702 provides gate current to the SCR turning it on which causes the normally closed contacts on RL3 to open removing the drive to the motor. The SCR remains latched on until both RL1 and RL2 are de energised.

Les.
 
"Detect car power window max-rolled up or down??"
Never seen a car window rolling. They slide.

Optocouplers trough the glass by the hidden door area will signal when an opaque spot adhered to the glass is to stop motion.
 
Easiest solution is to install PTC's that are designed for holding current of normal operation.
https://www.digikey.com/product-search/en/circuit-protection/ptc-resettable-fuses/656272?k=ptc
They regulate at around 85'C for any applied load exceeding max trip current. and usually take a few seconds to trip and 10 to 20 seconds to recover depending on air convection.

Since they are much smaller than the motor, they reach 85'C faster than the motor thus protecting it. I would measure motor Rs and compute stall current and choose trip current to be 1/2 of stall current which will occur just after motor starts to turn then decay quickly as back EMF buildup with speed. Typically motor's stall current is 5 to 8x normal current
 
Last edited:
Good suggestion Tony. You could even use two PTCs with diodes in parallel so that you did not have to wait for the PTC to cool down before the motor would run in the reverse direction.

Les.
 
Status
Not open for further replies.

Latest threads

Back
Top