Announcement

Collapse
No announcement yet.

Arduino Nano PI Main Discussion

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

  • gallico58
    replied
    Thanks Teleno and Qiaozhi, I will try to change the code, I am quite good with the soldering iron but I am denied in software programming.
    sorry also my bad english, i use the translator!

    Leave a comment:


  • Qiaozhi
    replied
    The worst jitter is caused by leaving Timer0 interrupts running in the background. These are masked in the setup routine, but does have the side-effect of disabling the software delay functions.

    Teleno is most likely correct that the Delay pot is the cause, although I'm a bit surprised that any audio jitter would be that noticeable for a change as small as 62.5ns.

    Leave a comment:


  • Teleno
    replied
    Originally posted by gallico58 View Post
    Arduino Nano Pi works, only a small problem I ask you
    The main clock frequency that we find at PIN D8 has small phase movements detected with oscilloscope that translate into rhythmic disorders by adjusting the threshold and the main sampling
    Power is stable and regular tensions, the problem seems to be the internal management of Arduino system clocks or software.
    The same problem detected on an Arduino one programmed alone without external components.
    I think the problem is in these lines:

    Code:
    [I]    delayVal = analogRead(delayPin);                   // Read the delay pot[/I]
    [I]    mainDelay = defMainDelay + delayVal * clockCycle;  // Offset main sample delay[/I]
    The sample delay pot is 10K, the ADC resolution is 10 bits (1024 steps).
    This means a change in 9,7 Ohms (0.1%) will alter the timing by 1 clock cycle. Such a small resistance change can be caused by the pot itself without touching it and/or the ADC conversion noise itself, since it only needs one bit of error to cause pulse jitter. That's where the observed phase noise in the pulse comes from.

    To avoid this, a change in delayVal larger than 1 bit should be required to alter the offset.

    In the whole range of the ADC, delayVal * clockCycle gives a maximum offset of 63,4 us. If such a long offset is not needed, the pot/ADC noise can be reduced or eliminated by reducing the resolution. For example:

    Code:
        [I]mainDelay = defMainDelay + (delayVal >> 1) * clockCycle;  // Offset main sample delay[/I]
    Now it takes 2 bits to move the offset. Halving the resolution doubles the minimum resistance change to 19.4 Ohms (0.2%). Still too low anyway but check it out, it the pulse should be more stable. The maximum achievable offset is halved to 32 us.

    It can be reduced further to about 40 Ohms (0.4%) if you don't need an offset larger than 16us:

    Code:
        [I]mainDelay = defMainDelay + (delayVal >> 2) * clockCycle; // Offset main sample delay[/I]
    Now it takes 4 bits to move the offset.


    Alternatively the delayVal can be averaged or low pass filtered using a IIR filter, but that complicates the code a bit.

    This can be of interest: Reading very small adjustments from a potentiometer accurately?


    Another option is to add hysteresis:

    Code:
    [I]    word potRead = 0;
       ...
       ...
       potRead = analogRead(delayPin);                   // Read the delay pot
    [/I]   [I]if ([/I][I]potRead [/I][I]> (delayVal + 16)) delayVal = [/I][I]potRead [/I][I]- 16;
       else if [/I][I]([/I][I]potRead [/I][I]< (delayVal  - 16)) delayVal = [/I][I]potRead [/I][I]+ 16;[/I]
    [I]   mainDelay = defMainDelay + delayVal * clockCycle;  // Offset main sample delay[/I]
    this will require 4 bits in order to move the offset one clock cycle up or down while maitaining the maximum offset at 63,4 us.

    Leave a comment:


  • gallico58
    replied
    Originally posted by Qiaozhi View Post
    Glad to hear that you achieved a good result.


    I'm not sure if that would make any difference, as noise will only be a problem if they are being used. But you could try setting the unused analog pins as digital outputs, and then drive them with a permanent LOW.

    For example:
    pinMode(A1, OUTPUT);
    digitalWrite(A1, LOW);

    Alternatively, you could simply pull the analog inputs HIGH using the internal pull-up resistor.

    For example:
    pinMode(A1, INPUT_PULLUP);
    Arduino Nano Pi works, only a small problem I ask you
    The main clock frequency that we find at PIN D8 has small phase movements detected with oscilloscope that translate into rhythmic disorders by adjusting the threshold and the main sampling
    Power is stable and regular tensions, the problem seems to be the internal management of Arduino system clocks or software.
    The same problem detected on an Arduino one programmed alone without external components.

    Leave a comment:


  • MartinB
    replied
    Originally posted by Qiaozhi View Post
    Thanks for the good feedback.

    It's actually Don Bowers who makes the coil shells in America, not dbanner. His website is here: https://sites.google.com/site/dbcoilshells/

    As Martin says, Joan Allen can supply shafts from several manufacturers: https://joanallen.co.uk/accessories/shafts.html
    There's also Spin-a-disc: https://spinadiscmetaldetectors.com/...afts-and-stems
    and Pepsi Piros Metal Detectors: https://www.metaldetectors-pepsi.co....ssories/Shafts

    It may even be less expensive to buy a cheap Chinese detector from ebay and use that as a source of parts.

    You might want to try this site for coil shells: https://sites.google.com/site/mmcoilshells/home
    I've never used them, so it would interesting to know if you have any luck.
    Hi George
    Thanks for correcting me
    Sorry for the error Mr Bowers.

    Leave a comment:


  • Qiaozhi
    replied
    Originally posted by Olly View Post
    After following the book to the letter I'm happy to report that my Nano PI is working very well indeed.
    Many thanks Qiaozhi for your excellent design and well written, easy to follow instructions and guidelines.
    Also many thanks to Silverdog for providing the high quality PCB's with such a short turn-around time; I'm most grateful.

    Now that everything is working correctly I'd like to make it look a little bit more professional and was wondering where folks in the UK source such things as detector stems and coil housings at a reasonable price?
    Thanks for the good feedback.

    It's actually Don Bowers who makes the coil shells in America, not dbanner. His website is here: https://sites.google.com/site/dbcoilshells/

    As Martin says, Joan Allen can supply shafts from several manufacturers: https://joanallen.co.uk/accessories/shafts.html
    There's also Spin-a-disc: https://spinadiscmetaldetectors.com/...afts-and-stems
    and Pepsi Piros Metal Detectors: https://www.metaldetectors-pepsi.co....ssories/Shafts

    It may even be less expensive to buy a cheap Chinese detector from ebay and use that as a source of parts.

    You might want to try this site for coil shells: https://sites.google.com/site/mmcoilshells/home
    I've never used them, so it would interesting to know if you have any luck.

    Leave a comment:


  • Olly
    replied
    Thanks Martin,
    Loads of good info to get going with.
    Much appreciated

    Leave a comment:


  • MartinB
    replied
    Originally posted by Olly View Post
    After following the book to the letter I'm happy to report that my Nano PI is working very well indeed.
    Many thanks Qiaozhi for your excellent design and well written, easy to follow instructions and guidelines.
    Also many thanks to Silverdog for providing the high quality PCB's with such a short turn-around time; I'm most grateful.

    Now that everything is working correctly I'd like to make it look a little bit more professional and was wondering where folks in the UK source such things as detector stems and coil housings at a reasonable price?
    Hi Olly
    Good to hear that you are up and running.

    It all depends on how much you want to spend, how much spare time you have, and what facilities you have.

    Shafts: Any of the major suppliers should be able to sell you one. Try Regton or Joan Allen. There is also a system by MARS which can be found on Ebay. I am making my own from 3D printed parts and carbon fibre tube obtained on Ebay.

    Coil Housings: First of all try dbanner who regularly posts on the forums. Lives in America andproduces excellent housings. I did find a guy in Russia selling on Ebay but I don't know what the current situation is. Delivery times are really long. You could of course make your own, but you will need a vacuum forming machine and a little patience. There is lots of information about this on the internet and no doubt within the forum. I tried the oven method of heating the ABS sheet and failed miserably so I built a simple vacuum forming machine. ABS sheet is available on Ebay 2 mm Black Carbon Fibre Effect ABS Sheet, larger sizes 400mm-500mm-600mm-widths | eBay.

    Cost of buying ready made is slightly more than DIY but not half as much fun.

    Happy to share with you.

    Leave a comment:


  • Olly
    replied
    After following the book to the letter I'm happy to report that my Nano PI is working very well indeed.
    Many thanks Qiaozhi for your excellent design and well written, easy to follow instructions and guidelines.
    Also many thanks to Silverdog for providing the high quality PCB's with such a short turn-around time; I'm most grateful.

    Now that everything is working correctly I'd like to make it look a little bit more professional and was wondering where folks in the UK source such things as detector stems and coil housings at a reasonable price?

    Leave a comment:


  • MartinB
    replied
    Originally posted by dingbatca View Post
    MartinB. My coil wrapping jig is just a simple pattern cut out with my CNC. I designed and 3D printed the pegs as part of the jig. My 6yr old daughter picked the peg color. Some fun pic's attached.
    [ATTACH]55058[/ATTACH]
    [ATTACH]55059[/ATTACH]
    [ATTACH]55060[/ATTACH]
    I am a little envious of your workshop.
    Tell your daughter that she has good taste. Pink and purple pegs look great and such a simple idea too.

    Leave a comment:


  • Qiaozhi
    replied
    Originally posted by gallico58 View Post
    Thanks George, in fact I have modified the software but nothing changes, approaching the minimum without saturating U3 the repetitive interference capture threshold seems dependent on the nano.
    still nice project to try.
    I am attaching two images, channel A pin6 U3 (inverted) Channel B pin13U4.4. minimum and maximum main sample adjustment
    [ATTACH]55065[/ATTACH] [ATTACH]55066[/ATTACH]
    I should imagine that any interference is external. The Nano is not being used to detect the threshold, as this is part of the analog circuit.

    Leave a comment:


  • gallico58
    replied
    Thanks George, in fact I have modified the software but nothing changes, approaching the minimum without saturating U3 the repetitive interference capture threshold seems dependent on the nano.
    still nice project to try.
    I am attaching two images, channel A pin6 U3 (inverted) Channel B pin13U4.4. minimum and maximum main sample adjustment
    Click image for larger version

