Source: https://mokxi.com/teachers/plans/industrial-sensors
Updated: 2026-11-19

Lesson plan

# Industrial sensors and 4-20 mA lesson plan

The sensors on a real machine and tank: proximity switches, NPN against PNP, floats, pressure transducers and the 4-20 mA loop that carries a reading across a plant. Ends with a tank controller and every interlock it needs.

7 chapters, 7 lessons, about 6 hours, on the Arduino Uno R3. Every lesson runs in the browser, with nothing to install.

Start a class from this course

The unit

## Objectives and materials

### By the end, students can

- A box counter, its output, its range, and the four families.
- Sinking and sourcing sensors, and the pairing that never turns on.
- Floats, off delays, high-water alarms and fail-safe NC contacts.
- Offset and span, psi and bar, and pressure as depth.
- Live zero, the receiver, loop resistance and a broken loop.
- Milliamps to percent to engineering units, and faults that are not numbers.
- Floats, a hatch interlock, pressure and quality checks, your own limit.

### Materials for the whole unit

- Arduino Uno R3
- Bench power supply
- Buzzer
- Character LCD with I2C backpack
- Current sensor, ACS712
- Float switch, ZP4510 x 2
- Full-size breadboard
- Half breadboard
- IR proximity switch, E18-D80NK
- LED
- Mini water pump
- Multimeter x 2
- Op-amp
- Potentiometer
- Pressure sender, 0.5-4.5 V
- Pushbutton
- Relay module
- Resistor x 6
- Slide switch x 2
- Transistor (NPN or PNP) x 2
- Water quality sensor, pH, TDS, EC, DO, NTU

Every part is already on the simulator’s bench, so there is nothing to buy or hand out. The counts are the most any one lesson uses, if you build it on real breadboards too.

Chapter 1. About 45 min

## Proximity sensors

A box counter, its output, its range, and the four families.

Lesson | Time | What students do

Proximity sensors An infrared proximity switch counts boxes on a conveyor. What its output does, how its range is set, and which industrial type, inductive, capacitive, photoelectric or ultrasonic, you would fit for each job. | 45 min

- Run it: a box counter
- Send a box past
- The output goes LOW
- Count three
- Set the range
- Which sensor for which job

### Materials

- Arduino Uno R3
- Buzzer
- Character LCD with I2C backpack
- Half breadboard
- IR proximity switch, E18-D80NK

### Check for understanding

Each student finishes "Proximity sensors" on their own, without opening the hints. The simulator checks 6 of its 6 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Which sensor for which job".

Chapter 2. About 55 min

## NPN vs PNP

Sinking and sourcing sensors, and the pairing that never turns on.

Lesson | Time | What students do

NPN vs PNP Both output stages at 24 V with the PLC inputs they drive: a sinking sensor into a sourcing input, a sourcing sensor into a sinking one, the 5 mA an input card draws, and the wrong pairing that never turns on. | 55 min

- Run it: two sensors, two inputs
- NPN: the sensor sinks
- What an input draws
- PNP: the sensor sources
- Wire it wrong
- It never turns on
- Choose and check

### Materials

- Bench power supply
- Multimeter x 2
- Resistor x 4
- Slide switch x 2
- Transistor (NPN or PNP) x 2

### Check for understanding

Each student finishes "NPN vs PNP" on their own, without opening the hints. The simulator checks 7 of its 7 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Choose and check".

Chapter 3. About 55 min

## Level switches

Floats, off delays, high-water alarms and fail-safe NC contacts.

Lesson | Time | What students do

Level switches A sump pump controller with two float switches: pump on at one level, off after a delay, a high-water float that forces the pump on, normally open against normally closed, and a current check that proves the pump really runs. | 55 min

- Run it: a sump
- Raise the water
- Let it drain
- The high-water float
- Normally open or normally closed
- Prove the pump runs
- Other ways to sense level

### Materials

- Arduino Uno R3
- Buzzer
- Current sensor, ACS712
- Float switch, ZP4510 x 2
- Full-size breadboard
- LED
- Mini water pump
- Pushbutton
- Relay module
- Resistor
- Slide switch

### Check for understanding

Each student finishes "Level switches" on their own, without opening the hints. The simulator checks 7 of its 7 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Other ways to sense level".

Chapter 4. About 45 min

## Pressure transducers

Offset and span, psi and bar, and pressure as depth.

Lesson | Time | What students do

