I'm in the middle of making my own comfort module for my car based on Arduino. I've ported most of the stock features, including controlling the windows via a switch, but I want to add auto-closing feature when my rain sensor detects rain, and auto-closing when passenger holds the button for more than half a second. The question is - how do I know if the window is fully opened or fully closed? Is there some additional sensor fitted into the cars with this feature? Do I just measure motor power usage and stop when it's above average? I thought about measuring the time window takes from fully opened to fully closed and vice versa, but that wouldn't be very accurate.
Anti Pinch is now required on all vehicle power windows in North America and many other countries. Check this Federal Register link for some of the requirements in the US: https://www.federalregister.gov/documents/2004/09/15/04-20714/federal-motor-vehicle-safety-standards-power-operated-window-partition-and-roof-panel-systems All car manufacturers now have an anti-pinch feature on all power windows. This safety concept is to eventually include every moving pinch part on the vehicle is happening very fast. In the near term it will require all windows, sun roofs, sliding doors, tailgates, lift gates, seats, and any power driven moving object to eventually be controlled by an anti-pinch system.
It is easy to say measure the current but remember that the motor can be from -40 to about 85C. The viscosity of the grease changes as does the wear and tear of the gears changing the current requirements. You can use this sensor to determine travel limits. Hopefully this helps.
Car windows with features like auto up/down or remote open on modern cars tend to have rotary encoders, off board controllers like a bcm or a module in the door switch panel). The more expensive the car...
Car windows without those features tend to be basic motors only and have no way to determine if open or closed. They won't add encoders to the motor assembly because they know they won't use it and it cost them pennies more.
Without modification, these can be forced to close by running to motor for x seconds, and assume they close. If they start to overheat from say a stall condition like a stuck window or an object in the way, the required kill condition feature should kick in. On the cheaper models that's a simple PTC inline with the motor. It will trip, and the motor stops.
No. The main operating system for the power windows does not have any complexity. In fact the principle, still used today, was developed in the 90s and is adopted by most automobile manufacturers, precisely because it is a basic and efficient project. The strategy is based on a central module, responsible for managing individual central units installed in each door of the vehicle.
In the case of the locking system, how does it know where to stop? Simple, the module installed in each door is usually integrated with the drive motor itself. The system needs to be "warned" when the glass reaches the upper limit. In the following way:
- The glass is opened to its lower limit.
- The switch is activated (keeping it pressed) until total closing.
- Even when reaching the end of stroke, the programming is performed keeping the switch pressed for 5 seconds. The slave module, installed in the door associates the end of stroke due to a small voltage drop, a few mVolts. Immediately the power to the motor is interrupted. Many might say "then the anti-squashing system would work". Actually, no! Remember the switch is held down. In this case the system cuts the power but does not go back.
- After 5 seconds the switch is released and at the same instant it activates the opening, with just one touch (it is not held down). Actually, when the up button was kept pressed, the slave module recognized the procedure, and warned the central module. When it is triggered to open, again the central module is warned by the slave system that immediately orders the window to open, even if the button does not remain pressed. And this way, every time the button is pressed and released in a period of less than 1 second the system interprets that the closing or the opening must occur completely.
In the case of the anti-squashing system, again the system takes into account the voltage drop suffered by the motor. It immediately commands the slave module to reverse the rotation.