Ok, finally some photos.
Note the circle on the X-Y graph from the AC Mains.
Announcement
Collapse
No announcement yet.
VDI-RODERICO
Collapse
X
-
I think you also need to fix the ADC offset, maybe just replacing R7 and R8 with another resistor + 2-2.5V zener diode, mine doesn't disappear by using only the internal Vref.
Leave a comment:
-
I run the PIC's internal oscillator and already freed those two pins.
Your source code is excellent and easily changed.
The 5 counts of flicker could be due to external 'noise'. I will make the changes to use internal Vref. If the count flicker does not reduce then I will attribute it to external source.
This would also need to be checked out in the field where I am away from AC Mains and other electrical noise. My shop can get very noisy due to the furnace and heater circulating pumps, etc running. When those are running the X-Y Graph shows a circle which is magnetic motor field from AC Mains.
Leave a comment:
-
I guess you have up to 5 counts because your resolution is 3mV and then you would have up to 15mV due to the ADC offset. RA2 and RA3 pins can be used as external Vref- and Vref+ for the ADC, however it needs also some external circuit to provide these fixed voltages + the ADC offset to the op-amp, the external oscillator can be removed to have two additional digital inputs, but I think this is only if first it is proved that the improvement is significant because these changes are not backwards compatible...
Leave a comment:
-
Sounds like some good ideas. If memory is good the ADC offset values in the menu flicker by 3-5 counts. With your ideas this should be reduced.
Since using Vdd for ADC Vref seems to work I never looked at the data sheet for use of the internal Vref. It does make the analog circuit a little more complex.
It is too bad that the PIC's internal Vref can not also be brought out to a pin. Then it could have been used as the op-amp reference.
A possibility is to enable the PIC's DAC running from the internal reference and setting to half scale then output to the op-amps. Now the ADC and Op-amps have the same Vref.
Lots to experiment with.
I ran at 3.3V due to the display being 3.3v. Then the PIC does not need level converters and the op-amps at 3.3V can not Over Voltage the PIC's ADC inputs.
Leave a comment:
-
it would be good to check directly the effect of a noisy power supply, it might be of a few degrees depending on the noise. You can see how the ADC offset changes in the main menu, mine oscillates 1 or 2 values, i.e. 2*5V/2^10 = 10mV you need to add another 5mV for the Vdd change, i.e. 15mV and then scale by Vref, 5*15mV = 0.075V e.g. if X=2V and Y=1V then atan(1/2)=26.6, atan(1.075/2)=28.3, atan(1.075/1.925)=29.2, ...
I recompiled the firmware removing the Vref scaling for the vdi and changed Vref+ for the ADC to the internal voltage reference of 4V that is independent of the power supply (the changes for the SD1305 are in the previous post). The other voltage reference is the ADC offset which is Voltage range/2 connected to + of the MCP602. This voltage needs also to be stable, e.g. with a lower noise regulator than the 78l05 or maybe just connecting the 78l05 to the voltage regulator of the main board (+8V for IDX) instead of the battery. With this firmware you will see a displacement of the origin in the vdi graphs since the ADC offset is not 512 = 2^10/2, to cure this you only need to change the voltage divider R7, R8 to 4V/2 = 2V, e.g. R7=150K and R8=100K for Vdd = 5V, and adjust the adc offset and levels in the menu, if the improvement is not significant then it is fine as it is.Attached Files
Leave a comment:
-
Even the ADC offset is still ~511 due to op-amps are run at 3.3V and non-inverting (op-amp ref) is half. No signal from TGSL = 3.3V/2 and since ADC ref = 3.3V values are the same.
I used a different resistor divider ratio for the battery. A 38.2k/10k for a 4.82:1 and adjusted the Battery in the menu.
I did not see the #define VREF in the code so I need to change it. Thanks.
Leave a comment:
-
the code needs to be changed as Vref+ = 3.3V for the ADC, vdi values are not affected because Vref+ cancels out in the ratio, the adc offset and the battery can be adjusted in the menu, the only one that would be affected is the strength, you would have more accurate values replacing the #define VREF to 3 (no decimals). For a fixed internal Vref one only needs to change that define, ADCON1 = 0x08; and VREFCON0 to e.g. 2V, the voltage divider in the pcb should be changed to 1V instead of 3.3V/2 to center the ADC offset in the graphs.Originally posted by waltr View PostRunning everything from 3.3V works perfectly with no changes to the code.
Leave a comment:
-
I guess you have then 3K between the op-amp outputs when removing the pot, 3K+5K pot could be replaced by just one pot e.g. 10K or greater until the vdi values change and if it is between the op-amp inputs then you would have the same saturation levels for both channels, in any case it would be better when you have the pictures...
Leave a comment:
-
The gain seems fine and I can get a reasonably VDI on fairly weak signals. Strong signal may over load but easy enough to lift the coil a little to reduce signal level.
I've used PICs for many years and with the 10-bit ADC running the ADC reference from Vdd works quit well. The 3.3V regulator powers the PIC the op-amps and the display. Maybe a separate reg for the ADC reference would give more consistent VDIs. Something to try.
With the pot between the op-amp outputs the bottom channel, one off the pot wiper, was never large enough for good VDI. This was seen in the Scope graph. That is why I tried removing the pot connection and then the scope graph showed equal amplitude signals in All Metal Mode and good VDI numbers in Disc mode.
Ok, off to get the camera batteries charged.
Leave a comment:
-
good to know that works well, the pictures would help to have a better idea...
Originally posted by waltr View PostRunning everything from 3.3V works perfectly with no changes to the code.
For a 10-bit ADC you have 3.3V/2^10 = 3mV of resolution vs 5V/2^10 = 5mV, however you can only have signals of 3.3V peak-to-peak after the MCP602, so you might need to adjust the gain or it would saturate very quickly. Signals of 5mV could be considered as noise (3mV in your case).
Originally posted by waltr View PostAdjust the pot that is across the op-amps was not helping and was having a hard time understanding what the pot does.
it is for calibrating the VDI values, if vdi values do not change when adjusting the pot then you need to change the pot, in your case it seems you don't need any.
Originally posted by waltr View PostThese large iron object did give varying VDI from 45 to -80 so just the VDI number was not enough to say to dig or not.
This is something expected, since iron quickly saturates the mcp602, if one channel saturates then the vdi cannot be reliable because it is extracted from the amplitude ratios of both channels and one is always constant (e.g. Vdd), you can see it in the scope view or XY view (graph edges).
The more stable the pic power supply is the better the ADC readings, since it uses Vdd and Vdd/2 as references. If Vdd or Vdd/2 fluctuates then ADC values fluctuates and so does the vdi. Using two linear regulators as in the IDX, i.e. +8V to the 78l05 instead of the battery should be more stable, it would be better to change it back or to improve the pic power supply e.g. using a zener diode for Vdd/2 or using external Vref+ and Vref-. PIC18F25K22 can also use an internal voltage reference of 1, 2 or 4V for the ADC.
Leave a comment:
-
Finally got the graphic display and op-amp circuits built and installed in my TGSL. Got out Sunday for field testing.
First restate design:
Display is a 126x64 OLED from Adafruit with SD1305 controller (code posted above).
Use the PIC18F25K22 but change pin defines for my universal display bd.
The op-amp circuit is on a separate board and mounted inside the TGSL enclosure. Four wires, gnd, +12, X & Y from TGSL EDU board.
12V passes through to PIC/display then linear 3.3V reg to run PIC, display and sent back the op-amps. This is a DIN connector on the TGSL enclosure using 6 pins, gnd, 12V, 3.3V, Bat divider, X op-amp, Y op-amp. The display is in a small box with a cable out to the mating DIN.
The display is 3.3V so easiest to simply run all from 3.3V.
Running everything from 3.3V works perfectly with no changes to the code.
When bench testing had a hard time trying to get consistent VDI values. Adjust the pot that is across the op-amps was not helping and was having a hard time understanding what the pot does. Then disconnected the pot so each op-amp (X & Y) went to the PIC's ADCs. VDIs then are very consistent and matched what is expected from the test targets.
Site I hunted is an old abandoned farm home with lots of iron.
The OLED display was easy to see and read. Only issue was glare from the tape I put over the display but moving the display to a slight angle fixed this.
The VDI become very useful. Due to the amount of iron junk the TGSL will give nice beep that seems to be a good target from the end of a large iron object. The X-Y Display however showed the TGSL Over loading, instead of a line within the graph the line would max at the graph edges. The TGSL audio sounded good but the graph showed a bad target.
I did check this with a few large iron object that I previously dug. These large iron object did give varying VDI from 45 to -80 so just the VDI number was not enough to say to dig or not.
Good target gave a VDI in the expected value range. 38-45 where all shotgun shell heads, cartridges or other brass items, one being a Victorian ladies pin (late 1800's).
VDIs of 80-87 were Indian head once cent coins of which I found three dating 1885 & 1887. Did not get and lower VDIs that could be nickles or rings.
I really like having this graphic display and feel it is very helpful for target ID.
I plan to post pictures of the boards etc but the charger for my camera died and the batteries are flat. Once I get the batteries charged I'll take and post pictures.
Leave a comment:
-
-
because 128x64 firmware does not fit in pic16f886 program memory (only 14KB vs 32KB of pic18f25K22) but it does work with a 16x2 LCD display, you also need to make sure that your display generates a VEE otherwise you would need to provide a negative voltage check your display datasheet just in case... a blue display would also be difficult to read without backlight (white or green works better IMO)
Leave a comment:
-
Leave a comment: