P0 · Product Development with Forge — Building from the Library · Lesson 2 of 6

Circuits I — sensing and inputs

~12 min

Slide 1

Sensors and how they connect

A sensor is only useful if the controller can read it — and how it connects depends on the sensor. Knowing the handful of patterns lets you predict what any product needs.

The main ways a sensor talks to the brain:

  • Analog — the sensor outputs a varying voltage the controller reads on an ADC pin. Examples in the library: the capacitive soil-moisture probe, and current sensing with an ACS712.
  • Digital single-wire — the sensor sends a digital reading over one data line. The DHT22 (temp + humidity) and the DS18B20 (temperature, on a "1-Wire" bus) work this way.
  • Timing / echo — the controller sends a pulse and times the return. The HC-SR04 ultrasonic distance sensor does this.
  • Interrupt — the sensor just yanks a pin high when something happens, waking the controller. The PIR motion sensor is the classic.
  • Amplified / bridge — tiny signals need a dedicated amplifier chip first. A load cell uses the HX711 to turn a faint strain signal into a clean digital reading.

You don't wire these by hand — but recognising the pattern tells you why Forge picks a particular block, and whether your idea is a one-wire job or needs an amplifier.

Slide 2

Reading the real subcircuits

Let's match a few real products to the sensing block they need — the kind of call you'll make constantly:

You want to…Reach for
Measure temperature + humidityDHT22 (one digital wire)
Measure temperature precisely, maybe several pointsDS18B20 (1-Wire, chainable)
Detect movement in a roomPIR motion sensor (interrupt)
Measure distance to somethingHC-SR04 ultrasonic
Know how wet the soil iscapacitive soil-moisture probe (analog)
Weigh something / measure forceHX711 load-cell amplifier
Measure how much current a load drawsINA219 (over I2C) or ACS712 (analog)

Notice the pattern: the thing you want to sense points straight at a block. When you describe a product to Forge, naming the quantity ("soil moisture," "weight," "distance") is usually enough for it to pick the right sensing subcircuit.

Quick check

You need to add weight or force sensing to a product. Which library block fits?

Slide 3

Try it — a plant soil-moisture alarm

Time to compose one. A soil-moisture alarm is a clean input → brain → output product: sense how dry the soil is, and warn when it crosses a line.

Send the prompt and watch Forge pick a capacitive soil-moisture probe (an analog sensing block), read it on an ADC pin, and drive a buzzer + LED as the output.

As you read, notice it's just blocks from the shelf you learned this lesson — connected correctly for you.

Hands-on — try it in Forge

Watch which sensing block Forge reaches for (a capacitive soil-moisture probe) and how it reads an analog signal, then drives a buzzer + LED as the output.

The prompt

A plant care gadget that beeps and lights an LED when the soil gets too dry, using a soil-moisture sensor, USB-powered, around 8,000 NGN.

Open in Forge Design

Opens in a new tab so you keep this lesson open. Nothing to buy — this is just to see how Forge reasons. This step isn't graded.