Announcement

Collapse
No announcement yet.

IDX-PRO+VDI

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Orbit
    replied
    Thank you !

    Leave a comment:


  • dfbowers
    replied
    Originally posted by Koala View Post
    First video is a Arduino project link
    Post #38 might have what you were looking for:
    http://www.geotech1.com/forums/showt...sed-VDI!/page2 It has a lot of explainations on what the code actually does.
    I have done a lot of experimenting since then with the Arduino's but not much practical application. Toward the end of the thread I posted the latest code I have been experimenting with. It's really accurate for such a simple program, plus a nice simulated "Spectra graph" that actually works!


    It's not the hex code but if you have an Arduino UNO or Micro you can just copy and paste, verify and download and away you go. The only thing additional you may need is the Liquid Crystal library in the same directory as your sketch. Additionally, It's nice to uncomment the Serial.print commands, start your serial monitor on the upper right corner of the Arduino app and see what it's actually gathering for samples.

    #include <LiquidCrystal.h>
    // Connections for IDX.
    //LCD PIN Connect to
    //======= ===========
    // 1 (VSS) GND Arduino pin*
    // 2 (VDD) +5V Arduino pin
    // 3 (contrast) Resistor or pot to Arduino GND
    // 4 RS Arduino pin 12
    // 5 R/W Arduino pin 11
    // 6 Enable Arduino pin 10
    // (Data 4) Arduino pin 5
    // (Data 5) Arduino pin 4
    // (Data 6) Arduino pin 3
    // (Data 7) Arduino pin 2
    // Backlight + Resistor to Arduino pin 13**
    // ** Use current limiting resistor < 40 OHMS
    // No preamps to Arduino necessary! Make direct connections as follows.
    // IDX U3 Pin 1 to Arduino A0
    // IDX U3 Pin 14 to Arduino A1
    // Caveat - - - Phase offset follows DISC setting. "0" phase setting = audio rejected targets.
    // Cut diode D1 or D2 clipping diode for improved accuracy
    // assign liquid crystal pins
    LiquidCrystal lcd(12, 11, 10, 5, 4, 3, 2);
    int backLight = 13; // pin 13 will control the backlight
    //Create custom bar characters
    byte bar0[8]={

    0b00000,
    0b00000,
    0b00000,
    0b00000,
    0b00000,
    0b00000,
    0b00000
    };
    byte bar1[8]={

    0b00000,
    0b00000,
    0b00000,
    0b00000,
    0b00000,
    0b00000,
    0b11111
    };
    byte bar2[8]={

    0b00000,
    0b00000,
    0b00000,
    0b00000,
    0b00000,
    0b11111,
    0b11111
    };
    byte bar3[8]={

    0b00000,
    0b00000,
    0b00000,
    0b00000,
    0b11111,
    0b11111,
    0b11111
    };
    byte bar4[8]={

    0b00000,
    0b00000,
    0b00000,
    0b11111,
    0b11111,
    0b11111,
    0b11111
    };
    byte bar5[8]={

    0b00000,
    0b00000,
    0b11111,
    0b11111,
    0b11111,
    0b11111,
    0b11111
    };
    byte bar6[8]={

    0b00000,
    0b11111,
    0b11111,
    0b11111,
    0b11111,
    0b11111,
    0b11111
    };
    byte bar7[8]={

    0b11111,
    0b11111,
    0b11111,
    0b11111,
    0b11111,
    0b11111,
    0b11111
    };

    // Sensors
    int sensorPinx = A0; // Intialize analog pin A0 and name it "sensorPinx" for the all metal channel
    int sensorPinr = A1; // Intialize analog pin A1 and name it "sensorPinr" for the all disc channel
    //Variables
    float sensorValuex = 0; // assign a floating point value of "0" to a variable called "sensorValuex"
    float sensorValuer = 0; // assign a floating point value of "0" to a variable called "sensorValuer"
    float slope; // assign a floating point value of "0" to a variable called "slope"
    int n = 0; // assign an integer value of "0" to a variable called "n"
    int cursorClmn = 0; // assign an integer value of "0" to a variable called "cursorClmn"
    int numSamples = 0; // assign an integer value of "0" to a variable called "numsamples"
    float slopeTotals; // assign an integer value of "0" to a variabel called "slopeTotals"
    float slopeAve = 0; // assign an integer value of "0" to a variable called "slopeAve"
    int VDI = 0; // assign an integer value of "0" to a variable called "VDI"
    float rad = 0;
    float phase = 0;
    // bar positions 0 through 7 (8 columns)
    int b0 = 0;
    int b1 = 0;
    int b2 = 0;
    int b3 = 0;
    int b4 = 0;
    int b5 = 0;
    int b6 = 0;
    int b7 = 0;
    //int b8 = 0;
    //int b9 = 0;
    //int b10 = 0;
    //int b11 = 0;
    //int b12 = 0;
    //int b13 = 0;
    //int b14 = 0;
    //int b15 = 0;
    // program setup follows
    void setup()
    {
    pinMode(backLight, OUTPUT);
    digitalWrite(backLight, HIGH); // turn backlight on. Replace 'HIGH' with 'LOW' to turn it off.
    lcd.begin(16,2); // columns, rows. use 16,2 for a 16x2 LCD, etc.
    lcd.clear(); // start with a blank screen
    lcd.setCursor(0,0); // set cursor to column 0, row 0 (the first row)
    lcd.print( "ArcTan Calc"); // print whatever you want
    lcd.setCursor(0,1); // set cursor to column 0, row 1
    lcd.print("032415"); // print whatever you want
    delay (2000); // display the above for 2 seconds
    lcd.clear(); // Clear the LCD
    // Serial.begin(9600);

    //Create customer characters

    lcd.createChar(0,bar0);
    lcd.createChar(1,bar1);
    lcd.createChar(2,bar2);
    lcd.createChar(3,bar3);
    lcd.createChar(4,bar4);
    lcd.createChar(5,bar5);
    lcd.createChar(6,bar6);
    lcd.createChar(7,bar7);
    }
    // The main loop follows
    void loop()
    {
    first: //This is a label called "first" so a goto statement can find the beginning of the loop when called
    sensorValuex = analogRead (sensorPinx); //Read the analog pin A0 and store it's value as sensorValuex (it will be between 0 and 1023)
    sensorValuer = analogRead (sensorPinr); //Read the analog pin A1 and store it's value as sensorValuer (it will be between 0 and 1023)
    //Change SensorValues below to adjust VDI sensitivity
    if (sensorValuex > 2) { //If this sensorvalue becomes > 5 it executes the next line. If not, it drops to the "else" statement and goes to the beginning again ("first")
    if (sensorValuer > 2) { //If this sensorvalue becomes > 5 it executes the next line. If not, it drops to the "else" statement and goes to the beginning again ("first")
    for (int n = 0 ; n < 25 ; n ++) //Starts a counter to read the sensors again in a loop 85 times

    {
    sensorValuex = analogRead(sensorPinx); //Read the analog pin A0 and store it's value as sensorValuex (it will be between 0 and 1023)
    sensorValuer = analogRead (sensorPinr); //Read the analog pin A1 and store it's value as sensorValuer (it will be between 0 and 1023)
    slope=sensorValuex / sensorValuer; // calculate R/X ratio and call it "slope"
    // Serial.print (" x=");
    // Serial.print (sensorValuex);
    // Serial.print (" r=");
    //Serial.print (sensorValuer);

    rad = atan (slope); //calculate the phase angle
    phase = ((rad) * (57.295)); // converts radians to Degrees
    // Serial.print (" phase=");
    // Serial.print (phase);
    // assign a phase to a column position
    if (phase > 35) {
    b7 = b7 + 1;

    goto endincbars;
    }
    if (phase > 30) {
    b6 = b6 + 1;

    goto endincbars;
    }
    if (phase > 25) {
    b5 = b5 + 1;

    goto endincbars;
    }
    if (phase > 20) {
    b4 = b4 + 1;

    goto endincbars;
    }
    if (phase > 15) {
    b3 = b3 + 1;

    goto endincbars;
    }
    if (phase > 10) {
    b2 = b2 + 1;

    goto endincbars;
    }
    if (phase > 5) {
    b1 = b1 + 1;

    goto endincbars;
    }
    if (phase > 0.1) {
    b0 = b0 + 1;


    }
    endincbars:
    //Serial.println(phase);


    slopeTotals = slopeTotals + slope;
    }


    }
    }
    else {
    goto first; // runs a loop until the sensors become low again, then goes to the label called "first"
    }
    slopeAve = slopeTotals/25; // take all the slope values and average them.
    // Serial.println("xxxxxxxxxxxxxxxxx");
    // alternately, you can calculate the true phase angle by uncommenting the next two lines:
    rad = atan (slopeAve); //calculate the phase angle
    phase = ((rad) * (57.295)); // converts radians to Degrees


    // Serial.println(phase);
    //Serial.println("xxxxxxxxxxxxxxxxx");
    // you can manipulate the range of how your VDI numbers are calulated by changing the line below
    //cursorClmn = (phase/3); // slopeAve will typically be between .1 and 9. It just converts it to an integer number between 1 and 10.. used to position the "*" character
    // tone (8,(cursorClmn * 200), 100); // produces a tone of 200 Hz X the mumber above for 100 mS on pin #8
    lcd.clear(); //clear LCD
    //if (VDI > 98 ) {
    // lcd.clear();
    // goto finish;
    //}
    lcd.setCursor(0,0); //Set cursor on line 0, column 0
    lcd.print("Phase = "); // print "phase ="
    // alternately, you can uncomment the next line to display true phase
    lcd.print (phase); // prints phase angle instead of full scale readings

    lcd.setCursor(0,1); // Positions the cursor on a particular column on row 1
    // resize all bars over 7 to 7
    if (b0 > 7) {
    b0 = 7;

    }
    lcd.write(b0);
    if (b1 > 7) {
    b1 = 7;

    }
    lcd.write(b1);
    if (b2 > 7) {
    b2 = 7;

    }
    lcd.write(b2);
    if (b3 > 7) {
    b3 = 7;

    }
    lcd.write(b3);
    if (b4 > 7) {
    b4 = 7;
    lcd.write(b4);
    }
    if (b5 > 7) {
    b5 = 7;
    lcd.write(b5);
    }
    lcd.write(b5);
    if (b6 > 7) {
    b6 = 7;

    }
    lcd.write(b6);
    if (b7 > 7) {
    b7 = 7;

    }
    lcd.write(b7);


    // prints the "*" character in that partular column
    //finish:
    delay (100); // display the VDI numbers for 100 mS before going to the beginning of the code again
    numSamples = 0; // reset all numbers back to "0"
    slopeTotals = 0;
    slopeAve = 0;
    slope = 0;
    n = 0;
    b0 = 0;
    b1 = 0;
    b2 = 0;
    b3 = 0;
    b4 = 0;
    b5 = 0;
    b6 = 0;
    b7 = 0;
    //b8 = 0;
    //b9 = 0;
    //b10 = 0;
    //b11 = 0;
    //b12 = 0;
    //b13 = 0;
    //b14 = 0;
    }

    Leave a comment:


  • Koala
    replied
    Originally posted by Orbit View Post
    First video is a Arduino project link

    Leave a comment:


  • Orbit
    replied


    this is not the same hex codes ! which can be downloaded hex of the first video ?

    Leave a comment:


  • Orbit
    replied
    Thank you Koala !

    Leave a comment:


  • Koala
    replied
    post 3042 = 16f88
    post 3069 = 16f690

    not seen 16f819

    Leave a comment:


  • Orbit
    replied
    That pic whether pic 16f88 or 16f819 ?

    Leave a comment:


  • Koala
    replied
    No. Nothing new after small update in post #3042 but not for depth

    Leave a comment:


  • Orbit
    replied
    Mean anything new ?!

    Leave a comment:


  • Koala
    replied
    Originally posted by Orbit View Post
    I did not follow this topic in detail but how many remember vdi lcd
    feel target long after than is feels sound ? Target sound feels to 30cm vdi lcd only at the 24cm whether the Is that true ?
    Yes this is normal. Other people have reported the same.

    Leave a comment:


  • Orbit
    replied
    I did not follow this topic in detail but how many remember vdi lcd
    feel target long after than is feels sound ? Target sound feels to 30cm vdi lcd only at the 24cm whether the Is that true ?

    Leave a comment:


  • calebsone
    replied
    Sorry it took so long to respond thanks for the info guys KT my computer is done I am using a tablet so I can't view the DVD at the moment I'll try getting to my moms to check it.

    Leave a comment:


  • Koala
    replied
    Originally posted by calebsone View Post
    i was wondering if any of you may know what is the type of coil connector used by whites so if i buy a coil i dont have to add my own connector. Also whats the wiring set up on an factory coil.
    Switchcraft slimeline

    Leave a comment:


  • kt315
    replied
    Caleb, I answered on same request 100s times... open folder on DVD, the way -- \White's\White's VLF\9,5 XLT coil\connector of whites
    and you ll see full info.
    whites cable on old rainbow coils is Belden 8723
    on un-rainbow, on black new one, seems more fat I do not know a type...

    Leave a comment:


  • calebsone
    replied
    i was wondering if any of you may know what is the type of coil connector used by whites so if i buy a coil i dont have to add my own connector. Also whats the wiring set up on an factory coil.

    Leave a comment:

Working...
X