Pressure transducers A 0 to 100 psi transducer on a water line: 0.5 to 4.5 V ratiometric output, offset and span, psi to bar, and reading the depth of water from the pressure at the bottom of a tank. | 45 min

- Run it: a pressure gauge
- Pressurize it
- Offset and span
- Two bar
- Pressure is depth
- Gauge, absolute and installing one

### Materials

- Arduino Uno R3
- Character LCD with I2C backpack
- Half breadboard
- Multimeter
- Pressure sender, 0.5-4.5 V

### Check for understanding

Each student finishes "Pressure transducers" on their own, without opening the hints. The simulator checks 6 of its 6 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Gauge, absolute and installing one".

Chapter 5. About 55 min

## 4-20 mA loops

Live zero, the receiver, loop resistance and a broken loop.

Lesson | Time | What students do

4-20 mA loops A transmitter, a 24 V supply, a series meter and a 250 ohm receiver. Why a current, why 4 and not 0, what the receiver sees, how much cable a loop can drive, and what a broken loop reads. | 55 min

- Run it: a loop
- The bottom: 4 mA
- The receiver: 1 to 5 V
- Add a long cable
- Out of voltage
- Break the loop
- Two-wire, four-wire, HART

### Materials

- Bench power supply
- Multimeter x 2
- Op-amp
- Potentiometer
- Resistor x 6
- Transistor (NPN or PNP)

### Check for understanding

Each student finishes "4-20 mA loops" on their own, without opening the hints. The simulator checks 7 of its 7 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Two-wire, four-wire, HART".

Chapter 6. About 45 min

## Scaling

Milliamps to percent to engineering units, and faults that are not numbers.

Lesson | Time | What students do

Scaling The same loop into an Uno: milliamps back from the receiver volts, percent of span, and engineering units set by typing a range, including one that does not start at zero, plus a loop fault that refuses to print a number. | 45 min

- Run it: a loop reader
- Three numbers
- Rescale it
- A range that does not start at zero
- The bottom of the range
- A loop fault is not a number

### Materials

- Arduino Uno R3
- Bench power supply
- Multimeter
- Op-amp
- Potentiometer
- Resistor x 6
- Transistor (NPN or PNP)

### Check for understanding

Each student finishes "Scaling" on their own, without opening the hints. The simulator checks 6 of its 6 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "A loop fault is not a number".

Chapter 7. About 1 h

## Boss: a tank controller

Floats, a hatch interlock, pressure and quality checks, your own limit.

Lesson | Time | What students do

Boss: a tank controller Fill a tank between two floats with every interlock a real one has: a proximity sensor proving the hatch is shut, a pressure transducer catching a dry run and a blocked discharge, a TDS probe holding off bad water, and a high float wired fail-safe. Then set your own limit. | 60 min

- The job: hold, not fill
- Shut the hatch
- A dry run
- Fill the tank
- Cut the high float's wire
- Bad water
- A blocked discharge
- Make it yours: set the limit

### Materials

- Arduino Uno R3
- Float switch, ZP4510 x 2
- IR proximity switch, E18-D80NK
- Mini water pump
- Pressure sender, 0.5-4.5 V
- Relay module
- Water quality sensor, pH, TDS, EC, DO, NTU

### Check for understanding

Each student finishes "Boss: a tank controller" on their own, without opening the hints. The simulator checks 8 of its 8 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Make it yours: set the limit".

Your class

## Teach this unit as a class

Start a class from this course and its 7 lessons are assigned in one go, in order. Students join with a six-character code or printed login cards, and each one’s work comes back to you.

The class tools are free for 30 days for one class of up to 20 students, with no card. The lessons themselves are free either way.

Start a class from this course See the demo class

More units

## Other lesson plans

Electronics basics 20 lessons, about 10 h. Embedded on the Arduino Uno 16 lessons, about 12 h. Embedded on the ESP32-C3 13 lessons, about 11 h. Embedded on the Raspberry Pi Pico 7 lessons, about 6 h. Build your own fight stick 5 lessons, about 4 h. Embedded on the STM32F411 6 lessons, about 6 h. C++ on a board 13 lessons, about 10 h. Digital logic and memory 4 lessons, about 4 h. Interactive devices on the Uno 9 lessons, about 8 h. From gates to a computer 23 lessons, about 16 h. Build a claw machine 8 lessons, about 6 h. Every unit All the courses as ready-made units, on the teachers page.
