1) 4-20mA I OUT, switch S2 in I OUT mode
In this mode, voltage from the battery is up to 24V for voltage to current converter. The converter is controlled from the Arduino PWM output D6. Simulated current flows from current converter to terminal X3 – 4-20mA I OUT throw external measuring instrument (for which we make simulation) back via X3 – 4-20mA I OUT and internal measurement resistor R7. Voltage form R7 is measured by Arduino which corresponds to the current flow.
2) 4-20mA I IN, switch S2 in position I IN
The power source is in external circuit, plus is connected to terminal X2 – 4-20mA I IN + and start the voltage to current converter. From the converter output current, via ballast resistor R6 and measuring resistor R6 to terminal X2 ̵
Diodes D2, D3, D4 protect the tool against incorrect external connection.
Voltage from R7 is measured on A7 pin and tool display simulated current and check whether the loop is closed. 19659002] Feedback measurement can be used in closed loop control in future improvements.
The battery voltage is measured by the voltage divider R12 and R13 and can be used in the future for open loop. (PWM voltage depends on battery voltage, therefore the output current is dependent on battery voltage).  3) PT100 simulation  The 150 ohm resistor is parallel to the photoresist. Photoresitor is in dark room together with white LED diode. The LED diode is PWM driven from pin D5 and provides performance resistance between terminals X1 – PT100 aprox 80-150Ohm. 4) Pulse Generator Pin D4 controls transistor Q1 and pulses are on terminal X4 – PULSE IN / OUT. Depending on position S2 output pulses, with amplitude 0V 24V from internal source or from external source connected to terminal X2 – PULSE +.
5) Pulse counter
Pulse from terminal X4 – PULSE IN / OUT takes via voltage divider R10 and R11 to pin D8. Transistor Q1 is closed. The power source from pulses can be internal or external analog to operate in pulse modulator mode.