Announcement

Collapse
No announcement yet.

Voodoo Main Discussion

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

  • Originally posted by Qiaozhi View Post
    The settings that were different to the defaults were:
    Pulse mode
    PI threshold = 2
    TX pulse width = 180us
    Main sample delay = 49us
    Number of PI readings to average = 40

    The DISC settings are irrelevant as the detector is set to pulse mode.

    I set my Voodoo detector to the same settings ... and it locked up.
    After re-flashing the PIC I did some experimentation with the settings. It appears that there's some strange interaction between the TX pulse width and the main sample delay. This only occurs when the TX pulse width is set to 180us and the main sample delay is above 40us. All other combinations seem to be ok.

    Now to figure out what's causing it .....
    Hi George
    I didn't intend to break it, but better on the bench rather than in the middle of a field.
    Will reload my PIC and carry on with coil development.
    I am sure you will let us know when you have sorted the code.
    Thanks for your help and the time you are about to spend on this issue

    Comment


    • Whenever you find a microcontroller locking up or crashing, it's usually one of three things:
      1. A variable has been set to an arithmetic type that is too small to contain the maximum value.
      2. The interrupt routine has lost its way,
      3. There's an obscure calculation error somewhere.

      I managed to rule out #1 fairly quickly, and couldn't see any obvious problem associated with the interrupt routine. If the problem was #3, then it was definitely going to be an obscure one.

      Next I added some debug code to write the calculated timer contents to EEPROM after the user exits the menu routine. Examining the EEPROM contents with the PICkit did not reveal any errors, so the routines that calculate the timer contents were definitely working correctly.

      At this point I went away to contemplate the issue. Then it struck me ...

      Adding up the various pulse widths and delays: 180us + 41us + 60us + 650us +60us = 991us.
      Since the pulse period is 1000us, this only leaves 9us for state 5 of the interrupt routine to complete its task, and a minimum of 10us is required.
      Clearly the EFE delay is too long at 650us. Reducing the delay to 400us fixed the problem.

      Software version V1.1 is now available in post #1 (mikroC project, C code, and hex file).
      I also took the opportunity to increase the maximum TX pulse width to 200us, and reduce the minimum main sample delay to 10us.
      The debug code has not been removed, but I'll most likely remove it in any future update.

      Please download and install the new hex, and let me know if you encounter any problems.

      Comment


      • Originally posted by Qiaozhi View Post
        Whenever you find a microcontroller locking up or crashing, it's usually one of three things:
        1. A variable has been set to an arithmetic type that is too small to contain the maximum value.
        2. The interrupt routine has lost its way,
        3. There's an obscure calculation error somewhere.

        I managed to rule out #1 fairly quickly, and couldn't see any obvious problem associated with the interrupt routine. If the problem was #3, then it was definitely going to be an obscure one.

        Next I added some debug code to write the calculated timer contents to EEPROM after the user exits the menu routine. Examining the EEPROM contents with the PICkit did not reveal any errors, so the routines that calculate the timer contents were definitely working correctly.

        At this point I went away to contemplate the issue. Then it struck me ...

        Adding up the various pulse widths and delays: 180us + 41us + 60us + 650us +60us = 991us.
        Since the pulse period is 1000us, this only leaves 9us for state 5 of the interrupt routine to complete its task, and a minimum of 10us is required.
        Clearly the EFE delay is too long at 650us. Reducing the delay to 400us fixed the problem.

        Software version V1.1 is now available in post #1 (mikroC project, C code, and hex file).
        I also took the opportunity to increase the maximum TX pulse width to 200us, and reduce the minimum main sample delay to 10us.
        The debug code has not been removed, but I'll most likely remove it in any future update.

        Please download and install the new hex, and let me know if you encounter any problems.
        Hi George
        I take my hat off to you

        Comment


        • Ok updated my pic nice work finding that Martin and awesome job coming up with a fast fix George i flipped my screen around and fixed a few of thin test points that keep breaking and that wrong resistor i pulled out just waiting for the right one to move ahead

          Comment


          • Originally posted by SilverSurfer17 View Post
            Ok updated my pic nice work finding that Martin and awesome job coming up with a fast fix George i flipped my screen around and fixed a few of thin test points that keep breaking and that wrong resistor i pulled out just waiting for the right one to move ahead
            The best way to make a robust test point is to bend the top portion of a header pin into a hook using snipe nosed pliers prior to soldering into your board

            Comment


            • Thats a good idea ill do that when i replace the rest of them thanks

              Comment


              • Hey George i have a question i have a rgb 16x2 lcd and i had it wired wrong its a 18 pin and 16 17 and 18 are the 3 led lights they can be controlled by microcontrollers its controlled by negative side anyway of wiring it where it will work with this microcontroller to change colors instead of using switches for each color this is how it get wired to a adrino Click image for larger version

