The benches
Four lessons use gallery circuits on an Uno: the object counter (an E18-D80NK infrared proximity switch), the sump pump controller (two floats, a relay and a current check) and the water pressure gauge (a 0.5 to 4.5 V transducer, with a meter added on its signal wire).
Two are drawn for the course at 24 V with no microcontroller:
- NPN and PNP: both sensor output stages, a slide switch playing the target, and two PLC inputs drawn as 4.7 k resistors (about 5 mA each) with a meter across each.
- A 4-20 mA loop: an op-amp and a transistor hold the loop current at what a knob asks for, 4 to 20 mA, through a series ammeter, a cable resistor and a 250 ohm receiver. It works like a four-wire transmitter; a real two-wire one does the same job powered from the loop.
Two new Uno sketches go with them: loopscale reads the loop's receiver on A0
and scales it to a range you type (RANGE 0 20, UNITS ft), flagging an open
loop under 3.6 mA; tankctl runs the boss.
Take the course Industrial sensors and 4-20 mA on /learn.
What is a stand-in
Mokxi has no inductive or capacitive proximity part, so the photoelectric E18-D80NK stands in and the first lesson says which real type suits which job. The NPN and PNP sensors are their output transistors drawn out, and the loop's transmitter is a current source on the bench, not a field instrument. The tank's pump is a 6 V stand-in on a relay module.
The lessons
- Proximity sensors: count boxes, see the NPN output go LOW, set the range, and pick inductive, capacitive, photoelectric or ultrasonic for a job.
- NPN vs PNP: a sinking sensor into a sourcing input, a sourcing one into a sinking input, 5.1 mA per input, and the wrong pairing that never turns on.
- Level switches: pump on with debounce, off after a delay, a high-water float that forces the pump on, NO against NC, and proving the pump with its current.
- Pressure transducers: 60 psi is 2.90 V, offset and span, 2 bar is 29 psi, and 10 ft of water is 4.33 psi.
- 4-20 mA loops: 12 mA at mid range, the 4 mA live zero, 1 to 5 V on the receiver, 500 ohms of cable changing nothing, 1000 ohms saturating the loop, and a cut cable reading 0 mA.
- Scaling: milliamps, percent and engineering units, rescaling by typing a range, a range that starts at -40, and a loop fault that refuses to print a number.
- Boss: a tank controller: a hatch interlock, a dry run, a fill between two floats, a cut high-float wire that fails safe, bad water, a blocked discharge, and a TDS limit you set yourself.
Safety
Everything in the course is low voltage: a 24 V bench and a 5 V Uno. Real tank and pump controls are listed equipment installed to code, a real high-level alarm is an independent switch, and work in a live panel is for a qualified person after lockout/tagout. The TDS limit quoted is the US EPA's secondary (taste and scaling) guideline and is informational.
Before and after
The course builds on Sensors and measurement (bridges, ADC resolution and calibration) and sits beside PLCs and ladder logic and Troubleshooting control circuits.