The Y option module filters the MCU's PWM signal to produce DC voltage and current outputs. One module provides three channels and is assembled into the ordered MPAINO product before shipment. A channel's DIP switch and the terminal used determine its output range; changing a program channel number does not select a voltage or current range.
| Item | Description |
|---|---|
| Option codes | Y, Y2, Y3, Y4 |
| Outputs per module | Three channels, CH0–CH2 |
| Output type | DC voltage and current from filtered PWM |
| Voltage ranges | DC 0–5V or 0–10V, selected by each channel's DIP switch |
| Current ranges | DC 0–10mA or 0–20mA; software scaling can use 2–10mA or 4–20mA within those ranges |
| Resolution | 16 bit |
| Accuracy | ±0.5% or less at DC 12V and half range |
| Maximum configuration | Four Y modules, 12 channels; Y and K outputs together no more than 12 channels |
| Product supply | DC 12–24V main supply required; download-cable power alone cannot provide normal output |
| Option | Y modules | Analog outputs | Y channels for analogWrite(ch, value) |
|---|---|---|---|
| Y | 1 | 3 | 0–2 |
| Y2 | 2 | 6 | 0–5 |
| Y3 | 3 | 9 | 0–8 |
| Y4 | 4 | 12 | 0–11 |
Each module labels its terminals CH0–CH2, but program channels continue across modules: 0–2 on the first and 3–5 on the second. K pulse outputs use a different channel range. With one K module, up to Y2 can also be configured; with K2, no Y module can be configured. Y is available regardless of the model's digital I/O point count.
| Channel DIP | Voltage at V+ | Current at I+ | Common terminal |
|---|---|---|---|
| ON | DC 0–5V | DC 0–10mA, or 2–10mA with software scaling | − |
| OFF | DC 0–10V | DC 0–20mA, or 4–20mA with software scaling | − |
Use V+ and − for voltage, or I+ and − for current. Both signals are present, so connect the receiving device only to the terminals for the required signal. The − terminal is connected to the product's internal GND.
Select the shipped Analog Output Module option in Arduino IDE. The sketch sets CH0 to approximately half of its selected DIP range. Three channels on one Y module share a Timer setting; changing TOP or frequency for one may affect the others.
const uint8_t outputChannel = 0; void setup() { analogWriteInit(outputChannel, 65535, 1); // Set the PWM TOP and prescaler for Y CH0 } void loop() { const uint16_t fullScale = analogWriteMax(outputChannel); // Read this channel's current maximum analogWrite(outputChannel, fullScale / 2); // Output about 50% of the DIP-selected range delay(500); }
With DIP ON and V+, the ideal target is about 2.5V; with DIP OFF, about 5V. These are nominal ratios, not a guarantee of measured accuracy.
Set CH0 DIP OFF and connect the receiver to I+ and −. analogWrite2() maps 0 to 4mA and 65535 to 20mA.
const uint8_t outputChannel = 0; void setup() { // Set Y CH0 DIP OFF for the 0–20mA hardware range. } void loop() { analogWrite2(outputChannel, 32768); // Midpoint of 4–20mA, about 12mA delay(500); }
IanalogWrite(ch, min, max, value) and IanalogWrite2(ch, min, max, value) can map an engineering value to the output range. analogWrite2() does not move a DIP switch; a device wired to V+ will not receive 4–20mA.
| Symptom | Check |
|---|---|
| No output | Confirm the Y module, DC 12–24V main supply, Analog Output Module option, and program channel. |
| About half or twice the expected level | Check the channel's DIP position and whether the receiver uses V+ or I+. |
| No 4mA live zero | Confirm DIP OFF, I+ wiring, and use of analogWrite2() or another 4–20mA function. |
| Another channel also changes | Check whether TOP or frequency was changed for their shared three-channel Timer group. |