Name:	CD8F7C01-455E-4238-A26E-69B4741DEC06.png
Views:	1
Size:	419.0 KB
ID:	359099 i know its not a 5 minute project just wondering if its possible without adding more pcb and parts

                Comment


                • Never mind i see i need pins 16 and 17 the pwm pins and the screen shot i have has that part cut off so i have to go find a clear shot of all the pins and see if thats connected to anything or being used then figure out how it uses 3 wires but only 2 pins to control 3 different led colors learn the lcd library and make up some new symbols

                  Comment


                  • i have a rgb lcd and want to add functions to the menu to change the color hopefully with the pwm if its not used for something else and dont want the extra buttons on the case ill leave connected with switches for now to change the color any chance you can see if this possible with this project ?

                    Comment


                    • I ordered some boards from JLCPCB and got them in under week.
                      PCB-s look nice, on some other revision i would like to see bigger pads for resistors for easier soldering.
                      Expecting book soon so that will be next project.
                      Cheers
                      Attached Files

                      Comment


                      • Originally posted by SilverSurfer17 View Post
                        i have a rgb lcd and want to add functions to the menu to change the color hopefully with the pwm if its not used for something else and dont want the extra buttons on the case ill leave connected with switches for now to change the color any chance you can see if this possible with this project ?
                        The Voodoo Project is designed to use a 2-line x 16-character HD44780 compliant LCD module in 4-wire display mode. I cannot see any benefit to a metal detector of being able to change the LCD screen colour.

                        However, if you want to do that, it will require some hardware modifications and changes to the software. You will need to purchase a copy of Mikroelektronika's mikroC Pro compiler in order to modify the code.

                        Comment


                        • I have it already and ive seen whats involved just learning hello world or making symbols and i want to change the color for better visibility I've noticed already having the red on and the blue makes the letters easier to read but im also in a basement not in the sun id like to be able to use my detector without wearing reading glasses if possible and do it in sunlight with a shade built over the screen and i asked because what would take me days to figure out could be 10 minutes to someone else to do and i would make it up if i could maybe with some spare parts or in some other way but if its that big of a deal ill figure it out on my own like i have with most of this project already better yet ill just keep it on a switch

                          Comment


                          • Im sure you wouldnt see any advantage to making this into a two box idea but i do one of the major reasons i decided to build this was because of the discrimination its open source and i could build it the way i wanted to i want the leds on the face idea for the ferrous and non ferrous so i dont even have to concentrate on the screen i can be looking at the ground because voodoo uses the same tone for ferrous and non ferrous so i have to look at the screen and with using a switch im limited to using only 4 colors with using the pwm circuit i can change it to whatever color is best in what light thats why i asked about contrast in the menu also instead of a pod inside the detector

                            Comment


                            • I got my 3R3 2w resistor and installed it and the wave looked more similar to the book but not the same yet on TP5 and TP2 i was reading that the clip is the ground for the probs on my oscilloscope and connected it to TP14 thinking that it might have to be grounded the screen went white boxes with just a back ground shut it off and now nothing on anything and 10 volts all over the board so i guess i get to learn how to check parts and repair it now starting with the 78L05 and the 79L05 and anything else i find i destroyed where is the clip suppose to be grounded to ?

                              Comment


                              • Yeah i got 12 volts at the regulators but only mv coming out so those regulators are toast well i know not to connect those alligator clips to a ground again lesson learned until i figure out why that happened

                                Comment

                                Working...