Experiment 02 · Part A · No machine learning

Resistance Lab: the Salt Water Detector

Two Wheatstone bridges, one cup of plain water as a control, and one rule you set yourself.

Each bridge has its own potentiometer. Balance both to 0 mV in water, then keep probe 1 in water and test samples with probe 2. If the sample bridge reads clearly above the water bridge, the sample conducts better: salt. You pick the threshold, test it on real cups, and then store the rule on OrbitCore so its LED answers without a laptop.

About 25 minutes. Then go further with Part B: teach a model, using the same wiring and firmware.

Bridge 1 · water reference5V (OrbitCore)GNDR110 kΩR210 kΩR3potturnProbeplain waterA0A1bridge outputA0 − A1referencearmprobearmBridge 2 · sample5V (OrbitCore)GNDR110 kΩR210 kΩR3potturnProbesalt water?A2A3bridge outputA2 − A3referencearmprobearm

A control cup

Probe 1 always sits in plain water. Whatever changes it (warmer room, wobbly USB supply, ageing electrodes) also changes probe 2, so the comparison stays fair.

One number: B2 − B1

Each bridge turns a probe’s resistance into a voltage. Subtract the water bridge from the sample bridge and you get one number: about 0 for water, thousands of mV for salt water.

One rule

If the number is above your threshold, the sample conducts better than water. Below minus the threshold, it conducts worse. In between: same as water.

What you need

  • An OrbitCore board and its USB cable
  • Four 10 kΩ resistors and two potentiometers (100 kΩ is a good start), a breadboard and jumper wires
  • Two identical probes (two electrodes each, held a fixed distance apart)
  • A cup of plain tap water for probe 1; cups of tap water, salt water and anything else you want to test for probe 2
  • Chrome or Edge on a laptop or desktop
A learning instrument, not a diagnostic test. The detector compares electrical resistance with water. It cannot tell what a sample is made of or whether anything is healthy.
Safety and good habits
  • Only use the board’s 5 V USB supply. Never connect the probes to mains power or a person’s body.
  • Direct current slowly corrodes the electrodes in salt water (electrolysis). Lift probe 2 out between tests and rinse it.
  • Keep liquids away from the board and the laptop. Do not drink the samples.

1Build the instrument

Build two bridges and program OrbitCore

Two identical Wheatstone bridges. Bridge 1 keeps its probe in plain water; bridge 2 gets the sample. OrbitCore reads all four middle points and compares the bridges.

AWire the two Wheatstone bridges

Unplug the USB cable while you connect wires. Build bridge 1 on A0/A1 and an identical bridge 2 on A2/A3.

Bridge 1 · water reference5V (OrbitCore)GNDR110 kΩR210 kΩR3potturnProbeplain waterA0A1bridge outputA0 − A1referencearmprobearmBridge 2 · sample5V (OrbitCore)GNDR110 kΩR210 kΩR3potturnProbethe sampleA2A3bridge outputA2 − A3referencearmprobearm

R1 and R2 are fixed resistors, the same in both bridges. R3 is a potentiometer in each bridge (100 kΩ is a good start for tap water): connect one end and the middle pin (wiper), and use the knob to balance the bridge in step 2. The page uses R1 and R2 only to describe probe resistances; the rule works from the voltages.

• Make the two probes identical: same metal, same spacing, same depth. Fix each pair of electrodes to a lolly stick so the distance never changes.

• Probe 1 stays in a cup of plain tap water for the whole session. Only probe 2 moves between samples.

• Use the same water for the reference cup as for your “water” samples, and keep both cups at room temperature.

• Before measuring, both probes go into the same water and each potentiometer is turned until its bridge reads 0 mV (step 2). After that, do not touch the knobs. Salt in cup 2 then makes the difference jump up.

PartFromToNote
Bridge 1 · R1 (10 kΩ)5Vnode Awater bridge, reference arm
Bridge 1 · R2 (10 kΩ)node AGND
wirenode AA0
Bridge 1 · R3 potentiometer5Vnode Bone end pin to 5V, middle pin (wiper) to node B; turned to balance bridge 1
Probe 1 (in plain water)node BGNDone electrode to node B, the other to GND
wirenode BA1
Bridge 2 · R1 (10 kΩ)5Vnode Csample bridge, reference arm
Bridge 2 · R2 (10 kΩ)node CGND
wirenode CA2
Bridge 2 · R3 potentiometer5Vnode Dits own potentiometer, turned to balance bridge 2
Probe 2 (in the sample)node DGNDsame electrodes, same spacing as probe 1
wirenode DA3

BPlay with the two bridges before you build them

First balance: with both probes in water, turn each potentiometer R3 until its bridge reads 0 mV (tip: R3 equals the probe’s resistance at balance). Then move probe 2 into salt water and watch the difference.

Bridge 1 · water reference5V (OrbitCore)GNDR110 kΩR210 kΩR310 kΩturnProbeplain waterA02.50 VA13.69 Vbridge outputA0 − A1 = -1187 mVreferencearmprobearmBridge 2 · sample5V (OrbitCore)GNDR110 kΩR210 kΩR310 kΩturnProbe28.1 kΩA22.50 VA33.69 Vbridge outputA2 − A3 = -1187 mVreferencearmprobearm

Bridge 1 · A0 − A1

-1187 mV

Bridge 2 · A2 − A3

-1187 mV

Difference B2 − B1

0 mV

The probe side reads 5 V × R_probe ÷ (R3 + R_probe). The bridge is balanced (0 mV) when R3 equals the probe’s resistance (with R1 = R2), and it is most sensitive around that point.

CPhysical Vibe Coding

Say what the board should send, in your own words. Tested templates answer bridge requests; anything else goes to the AI.

Nothing yet. Type a request below or pick one of the examples.

In simple words

OrbitCore’s analog pins turn a voltage between 0 and 5 V into a number from 0 to 1023, about 4.9 mV per step. Averaging 16 readings makes the steps finer and the noise smaller. The sketch converts everything to millivolts before sending it.

Your sketch

Your code appears here after your first request.

DPut the program on the board (“flashing”)

Two ways to do it. Both end with OrbitCore sending millivolts over USB. The same firmware serves the Detector and the Machine learning pages.

The fastest route for a workshop. This installs MakeSense’s ready-made two-bridge firmware straight from the browser. It sends A0 to A3, both bridge outputs and their difference ten times per second. It runs the Detector rule by itself (LED on when the sample conducts better than water), and on the machine-learning page it can carry your trained model.

Why two bridges, and a cup of plain water?

Inside each bridge, the reference arm (A0 or A2) comes from the same 5 V as the probe arm. If the USB voltage dips, both sides dip together and the bridge output changes much less than either pin.

The second bridge takes the same idea one level further. Water conducts a little better when it warms up, and the electrodes slowly change while current flows. Those changes hit both cups. Comparing the sample bridge with the water bridge (B2 − B1) cancels most of them, so what is left is the difference that really comes from the sample. Scientists call the water cup a control.

About direct current. Both bridges are powered by steady 5 V. Current through salty water slowly changes the electrode surfaces (electrolysis), so readings creep. Laboratory conductivity meters avoid this with alternating current. Here the drift is part of the lesson.

Next: step 2: Watch live

Bridges wired and board flashed? No board today? Continue: the next step also offers simulated bridges.