## Sunday, June 12, 2011

### Variable intermittent wiper control - Part 4

Variable intermittent wiper control - Part 3

It seems I have a couple more things to say about the circuit, matters that are rather important. So this entry will be about tying up loose ends, and then some.

1. When the VIWC is powered, switching the stalk to any of the settings which turns on the front windshield wiper (INT, LO, HI, momentary wipe) will not perform any operation. This is because the wiper motor needs power via W-VDD and W-PP and the module's electronics needs +12V from W-VDD. The only setting that will work--partly at least--is when the spring-loaded stalk is pulled toward the driver. This is the front mist + wiper setting. When the stalk is pulled, the front mist motor will operate and spray water, but the wiper will be nonoperational.

On the other hand, the rear wiper and rear mist are fully functional even with VIWC on. The rotary switch (knob) on the stalk that controls these functions operates normally. This is of course desirable. We'd want to be able to operate the rear wiper and washer regardless of whether the VIWC is on or off.

2. If we want longer time intervals than the 32 seconds we can derive a 6-bit ADC value instead of a 5-bit number. That would give us a maximum of 64 seconds given our algorithm.

We can also vary the step function, i.e., the increment. For instance we can convert the ADC value from 8 to 5 bits and then add 2:

``return ((ADRES >> 3) + 2); ``

The range of time intervals will then be 2, 4 ,6 ... 64 seconds.

For fractional values, say increments of 1.5 seconds we can do the following:

``TIME = (ADC())*20 + 10; ``

10 timer ticks = half a second, so the above code will add 0.5sec to the increment value.

3. I used the Saleae Logic to measure the wipe time interval for a few potentiometer settings. Images show below 1, 16, and 32 second intervals. Look at the value for the item marked"Width" for the actual time intervals for the particular chip I used. Probe was connected to 10F222's GP2 pin.

4. Just as I finished writing Part 3 I stumbled upon a forum discussing a most creative and elegant type of variable intermittent wiper. The circuit learns how long the time interval between wipes by monitoring when the user flips a couple of switches.
This wiper delay timer "learns" the wiper interval in the following way: It starts drizzling, so you flick the wipers once. It keeps drizzling so, when the screen is in need of another wipe, you flick it onto intermittent. The wiper delay timer sets itself to the time interval between your initial "flick" of the wipers and when you switched it to intermittent, and carries on using that interval thereafter.
This is such a great and simple idea. And it's more user-friendly than continually tweaking a pot (while driving!) to get the timing right. I had one of those eye-rolling "Why didn't I think of that" moment.

After mulling over the switch requirements, the light bulb flashed, and I figured that for our version of this type of control one momentary contact button would suffice. By holding holding the button for about a second we can inform the MCU that we want to enter time interval record mode, i.e., the circuit will wait for us to press the button again (for just a fraction of second) to lock in the time interval we desire. Thereafter the circuit will use that time period to sweep the windshield. Thereafter should we press the button again for less than second the MCU will shorten the wipe interval time accordingly. Pressing the button for <1sec can't lengthen the time interval, only shorten it. Thus we need to enter record mode which can be done so at anytime by, as before, holding down the key for at least a second.

Looks like the potentiometer-based VIWC has already been obsoleted and shelved even before I've designed a board for it. Which is just as well since I now don't have to expend so many hours on PCB design and fabrication and assembly of a circuit that I probably won't be installing anyway.

In Part 5 I will have a full discussion of this new type of VIWC. Schematic and firmware will be provided and discussed.