Tactiverge BuildBUILD 003
Create an Intelligent Sorting Machine
A conveyor belt carries a jumble of red, blue and metal parts past three sensors, and one sensor sometimes lies. Can you design the logic that still drops every part into the right bin?
Live build-along: not scheduled yet. Everything here works on your own, any time.
Why it matters
Sorting machines decide what happens to parcels, recycling, fruit and factory parts, often far faster than a person could look. Recycling plants, for example, use optical sensors and puffs of air to separate materials. Every one of those machines rests on the same idea: measure, turn the measurement into a decision, and act on it, reliably, millions of times.
Your objective: Design the decision logic for a virtual sorting machine: turn sensor readings into yes/no signals, write the rules as truth tables and logic gates, and make the machine tolerate one faulty sensor.
- 1.
The belt
Parts arrive one at a time. The machine has a fraction of a second to decide about each one.
- 2.
The sensors
Three colour sensors, a light gate that times how long each part blocks a beam, and a metal detector. Each reading is a little bit noisy.
- 3.
The threshold
A number becomes a yes or no by comparing it with a threshold. Parts close to the threshold are where mistakes happen.
- 4.
The logic
AND, OR and NOT combine the yes/no signals into one decision: which bin?
- 5.
The flap
A diverter flap acts on the decision. If the logic is wrong, the flap is confidently wrong too.
Watch (optional, short)
Hand-picked explainers from their creators. Each one has a reason to watch it. Skip them if you’d rather just build.
Introduces AND, OR, NOT and XOR, the building blocks behind every digital decision a computer makes.
10 min 7 s · captions on YouTube · source
Nothing loads from YouTube until you press play.
Builds real logic gates from transistors on a breadboard, linking abstract logic to actual electronics.
13 min 1 s · captions on YouTube · source
Nothing loads from YouTube until you press play.
Detailed animations follow light through the lens onto the image sensor's pixels, then show how it becomes a digital photo.
14 min 20 s · captions on YouTube · source
Nothing loads from YouTube until you press play.
The engineering you’ll use
Thresholding
Compare a reading with a threshold to get a bit: 1 if it is above, 0 if not. Choosing the threshold is a design decision.
bit = 1 if reading ≥ threshold, else 0
Truth tables
List every combination of inputs and the output you want. With n yes/no inputs there are 2ⁿ rows, so three sensors give 8 rows.
rows = 2ⁿ
Logic gates
AND is 1 only when every input is 1; OR is 1 when at least one is; NOT flips. Any rule in a truth table can be built from these.
red bin = R AND NOT L AND NOT M
Averaging and speed
A sensor that averages n noisy samples cuts its noise by √n. A faster belt gives it less time to look at each part, so fewer samples and noisier readings: throughput against accuracy.
σ_avg = σ / √n, n = sample rate × window ÷ belt speed
Majority voting
Three sensors check the same thing. If at least two say yes, believe yes. One faulty sensor can no longer fool the machine.
Y = (A·B) + (B·C) + (A·C)
Errors have two kinds
A false positive sends a part to a bin it does not belong in; a false negative misses one that does. Moving the threshold trades one kind for the other.
accuracy = correct decisions / all decisions
Connects to: Thresholding and simple classification · Logic gates and Boolean algebra · Digital input and output · How sensors measure · Measurement error and uncertainty · Analog-to-digital conversion · Decisions and loops · Evaluation metrics · Testing and debugging
Same machine. Five ways in.
Pick the level that feels like a stretch, not a wall. You can switch any time, and your work saves to your Workshop.
✦ Research Engineer · Investigate reliability
Ask one question (for example, how does belt speed trade throughput against accuracy, or how much does majority voting help as glare gets worse?). Change one setting across at least four recorded runs on the same test batch, hold everything else fixed, and write a short technical report.
You’ll make: Four or more runs recomputed on the server and a report with a hypothesis, method, results and limitations, reviewed by a person.
Reviewed by a person
100 parts, shown at 4× speed.
- Accuracy
- 43.0%
- Parts / min
- 120
- Colour noise
- ±6.0
- Wrong in Red
- 0
Latest parts past the sensors
- Run the belt to see readings.
■ red parts ■ orange caps ■ everything else
Sign in to record runs.
At the live build-along
60 minutes, building together
- Team challenge
- Teams of three get the same conveyor, the same brief and the same noisy sensors. Each team finds settings that sort at least 96% of parts at 120 parts per minute, then explains the one decision that made the biggest difference. No leaderboard: every team that gets there explains how.
- Your own design
- On your own: push the belt as fast as you can while staying above 96% on the unseen batches. Write down what you traded away, and which wrong bin worries you most.
- Questions
- Moderated questions in the live room. Questions are answered on screen without names, and chat stays off.
- Extension
- Add a fifth bin: 'unsure', for parts whose colour reading sits very close to the threshold, so a person checks them. Which parts would land there, and what does it cost the client in staff time?
- You leave with
- A saved rule table, tuned machine settings with their accuracy on unseen batches, a working voting circuit and a written explanation of false positives and false negatives, stored in your Workshop and counted toward your Passport.
For educators & facilitators
A complete run of show, misconceptions, safety notes and a printable worksheet.
Open the facilitator guideSafety: Browser simulation and paper design only. Never put hands near a real conveyor, diverter or factory machine, and never open sensor housings or mains-powered equipment. Any physical extension needs an adult's safety review and supervision before anyone starts.
Go further
- → Sense, think, act (Robotics Expedition, Level 1)
- → Playground: digital logic
- → Mission: The Three-Sensor Interlock
- → Atlas: thresholding and classification
- → Try BUILD 008 (Create a Virtual Computer) to see the same gates add numbers.
- → Mission: The Three-Sensor Interlock uses majority voting to keep a robot cell safe.
- → Playground: digital logic. Try the 2:1 multiplexer challenge, the circuit that steers a signal to one of two places.
- → Atlas: evaluation metrics, for better ways to score a classifier than accuracy alone.