Wipers control (PMU-16)


I’m trying to set up wiper control.
I have a mechanical switch that I can use to select the operating mode: off, delayed, slow, fast. Each of the switch modes is connected to a separate analog input.
In the wiper module, for several modes to work, I need to specify one channel. I think I need to use a 4 position switch (0-1-2-3).
But how to set the state of this switch depending on the state of the desired analog input? I wanted to use a function, but a function can only return 1 or 0.
How can I do that?

Is off mode connected to an analog in? It does not need to be, when the PMU doesn’t see an input on any of the set input channels it will just park and shut off.

Depending on how the switch is for outputs, you have 2 ways forward.

Create a number channel and multiply each state by 1, 2, 3 and add them together. (if a state is 0 then its 1, 2 or 3 * 0 and that always equals 0)
See the project file’s n_WiperSpeed

You could build a table using an analog input and voltage. You’ll notice that the wiper “multiple swipes” input has 8 possible states (though you want 0 to be off). Fanciest would be to use a DSP switch like the one ECUmaster sells.
See the project files t_WiperAnalog input

Alternatively if you want to use 3 switched inputs you could do the following:
Add 3 analog inputs to your project. label them by function.
Create and populate a table with values from input 1 and 2. You can then use a second table to feed forward the value from the first table and add it to a value from the 3rd input. That table becomes the channel used for “Multiple swipes input” in the wiper module. I have this built like multiple switches wouldn’t be switched at the same time, but if they were this is the way to do it and tweak the numbers in the tables to add up instead.
And since there is no way all of that’s not confusing see the attached PMU file example.

Don’t forget a park input pin.

Wiper inputs example.pmu (3.5 KB)

Thanks, I used the method with a numerical variable channel and everything worked as expected.

1 Like