Name:	pigallimin.jpg
Views:	1
Size:	48.1 KB
ID:	361285 Click image for larger version

Name:	pigallimax.jpg
Views:	1
Size:	48.0 KB
ID:	361286

    Leave a comment:


  • Qiaozhi
    replied
    Originally posted by gallico58 View Post
    Hello
    I made arduino nano PI as per book and it works very well, I use a 250uh coil and it has good depth.
    Glad to hear that you achieved a good result.

    Originally posted by gallico58 View Post
    I wanted to improve it and know if it was possible to disable the unused analog inputs via software in order to further reduce the disturbances that sometimes occur.
    the entrances left free often pick up disturbances.
    great project George thank you
    I'm not sure if that would make any difference, as noise will only be a problem if they are being used. But you could try setting the unused analog pins as digital outputs, and then drive them with a permanent LOW.

    For example:
    pinMode(A1, OUTPUT);
    digitalWrite(A1, LOW);

    Alternatively, you could simply pull the analog inputs HIGH using the internal pull-up resistor.

    For example:
    pinMode(A1, INPUT_PULLUP);

    Leave a comment:


  • mschmahl
    replied
    Originally posted by dingbatca View Post
    I am happy to report I got my Nano PI running!

    Now I am off trying to build a higher performance coil. I have the fast coil article that I have read through multiple time. I started off with a basic round coil, per the book. Then built two elliptical coils, and lastly I tried my hand at making a basic basket coil. Got the basket correct on the secound try. But none of these seem to respond all that much faster. All my coils are right around 18~20uS response time. I have always aimed for the same specs 300~400uH, and I have hit that range every time. Using a spool of 26awg magnet/speaker wire. I know Teflon insulation should help, but I am currently working with what I have. Happy to invest in the better wire, once I have the basic coil building technique hammered out.

    Any advice to improve response time?

    Pics attached.
    If you want a fast coil, you have to use the extensions from the coil-wire as cable between coil and detector.
    If you solder in an extra cable you have to use a low capacitive cable.
    Try to make the coil on the min. specs near 300 uH to reduce response time.

    Leave a comment:


  • gallico58
    replied
    Hello
    I made arduino nano PI as per book and it works very well, I use a 250uh coil and it has good depth.
    I wanted to improve it and know if it was possible to disable the unused analog inputs via software in order to further reduce the disturbances that sometimes occur.
    the entrances left free often pick up disturbances.
    great project George thank you

    Leave a comment:

Working...
X