Announcement

Collapse
No announcement yet.

Arduino based VDI!

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

  • Daren
    replied
    I got the VDI to work. Signal is shifted and both positive and negative sides are used. The arduino program is done from scratch; GUI is based on 16x2 LCD and rotary encoder. Almost all options of the algorithm are exposed trough LCD user menu. Min signal strength, min sample count, max sample count, digital filter size, filtering method (avg, median), real time signal strength monitor, ADC calibration, battery voltage, VDI indicator style, end of signal detection params, oversampling control.
    I use LM358 single-side powered with 0 and 5V. It swings 0-4 on output. Circuit is like the one for IDX-VDI minus balancing resistors (R9, RT2 i think).
    Seems to work fine.
    Arduino Mini Pro 16MHz, 5V with LCD (dimmed with 1K) and opamp takes 12V/25mA. Arduino is powered using TGSL's 12V and it suppliers 5V for the opamp (mini has a 5v regulator). I'll swap in MCP602 when it comes from china; it should have 0-5V output swing.
    VDI range is -90 to 90; Signal strength (average sample value) and number of samples is displayed.

    Code has comments which pins on arduno/TGSL are used.

    Click image for larger version

Name:	IMG_1933 (Small).JPG
Views:	1
Size:	82.7 KB
ID:	341198Click image for larger version

Name:	IMG_1932 (Small).JPG
Views:	1
Size:	82.1 KB
ID:	341199Click image for larger version

