1993 240SX standalone wiper / washer controller · v1.0 · ATtiny1616 · 120 × 85 mm
Drag the lever or use ↑/↓. Twist the ring by dragging it, scrolling on it, or ←/→. This stalk has no MIST detent: flick OFF → LO → OFF for one wipe.
Running scenarios against the board…
Live voltages on the board's own nets, solved from the PCB file every step.
| Net | Volts | Where |
|---|
s13_wiper.ino; it reads its ADC pins and drives its outputs by the pin names in the source. The car side is the factory stalk (EL-17 / EL-59), the ground-switched motor with its auto-stop contact, the pump and the battery, wired through our harness map.One fused key-on 12V input feeds everything. The motor and pump side goes through the 20A blade fuse; the logic side through a reverse-polarity diode and an automotive 5V regulator.
flowchart LR IN["J1 POWER
+12V key-on, GND"] --> F1["F1
20A blade fuse"] IN --> TVS["D2 SMBJ26CA
spike clamp"] IN --> D1["D1
reverse-polarity diode"] D1 --> U1["U1 LM2936
5V regulator"] U1 --> MCU["U2 ATtiny1616"] STALK["J4 factory stalk"] --> NET["Input network
2.2k pull-up, 33k, 100nF"] PARK["J2 pin 2
motor auto-stop"] --> NET NET --> MCU MCU --> ULN["U3 ULN2003
relay driver"] ULN --> K1["K1 RUN"] ULN --> K2["K2 LO/HI"] ULN --> K3["K3 WASH"] F1 --> MOTOR["J2 wiper motor
common brush"] K1 --> K2 K2 --> MOTOR F1 --> K3 K3 --> PUMP["J3 washer pump"]
flowchart LR G["GND"] -- "K1 NO (energized)" --> R["RUN_OUT
K1 common"] P["Auto-stop OR
GND sweeping, +12V parked"] -- "K1 NC (released)" --> R R --> C["K2 common"] C -- "K2 NC" --> LO["LO brush
LG/B"] C -- "K2 NO" --> HI["HI brush
LG/R"] V["+12V LG"] --> M["Common brush"]
The S13 motor's common brush sits at +12V all the time. It runs when the LO or HI brush is pulled to ground. K1 energized grounds the brush directly. K1 released hands the brush to the auto-stop contact, which keeps it grounded until the blades reach park, then switches it to +12V, which brakes the motor.
Because of that, the firmware never has to "stop at park". Releasing K1 always finishes the sweep. It also means a key-off mid-sweep parks the blades as soon as power returns.
The factory stalk has no electronics. Pin 17 is its common and goes to board ground, so each contact pulls its pin to 0V against a 2.2k pull-up. The INT ring is a 14–950Ω variable resistor from pin 19 to ground on the same kind of input, which reads 0.03–1.5V.
| Position | Contacts (FSM EL-59) | Board sees |
|---|---|---|
| OFF | 13–14 | nothing grounded |
| INT | 13–14, 15–17 | STK3 low |
| LO | 14–17 | STK2 low |
| HI | 16–17 | STK4 low |
| WASH | 17–18 | STK5 low |
| Ring | 19–20 | STK6 = 6…308 ADC |
| Priority | Request | What the board does |
|---|---|---|
| 1 | HI | K2 then K1 on. K1 is released for 60 ms whenever K2 changes over, so the contacts never switch under load. |
| 2 | LO | K1 on. The 1993 stalk has no MIST detent; a quick OFF → LO → OFF flick gives one full wipe, because the auto-stop finishes it. |
| 3 | WASH held | Pump on (10 s safety limit). Blades start slow after 0.3 s to spread the fluid. |
| 4 | After WASH | Finishes the sweep under way, then fast, fast, slow (DIP 1 on: fast, slow). Speed changes only at park. Then one slow drip wipe 4 s later. |
| 5 | INT | First wipe right away, then 2–12 s from the ring, timed from park. The ring is tapered: half a twist is about 4.9 s, so the short delays get most of the travel. |
| Safety | Park fault | If the motor is driven 8 s with no auto-stop change, all outputs stop and the LED flashes fast. Stalk to OFF clears it. |
Board connectors are Molex headers on the bottom edge. The harness runs from these to the factory stalk (E113) and factory motor (E1). Colours are from the 1991–94 FSM; confirm against Alex's connector photos before crimping.
| Pin | Net | Connect to |
|---|---|---|
| 1, 2 | +12V_IN | Fused key-on +12V (any source) |
| 3, 4 | GND | Chassis ground |
| Pin | Net | Motor wire (E1) |
|---|---|---|
| 1 | +12V_MOT | LG — common brush / auto-stop supply |
| 2 | PARK | OR — auto-stop output |
| 3 | GND | B — ground |
| 4 | MOTOR_LO | LG/B — LO brush |
| 5 | MOTOR_HI | LG/R — HI brush |
| 6 | GND | spare |
| Pin | Net | Pump wire |
|---|---|---|
| 1 | PUMP_OUT | Red (+) |
| 2 | GND | Black (−) |
| Pin | Net | Stalk pin (E113) |
|---|---|---|
| 1 | STK1 | 13 BR (park return, OFF/INT) |
| 2 | STK2 | 14 LG/B (LO) |
| 3 | STK3 | 15 L/Y (INT) |
| 4 | STK4 | 16 LG/R (HI) |
| 5 | STK5 | 18 P (WASH) |
| 6 | STK6 | 19 PU (INT ring) |
| 7, 8 | STK7, STK8 | spare inputs |
| 9 | GND | 17 B (common) |
| 10 | GND | 20 B (ring return) |
| 11 | STK_12V | spare +12V (0.2A PTC) |
| 12 | GND | spare |
| 17 B | 19 PU | 13 BR | 16 LG/R |
| 18 P | 20 B | 14 LG/B | 15 L/Y |
| Pin | Net | Use |
|---|---|---|
| 1 | +5V | Leave open when the board has 12V |
| 2 | UPDI | Programmer UPDI |
| 3 | GND | Programmer / serial ground |
| 4 | DBG_TX | To USB-serial RX, 115200 |
59 parts on the board plus 9 not fitted (option pads). The full list with harness parts is in hardware/s13_wiper/BOM.csv. Datasheet links come from the KiCad libraries; other parts are standard and searchable by part number.
| Refs | Qty | Part | Manufacturer part | Why it's there |
|---|
5,354 bytes flash (32%) · 251 bytes RAM (12%) · 0 warnings
http://drazzy.com/package_drazzy.com_index.jsonfirmware/s13_wiper/s13_wiper.ino.Set DIP 2 on and connect a USB-serial adapter's RX to J5 pin 4, GND to pin 3. Open the Serial Monitor at 115200. Every quarter second the board prints each stalk channel's ADC reading, the park switch state and what it decoded. Walk the stalk through every position; this is the stalk truth table without a multimeter. The Virtual bench tab prints the same lines.
S1=1023 S2=1023 S3=0 S4=1023 S5=1023 S6=96 S7=1023 S8=1023 | park=PARKED | INT(6.0s)
Before the board goes near the car, prove it on the bench with three 12V bulbs and a toggle switch standing in for the motor. Nothing on the board can tell the difference.
| Stand-in | Wire it |
|---|---|
| Power | 12V supply (3A+) or a battery through a 5A fuse → J1 pins 1–2; ground → J1 pins 3–4 |
| Bulb A = LO brush | +12V → bulb → J2 pin 4. Lit = motor running on LO. |
| Bulb B = HI brush | +12V → bulb → J2 pin 5. Lit = motor running on HI. |
| Bulb C = pump | J3 pin 1 → bulb → GND. Lit = washer on. |
| Toggle = auto-stop | SPDT switch: common → J2 pin 2. One side to +12V ("parked"), other side to GND ("sweeping"). |
| Stalk | The real stalk through the harness, or jumper J4 pins 2–5 to J4 pin 9 (GND). |
Start with the toggle on "parked". 5–10W bulbs keep the current low.