Murray loop implementation for underground cable fault in Proteus software

I want to use digital Potentiometer MCP41010 and i want to take two node voltage to arduino so by if else condition we can compare two node voltage if condition is satisfied then this value of MCP41010 will display on 16*2 LCD display .what will be Arduino code for this …
i am facing a problem that two node voltage (PA0,PB0 of MCP41010) is always same and one one voltage on the display that is voltage at PA0 .

I guess that R1-8-7-6 simulate the good reference line, and R2-3-4-5 the line shorted between R3-4 - right?

I also guess that you missed to connect the BAT1 GND to Arduino GND. If so, your Arduino may have survived. The analog inputs require a common GND level and signals not less than GND and not higher than VCC.

I have done the changes in circuit i have made the supply and ground for all the circuit same but still i am not getting results the problem is the LCD Display printing only one value of voltage and that is not changing with the Potentiometer value changes.
i have written by code also plzzz tell me the correction plzz
the thing that i want is to dispaly the potentiometer value on lcd display when the bridge is balanced
#include <SPI.h>
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 8, 5, 4, 3, 2 );
const int CS = 10;
int Va ;
float voltage = 0;
void setup()
{
pinMode (CS, OUTPUT);
pinMode (A0,INPUT);
Serial.begin(9600);
SPI.begin(); // initialize SPI
lcd.begin (16,2);
}
void loop()
{
// move the wiper in one direction
for (int level = 0; level < 255; level++)
{
MCP41010Write(level);
delay(100);
Va = analogRead(A0);
{
Serial.print("Level = " );
Serial.print(level);
Serial.print(“Va=”);
Serial.print(Va);
lcd.setCursor(0, 0);
lcd.print("level = ");
lcd.print(level);
lcd.setCursor (4,0);
lcd.print (“Va =”);
lcd.print (’\t Va’);
delay(100);
}
}
delay(2000); // wait time
// move the wiper in other direction
for (int level = 255; level > 0; level–)
{
MCP41010Write(level);
delay(100);
Va = analogRead(A0);
Serial.print("Level = " );
Serial.print(level);
Serial.print(“Va=”);
Serial.print(Va);
lcd.setCursor(0, 0);
lcd.print("level = ");
lcd.print(level);
lcd.setCursor (9,1);
lcd.print (“Va =”);
lcd.print (’\t Va’);
delay(100);
}
}

void MCP41010Write(byte value)
{
digitalWrite(CS,LOW); // select the chip
SPI.transfer(B00010001); // command byte
SPI.transfer(value); // data byte
digitalWrite(CS,HIGH); // de-select the chip
}

Please present code included in Code Tags </>.

Have you tested the pot operation in a test project? With pot connected to Vcc and Gnd and wiper to A0.

Provide the updated circuit diagram.

You move the wiper up with values between 0 and 254, but down between 255 and 1.
Is that intentional?

Updated circuit diagram :-

I'm still missing several lines.
What's the power supply for the digital pot?
What's the reference line for the analog input?
It won't work with a perfect cable, short at R3-4 removed.

The Reset pin has strange connections.

The 9V BAT1 is not usable with the analog inputs, voltage > 5V.

I have a last hope that my issue will resolve i have tried my best from last 3 months but i am not able to do now i am stressed because of only this. i hope here all are expert help me to come out from this
i will be very much thankful to you

here i am explaining what is my objective
i want to do the simulation in Proteus software my circuit will have the component

  1. Arduino UNO
  2. Digital Potentiometer MCP41010
  3. 16*2 LCD Display
  4. fixed reistance to represent the underground cable

using all these component we will design a circuit that picture i have attached and code also that i have written my own .
i want to write a code by help of code we will control the potentiometer levels and we the galvanometer is balanced then it will show the level (0-256)or (256-0) this is only my objective plzzz help me
you can contact me at seemakumawat1508@gmail.com
i have written here with a lot of hope plzzz respond
Thank you so much

#include <SPI.h>  
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 8, 5, 4, 3, 2 );  
const int CS = 10;
int Va ;
float voltage = 0;
void setup()
{
   pinMode (CS, OUTPUT);
   pinMode (A0,INPUT);
   Serial.begin(9600);
   SPI.begin(); // initialize SPI
   lcd.begin (16,2);
}
void loop()
{
   // move the wiper in one direction
   for (int level = 0; level < 255; level++)
   {
      MCP41010Write(level);
      delay(100);
      Va = analogRead(A0);
      {
      Serial.print("Level = " );
      Serial.print(level);
      Serial.print("Va=");
      Serial.print(Va);
      lcd.setCursor(0, 0);
    lcd.print("level = ");
    lcd.print(level);
    lcd.setCursor (4,0);
    lcd.print ("Va =");
    lcd.print ('\t Va');
    delay(100);
     }
   }
   delay(2000); // wait time
   // move the wiper in other direction
   for (int level = 255; level > 0; level--)
   {
      MCP41010Write(level);
      delay(100);
       Va = analogRead(A0);
      Serial.print("Level = " );
      Serial.print(level);
       Serial.print("Va=");
      Serial.print(Va);
      lcd.setCursor(0, 0);
    lcd.print("level = ");
    lcd.print(level);
     lcd.setCursor (9,1);
    lcd.print ("Va =");
    lcd.print ('\t Va');
    delay(100);
      }
   }
   
void MCP41010Write(byte value)
{
   digitalWrite(CS,LOW); // select the chip
   SPI.transfer(B00010001); // command byte
   SPI.transfer(value); // data byte
   digitalWrite(CS,HIGH); // de-select the chip
}

The .png i have taken from a google i want to do this simulation .
Thankyou

And the question in reply #4?

NO i have not done intentionally its by mistake
i want to do increment of level 0-256 and then 256-0

Try 0-255 and 255-0 instead.

i will modify it but problem is not with the potentiometer level

Please tell me the error in this circuit i have modified the previous one .

You still don't understand that current requires 2 wires to flow. Even your power supply doesn't have a common connection with the rest of your circuit. Still U1 has no power and the circuit has no connection to Arduino Gnd.

I'd suggest that you start with simpler projects, until you learned the secrets of electric circuits.

Arduino (pin number 20 AVCC) have supply from U3 and i have taken a common ground for the hole circuit . The current have two wire to flow it will flow through resistance R2-3-4-5-6-7-8-1 and then it will flow through U1 (MCP41010) current will complete the path by entering to PB0 .
when i pause the simulation the it is showing current in resistors but voltage shown by voltmeter is not changing up to maximum level change of U1. U1 has power from u4.

I suspect that your verbose description neither matches your circuit nor your circuit diagram.

Please provide a complete circuit diagram, including really all connections.

can anyone help me what i am missing

I will pay for it can anyone help me to do it i have no time to learn all the things