Micro tank stirrer

Hi Everybody, I’m an old guy so coding is very much a mystery to me. I was hoping for help coming up with some code for my micro tank stirrer. I have 4, 2 wire conductivity sensors with a 10k ohm resistor in each sensor circuit. I’d like the code to measure the conductivity between each sensor at regular intervals and output the values to a text. Any help is greatly appreciated. I am clueless with this stuff. I have attached pictures hoping it helps.
Thanks, Scott, technical instructor at MIT.

What conductivity sensors?
Have you considered magnetic stirring?
What software problems?

Always show us your current compete sketch. Use CTRL T to format the sketch. Please use code tags. Use the </> icon in the posting menu. [code] Paste sketch here. [/code]

Show us a good schematic of your circuit.


What is connected to those loose ends ? (I'd prefer red wires fot Ucc (Vcc) and black wires for 0V (GND))

A full schematic is easier to handle..

An "analodRead(An);" will return a value 0..1023 depending of whats connected to the open end

The wires are the conductivity sensors - look they form a voltage divider with the 10k resistors on
the breadboard!!

So assuming they are connected to analog inputs 0 to 3, something like

void setup ()
  Serial.begin (115200) ;

void loop ()
  for (int pin = A0 ; pin <= A3 ; pin++)
    int val = analogRead (pin) ;
    float resistance = 10000.0  * ((1023.0 - val) / val) ;  // use 1023.0 to force floating point calcs
    // float conductivity = 1.0 / resistance ; // perhaps you want this?
    Serial.print ("channel ") ;
    Serial.print (pin) ;
    Serial.print (":  ") ;
    Serial.println (resistance) ;
  delay (5000) ;

Sorry Everyone, here is the schematic…Thanks MarkT, I will try your code!


Never connect a stepping motor to Arduino +5V power.

BTW you have +5V connected to GND :o