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.

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.

LessonTimeWhat students do
Proximity sensorsAn 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
  1. Run it: a box counter
  2. Send a box past
  3. The output goes LOW
  4. Count three
  5. Set the range
  6. 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.

LessonTimeWhat students do
NPN vs PNPBoth 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
  1. Run it: two sensors, two inputs
  2. NPN: the sensor sinks
  3. What an input draws
  4. PNP: the sensor sources
  5. Wire it wrong
  6. It never turns on
  7. 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.

LessonTimeWhat students do
Level switchesA 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
  1. Run it: a sump
  2. Raise the water
  3. Let it drain
  4. The high-water float
  5. Normally open or normally closed
  6. Prove the pump runs
  7. 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.

LessonTimeWhat students do
Pressure transducersA 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
  1. Run it: a pressure gauge
  2. Pressurize it
  3. Offset and span
  4. Two bar
  5. Pressure is depth
  6. 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.

LessonTimeWhat students do
4-20 mA loopsA 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
  1. Run it: a loop
  2. The bottom: 4 mA
  3. The receiver: 1 to 5 V
  4. Add a long cable
  5. Out of voltage
  6. Break the loop
  7. 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.

LessonTimeWhat students do
ScalingThe 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
  1. Run it: a loop reader
  2. Three numbers
  3. Rescale it
  4. A range that does not start at zero
  5. The bottom of the range
  6. 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.

LessonTimeWhat students do
Boss: a tank controllerFill 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
  1. The job: hold, not fill
  2. Shut the hatch
  3. A dry run
  4. Fill the tank
  5. Cut the high float's wire
  6. Bad water
  7. A blocked discharge
  8. 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.