Announcement

Collapse
No announcement yet.

Baracuda + Micro

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

  • #16
    Not being negative.


    Just seem more sense to start a fresh than patch a project but it up to you.


    PIs are obviously flavour of the month plenty being build. Wish you luck

    Comment


    • #17
      Originally posted by ODM View Post
      Could use a 4066, but it needs full supply logic input swing. 4051-4053 can use a logic control voltage referenced at a mid supply pin, for example +5/0V if using +5/-5V supply.

      I guess that hiccup with the integrator hookup was what 6666 was suggesting at.

      Regarding all curious configurations people upload of a previous circuit, good hygiene in revision documentation is something people usually/unfortunately learn after other "more fun" things
      There has to be a simple solution, just got to find it and I think I have one... Best not make any rash assumptions else the negative people will have a field day...

      Mike

      Comment


      • #18
        Jfet gates could be driven by capacitor and tied by diode on the gate side to 0V potential. This or other voltage translation means. Jfet gate capacitance is relatively low so a 100n cap would do. Still simpler would be relying on the jfet's internal parasite diode from gate to source/drain, but this is a real bush solution.

        All in all the analog switches can save component space elsewhere unless the control MCU ran at 0/-5V supply.

        And unless I'm mistaken you have 7805 and 7905 around the wrong way, 7805 is a positive reg. Anyways I believe a very baseline PI circuit with microcontroller timing opens up avenues for playing with pulse widths and sampling schemes. Using different excitation times with otherwise rather plain frontends was the bread of MPS type detectors anyways.

        Comment


        • #19
          Minipulse is driven by +12V (GND) / -5V (+7V) with 2xJFETs J113 on the integrator and for the Mosfet driver (555 timer)

          Comment


          • #20
            Originally posted by Michaelo View Post
            With the greatest respect, your comment is uncalled for...
            There's a recent bad experience with a Barracuda being "modification" that went unnoticed utill is had already caused general havoc on the 40106. Now this one neuters the integrator. A little more care would be appreciated before spreading schematics all around.

            As for the analog switching, replacing two JFETs by one 4066 doesn't seem a like bad deal. Can you possibly simplify more than that?

            Comment


            • #21
              Originally posted by Koala View Post
              Not being negative.


              Just seem more sense to start a fresh than patch a project but it up to you.


              PIs are obviously flavour of the month plenty being build. Wish you luck
              I see your point... I joined the forum to learn about metal detectors and design an opensource version...
              I built my first Baracuda but the depth wasn't great and I set out to improve it...

              Adding the micro was an answer to a problem with Rev 2 of the bara (timing and the 40106)... After I fixed the timing, I decided to expand on it and hence this topic...

              At this stage I'm not trying to build/design another detector, I'm simply trying to improve on an existing one. I actually designed a replacement to the timing using a 4017 before switching to a micro... I only had one 4017 but lots of ATMEGA's...

              I have no idea what I'll end up with but it's all good fun....
              Mike

              Comment


              • #22
                Originally posted by Teleno View Post
                There's a recent bad experience with a Barracuda being "modification" that went unnoticed utill is had already caused general havoc on the 40106. Now this one neuters the integrator. A little more care would be appreciated before spreading schematics all around.

                As for the analog switching, replacing two JFETs by one 4066 doesn't seem a like bad deal. Can you possibly simplify more than that?

                I should point out that it was my baracuda rev 2 thread that re-started the discussion in relation to the 40106 issues, it was instrumental in the solution...

                As for the analog switching, replacing two JFETs by one 4066 doesn't seem a like bad deal. Can you possibly simplify more than that?
                Without question... I've been designing electronics for forty years (on & off)... If I can solve that problem I will go back to writing code...

                Mike

                Comment


                • #23
                  Originally posted by Michaelo View Post
                  Without question... I've been designing electronics for forty years (on & off)... If I can solve that problem I will go back to writing code...

                  Mike
                  Well, 2 x JFET + 2 other associated components means a minumum of 10 pins. CD4066 has 14. I think the problem is solved but don't want to spoil your fun.

                  Comment


                  • #24
                    I've already solved the problem... it cost an extra ¢1 but as there's a lot of negativity about, I best double check my solution...

                    Comment


                    • #25
                      Originally posted by Michaelo View Post
                      I built my first Baracuda but the depth wasn't great and I set out to improve it...
                      In the receiver section, depth is limited by the input referred noise level.

                      I suggest removing R12, D3, D4, C8, R13, Q3, Q4 and all the circuitry around U2A and replace all their functions with software. Reduce the gain of U1 by a factor of 20, set the internal OpAmp of the ATmega to a gain of x20. Output the result of your digital signal processing as PWM to C16. Configure U2B as a low-pass filter.

                      Comment


                      • #26
                        Originally posted by Michaelo View Post
                        Assuming you have the correct timing, a good coil and the correct value of damping resistor, you should be able to get decent depth right?

                        This was pretty much the advice I found after building my first baracuda with poor depth sensing...
                        My problem was almost certainly the timing circuitry but after looking at the 40106 I was not convinced it was wired correctly...
                        Suffice to say these issues have been resolved as I'm sure you are all aware...

                        In the mean time I built a tool using an ATMEGA328 to generate the timing and it worked perfectly...
                        I then thought why not add the amp and audio sections from the bara to the Micro... could be useful...

                        That's what this post is about.
                        I have attached the schematic and a 3D image for the board for any one interested...

                        I'm just looking for feedback and to see if anyone is interested...

                        I aims are to start with the timing (currently the micro only does the timing and battery monitoring), and add additional functionality over time...
                        As I get the micro to do more of the work, some of the other circuitry may disappear...

                        The schematic is not finalised (needs more testing)...
                        Everything will be in the public domain including the code...
                        Mike

                        Give it here, the code.
                        Regardless whether it is finished or not; it would be interesting to see how you designed it and how you started it.
                        And the truth is that more people are always smarter than single one. The rest of us may help you to do it better.
                        And whole thing may be pretty easy put on Arduino and improved further.

                        Comment


                        • #27
                          Originally posted by Teleno View Post
                          In the receiver section, depth is limited by the input referred noise level.

                          I suggest removing R12, D3, D4, C8, R13, Q3, Q4 and all the circuitry around U2A and replace all their functions with software. Reduce the gain of U1 by a factor of 20, set the internal OpAmp of the ATmega to a gain of x20. Output the result of your digital signal processing as PWM to C16. Configure U2B as a low-pass filter.
                          That's pretty much sums up the next step but first I need to complete this step, make corrections, and of course test everything. I will then post a corrected schematic and take it from there...

                          Mike

                          Comment


                          • #28
                            Hi Mike please continue with your project
                            just for thought, many years ago when Dooley and I were modifying the squirrel PI to make it simpler I wrote on the schematic "Concept only do not make anything from this"

                            Some ways to do the switch's.
                            Attached Files

                            Comment


                            • #29
                              Originally posted by Teleno View Post
                              In the receiver section, depth is limited by the input referred noise level.

                              I suggest removing R12, D3, D4, C8, R13, Q3, Q4 and all the circuitry around U2A and replace all their functions with software. Reduce the gain of U1 by a factor of 20, set the internal OpAmp of the ATmega to a gain of x20. Output the result of your digital signal processing as PWM to C16. Configure U2B as a low-pass filter.

                              Which schematic are you referring to ?

                              Comment


                              • #30
                                Originally posted by ivconic View Post

                                Give it here, the code.
                                Regardless whether it is finished or not; it would be interesting to see how you designed it and how you started it.
                                And the truth is that more people are always smarter than single one. The rest of us may help you to do it better.
                                And whole thing may be pretty easy put on Arduino and improved further.
                                The test code is nothing more than a function call within the main loop.. it's really that simple...
                                It started life as a timer interrupt drive procedure but I ran into issues so I coded a simple pulse function (see below)...

                                I monitor the loop timing and adjust to achieve the correct duty cycle, this give me about 1.3mS to perform all the other tasks between cycles...
                                It's fine for pulses with some time for user adjustments via LCD but not ideal for continued development...

                                The code is not complete... it will not compile...
                                Code:
                                #define TX_PULSE         100 //(100uS) TX Pulse width of 100uS
                                #define PULSE_1_DELAY     10 //( 20uS) Delay before Main Sample Pulse 10-60uS
                                #define PULSE_1           45 //( 45uS) Sample 1 Pulse Duration 45uS
                                #define PULSE_2_DELAY     90 //( 90uS) Delay between Pulse 1 and Pulse 2 90uS (increase this!)
                                #define PULSE_2           45 //( 45uS) Sample 2 Pulse Duration 45uS
                                #define WAIT_PERIOD     1300 //(1.3ms) delay till next sequence
                                #define BCT 3600
                                #define BAT_LOW 1.50
                                #define CONTRAST_PIN       9 //15
                                
                                int bcount = 0;
                                unsigned int duty_count = 0;
                                unsigned long loop_timer_start = 0;
                                unsigned long loop_timer_end = 0;
                                int adjust = 0;
                                int contrast = 65;
                                int xcol = 3;
                                int xrow = 2;
                                char key;
                                char menu_line_1a[]  = "       Menu      [A]";
                                char menu_line_1b[]  = "     Contrast    (D)";
                                char menu_line_1c[]  = "   Timing Menu   (B)";
                                char menu_line_1d[]  = "    Exit Menu    (*)";
                                int clean = 0;
                                int repaint = 0;
                                
                                byte con[8] = {
                                  0b00100,
                                  0b01110,
                                  0b11111,  
                                  0b00000,  
                                  0b00000,  
                                  0b11111,
                                  0b01110,
                                  0b00100
                                };
                                
                                LiquidCrystal lcd(8,7,6,5,4,3);
                                
                                void setup ()
                                {
                                  pinMode (A0, OUTPUT);
                                  pinMode (A1, OUTPUT);  
                                  pinMode (A2, OUTPUT);
                                  pinMode (A5, INPUT);  
                                  digitalWrite (A0, LOW);
                                  digitalWrite (A1, LOW);
                                  digitalWrite (A2, LOW);
                                
                                  pinMode(CONTRAST_PIN, OUTPUT);
                                  analogWrite (CONTRAST_PIN, contrast);
                                  lcd.createChar(1, con);
                                  lcd.begin(20, 4);
                                  lcd.setCursor(0, 0);
                                  delay(500);
                                  lcdstart();
                                  Serial.begin(9600);
                                }
                                
                                void loop ()
                                {
                                  if(bcount++ > BCT) check_battery();
                                  
                                  pulses();
                                
                                  duty_count++;
                                  
                                  if(duty_count == 1) loop_timer_start = micros();
                                  
                                  // control pulses per second //
                                  if(duty_count == 625)
                                  {
                                    duty_count = 0;    
                                  }
                                  
                                  if(duty_count == 1) loop_timer_end = micros();
                                
                                  adjust = loop_timer_end - loop_timer_start;
                                
                                  delayMicroseconds (WAIT_PERIOD - adjust);
                                }
                                
                                void pulses ()
                                {
                                  cli () ;
                                  PINC = 0x01;
                                  delayMicroseconds(TX_PULSE);
                                  PINC = 0x01;
                                  delayMicroseconds(PULSE_1_DELAY);
                                  PINC = 0x02;
                                  delayMicroseconds(PULSE_1) ;
                                  PINC = 0x02;
                                  delayMicroseconds(PULSE_2_DELAY);
                                  PINC = 0x04;
                                  delayMicroseconds(PULSE_2);
                                  PINC = 0x04;
                                  sei () ;
                                }
                                With the present code it's probably not worth adding a Micro, even though you do have the option to control duty cycle, pulse durations and delays. It's more suited to experimentation...

                                The final code (assuming I can solve a current issue), should be a perfect place to begin expanding on...

                                Mike

                                Comment

                                Working...
                                X