Name:	IMG_1930 (Small).JPG
Views:	1
Size:	115.2 KB
ID:	341200

    Leave a comment:


  • golfnut
    replied
    Yes fair play..

    Leave a comment:


  • manny77
    replied
    Yes golfnut...and probably the easy solution in this cases is to have a "out of scale" indication on vdi... And lift a little the coil from soil...

    Leave a comment:


  • golfnut
    replied
    Ideally you would have gain control on these channels in order that the large signals never crush into the rails and small signals are boosted in real time with negligible phase change thru the gain ranges.

    Commercial IQ rx's do this as a matter of course. If the signals span the almost the full span of the input you maximise the dexterity or resolution of the system for measurement.


    But in this case without gain control, if both channels endstopped the input levels to both cchannels would be the same and the user may read 45 deg

    as Tan-1 of b/a is 45 if a and b are trhe same level - that in conjuntion with the massive loud boom in your lugs would say turn the wick down on the vdi amps

    Leave a comment:


  • manny77
    replied
    Golfnut wrote:

    Add the amp you had in the drawing, if it wasnt sensitive, if it had too much gain and endstopped on large targets the user could drop the gain on a dual pot until it read a valid ID?
    Very interesting! Maybe use some Arduino Out (SW controlled, analyzing signal strenght) to close 4066 switch, so you can insert a resistor in parallel to feedback ones, varying (lowering) the gain to not saturate inputs when targets are big and close to coil. Mantaining sensitivity to faint signals too.



    If you look at the amplitude of the signals that come thru, the positive sig is biggerm then the neg part, so the dc offset may not want to be in the middle.

    They often are about 1/3 below and 2/3 above - to centre the adc for max dynamic range it may pay to have the dc offset at 1/3 of the span rather than 1/2
    Yes, this has to be verified, anyway ref voltage could be regulated with a trimmer in a voltage divider...


    Daren wrote:

    Hey manny77: just started doing exactly the same: porting Don's arduino VDI to TGSL
    I'm using Arduino Mini Pro and 16x2 I2C LCD.
    I haven't had the time to look at TGSL side yet, so far only wrote example exercising Arduino Mini Pro, I2C LCD, ADC to learn timings, etc.
    Here is what I have learned so far: 16MHz Mini Pro takes 15mA. ADC conversion takes 112uS, when you change ADC prescaler you can take it down to 16us. Updating 16x2 I2C LCD takes about 150mS.
    Nice to see you are building that too!
    Interesting specifics, thanks!

    I also read that 10 bit adc of Arduino Nano has a resolution of 5V / 1024 = 4,9 mV... not so bad I suppose...

    Anyway, I learned MS Basic on my Commodore 16 many years ago, and Borland Turbo Pascal at school... remembering few things... Hope to be able to modify my Arduino SW... hehe!

    Leave a comment:


  • Daren
    replied
    Hey manny77: just started doing exactly the same: porting Don's arduino VDI to TGSL
    I'm using Arduino Mini Pro and 16x2 I2C LCD.
    I haven't had the time to look at TGSL side yet, so far only wrote example exercising Arduino Mini Pro, I2C LCD, ADC to learn timings, etc.
    Here is what I have learned so far: 16MHz Mini Pro takes 15mA. ADC conversion takes 112uS, when you change ADC prescaler you can take it down to 16us. Updating 16x2 I2C LCD takes about 150mS.

    Leave a comment:


  • golfnut
    replied
    Then using preamp, Don sw should be slightly changed? Or is supposed to work anyway?


    Dont know if honest. Ask Don what his did..



    Im approaching my limit of knwledge here, but here goes.



    It is may view that neither the x,y channels should compress, otherwise as you rightly say large targets phase reading will skew and incorrectly ident.

    There shoud be no diode feedback to clip or limit signals, or vdi skew will result. i.e. linear


    There is a lot you could do up front and attach vdi after first amps, this will not register small targets but will give you an idea if your on the right track.

    Add the amp you had in the drawing, if it wasnt sensitive, if it had too much gain and endstopped on large targets the user could drop the gain on a dual pot until it read a valid ID?


    If you look at the amplitude of the signals that come thru, the positive sig is biggerm then the neg part, so the dc offset may not want to be in the middle.

    They often are about 1/3 below and 2/3 above - to centre the adc for max dynamic range it may pay to have the dc offset at 1/3 of the span rather than 1/2

    Leave a comment:


  • manny77
    replied
    Thanks golfnut.

    Then using preamp, Don sw should be slightly changed? Or is supposed to work anyway?

    For very strong signal probably preamp will go in saturation. Should this thing cause wrong vdi numbers? Maybe a non linear response is recommended, like using a dinamic compressor?

    Leave a comment:


  • golfnut
    replied
    That way will give you the option to either

    read the down and the up and lump together to give a greater range or span on the input

    OR

    it will give you an opportunity to cal - as the dc level from the opamp never keeps still from hour to hour, on boot, post settle you can read the DC level on the day and use that as your calibrated zero. This way your dynamic range is not eaten into with dc offsets and you can distinguish smallest targets.


    You could use the positve going signals only too for simplicity, take 50 rolling average of signals above a certain value on x,y

    or fill array for x,y , grab the 30 or so largest values for x and y from the array and do the Tan-1 of x/y for the angle

    just ideas I never got this far myself

    Leave a comment:


  • onuba
    replied
    because iron 71
    81 foil
    very high. frequency will be different?
    }
    if ( VDI > 71) {
    lcd.print ("HIERRO");
    goto DonePrinting;

    if ( VDI > 81 ) {
    lcd.print ("FOIL");
    goto DonePrinting;

    different from yours dfbowers

    Leave a comment:


  • manny77
    replied
    So, if I add this preamp (taken from PIC16F VDI for IDX), the signal will be more readable from Arduino...

    Click image for larger version

Name:	VDI_PREAMP.png
Views:	1
Size:	35.5 KB
ID:	341119

    Like you said in previous post:

    Click image for larger version

Name:	Operational_work.png
Views:	1
Size:	14.5 KB
ID:	341120

    But...the software Don wrote should work without modifications?

    Leave a comment:


  • golfnut
    replied
    I could not agree more. The down up down is all good signal energy add it all up and you have better s/n.

    I may be wrong but I dont think Don had this summing technique, for pos and neg going portion, maybe just the larger pos going block of signal.

    Basic experimentation I did with a Ti laucnpad I did positive values too.


    The signals at baseband resenble a sinc function


    Machines like adx250 have the bb signals at 1/2 rail

    Leave a comment:


  • manny77
    replied
    Vdi need to use entire wave from neg to pos to work with maximum accuracy and s/n ratio, right? Omitting neg part e.g. like when not using operational before Vdi will lose a part of the signal and precision then?

    Leave a comment:


  • golfnut
    replied
    they do as there is a pos and neg rail on the opamps.

    The pos half of the signal tips the tone.

    Take some info ffrom the right half of this old slide,,



    Click image for larger version

Name:	Untitled.jpg
Views:	2
Size:	61.3 KB
ID:	341116

    S

    Leave a comment:


  • manny77
    replied
    Originally posted by onuba View Post
    v3. idx my x. e. and. also. V4 pin 5 and 3 perfect
    The signal are similar in idx and tgsl? Have you measured with a scope? They go negative?

    Leave a comment:

Working...
X