DIY Power Windows

thansen090

New Member
It seems I'm often sitting around looking at my car and wondering what I can use my PICAXE chips for...
I thought it would be an interesting project to make all my windows go down automatically. Has anyone done this? Does anyone have plans, schematics, or ideas? I know there are aftermarket modules available but where's the fun in just buying something?

I looked around on this forum here and I learned a bit about motor drivers, H-bridges, and current sensing. There's even a guy who built a power window controller (for one window?) but there are no details on how and no one replied to his (1) post.

My driver's window has an auto-down feature where you tap the switch and the window goes down by itself. The circuit for that appears to be a few capacitors, a relay, and a small IC. I did notice that my windows don't have limit switches and the fuses don't blow every time a window reaches full up or down, so... there must be some sort of current limiting already in use. A spare motor drew about 1.6A with no load.

I'm not much of a cook but I can follow a recipe. Any help with the ingredients for this would be much appreciated.

*Not wanting to start a discussion about the legality/safety issue of automatic "up", I would like to have that as an option.
 

rossko57

Senior Member
Auto-up when locking the vehicle might be thought desirable.

Auto-up isn't particularly hazardous so long as used in conjunction with an already inherently safe system - e.g. it is limited in force applied etc. - obvious safeguards would include a maximum motor run time. Compare with the risk of shutting fingers in doors etc.

It would probably pay to investigate how the existing system works further, might be stall current sensing for the 'limit stop', might simply be a safe-to-stall motor. You may be able to exploit or at least retain the existing arrangement. At its simplest, a Picaxe could just simulate button presses.
 

fernando_g

Senior Member
In the late 1990s I worked for a company which manufactured electronic sub-assemblies for many of the large auto companies.

As you mention, the power window controller consisted exactly of the elements you mention. The small IC was in that case an ASIC, as automotive OEMs are both very large volume and cost sensitive.

But to your point, the ASIC monitored the motor current continuously and when it jumped (because the window had either reached its end stop or jammed) it disabled the relay. A timeout period was also included, whereas the motor would stop if high current had not been detected within a reasonable period.

The most difficult part of the current sensing was to remove the motor noise. Brushed DC motors are very noisy. To remove the noise without introducing too much sensing delay required a higher order "brickwall" filter.
I remember all of this because I actually performed the validation testing. Getting the filter coefficients just right meant lots and lots of effort.

Brickwall filters are fairly straightforward to implement via IIR filters. Given the requirement for floating point calculations and the scores of variables, I don't think you'll be able to implement an IIR filter with a Picaxe.
Having said that, there are many sampled-capacitor filters where a very high order can be implemented, and which would be placed ahead of the Picaxe A/D conversion.

That filter plus the current shunt amplifier and you are looking at a 3 chip solution.
But it is definitively doable.
 

thansen090

New Member
Thanks for the informative reply. Not very encouraging, but informative.
I'm disappointed when I hear that something is very hard or impossible to do with a PICAXE.
Even the 08M2 probably has more computing power than what we used to put men on the moon.
Dreams are always amazing until reality rears its ugly head though.

Even if the motor control aspect is outside the ability of a PICAXE (and my meager electronics knowledge), all that is already in place. The switches are still just switches and could be bypassed with relays in parallel. Not having feedback to the controller wouldn't be ideal but running the motor for a set time (the time it takes to go from full down to full up) would be the same as holding down the switch too long: nothing bad happens. I'll have to research this project more, time and ambition permitting.

BTW: I do have a spare switch assembly from a salvage yard. Can anything be learned from the original circuitry? I'd imagine this is pretty much the same as in any car with power windows.
 

PhilHornby

Senior Member
I'd imagine this is pretty much the same as in any car with power windows.
It probably depends on the vehicle ... I can make my car windows go up and down by holding the Lock/Unlock buttons on the Remote Fob...or from my laptop, using my trusty copy of VCDS/VAGCOM. The motors are driven by a module that receives its commands via a Canbus from another one that has the switches connected to it. In which case, there are lots of ways to skin the cat...

Somewhere on the web, is a project to 'sniff' the messages associated with the steering wheel audio switches, so they can be intercepted to control an Android tablet. Presumably it's possible to see/inject window up/down commands using a similar technique?

ah - found it ... see here: http://hackaday.com/2011/03/08/can-sniffing-for-steering-wheel-button-presses/
 
Last edited:

fernando_g

Senior Member
Thanks for the informative reply. Not very encouraging, but informative.
I'm disappointed when I hear that something is very hard or impossible to do with a PICAXE.
.
You should not be. Even a native PIC will have difficulty keeping up with full fledged digital signal processing.

Read this very informative info (emphasis mine):

In brief, DSPs are processors or microcomputers whose hardware, software, and instruction sets are optimized for the high-speed numeric processing, essential for processing digital data representing analog signals in real time. What a DSP does is straightforward. When acting as a digital filter, for example, the DSP receives digital values based on samples of a signal, calculates the results of a filter function operating on these values, and provides digital values that represent the filter output. The DSP’s high-speed arithmetic and logical hardware is programmed to rapidly execute algorithms modelling the filter transformation.

There is more, read at your leisure:

http://www.analog.com/library/analogDialogue/archives/31-1/DSP.html
 

tmfkam

Senior Member
As a suggestion...

I made a Watt Meter which was required to measure up to 25A DC. For this I used a LEM 'MiniSens' Hall Effect Current transducer. This measures current flowing by sensing the magnetic field generated in the PCB track or wire placed in close proximity to it. This could be used to measure the current flowing within the window motor without worrying too much about the noise from brushes. By checking to see if the current rise is consistent rather than transient, it should be relatively easy to determine if the motor has stalled. The sensor gives an output, centred at 2.5V for sensing AC or positive/negative DC current flow.

Data sheet:http://www.lem.com/docs/products/fhs%2040-p%20sp600.pdf
 
Top