Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

Yet Another Gaussmeter

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

  • #46
    Originally posted by RedHouse View Post
    I'm a realist (with other work to do) so coding in a higher level language is appealing, not the geeky interest in esoteric arguments of compilers and MCU architecture, that's for others.
    Big 10-4 there.
    Having real lives, we need results in a timely fashion.

    That's the Arduino's appeal for me.

    -drh
    "Det var helt Texas" is written Nowegian meaning "that's totally Texas." When spoken, it means "that's crazy."

    Comment


    • #47
      Originally posted by -Elepro- View Post
      ...maybe the assembler that came out of your compiler filled it with you-don't-know what
      Maybe you haven't a clue what comes out of my compiler?

      Originally posted by -Elepro- View Post
      ...why change?
      I know you're resistant to change and suggestion, but as for me I changed for future implementations where I will need more than the 16F883/6 will provide.
      -Brad

      ClassicAmplification.com

      Comment


      • #48
        Originally posted by salvarsan View Post
        Big 10-4 there.
        Having real lives, we need results in a timely fashion.

        That's the Arduino's appeal for me.

        -drh
        The Arduino is a time saver for sure, it's kinda like a miniature development board.

        Here's a pic of the dev board I'm using now, they can be found here and on eBay.
        Attached Files
        -Brad

        ClassicAmplification.com

        Comment


        • #49
          ^dev boards are so much fun. I've got one from MikroElektronica. I don't use it much, but it's nice to have all of the hardware already there when you're trying to develop something. I'm using the older version of this:
          EasyPIC5 Development Board | mikroElektronika
          Their visual programming interface is nice, especially for a script kid like me.
          -Mike

          Comment


          • #50
            Originally posted by RedHouse View Post
            I know you're resistant to change and suggestion, but as for me I changed for future implementations where I will need more than the 16F883/6 will provide.
            you right.... i'll change the 1100cc motor in my ford fiesta with a 4300cc Ferrari motor.... but for future....when I will need more than now
            .......my gaussmeter project..... ........
            .......first pickup with my cnc winder........

            .... NEW cnc pickup winder user manual.....

            Comment


            • #51
              Originally posted by defaced View Post
              ^dev boards are so much fun. I've got one from MikroElektronica. I don't use it much, but it's nice to have all of the hardware already there when you're trying to develop something. I'm using the older version of this:
              EasyPIC5 Development Board | mikroElektronika
              Their visual programming interface is nice, especially for a script kid like me.
              I like the microElektronica stuff, and I nearly bought an EasyPIC but then I found these QL200 boards on eBay for roughly the same price, and the expansion modules microE sells additionally are already built-in to this one, and you can re-assign all connections (switches, LCD, LED's etc) to whatever you want them to be.
              -Brad

              ClassicAmplification.com

              Comment


              • #52
                Originally posted by RedHouse View Post
                The Arduino is a time saver for sure, it's kinda like a miniature development board.

                Here's a pic of the dev board I'm using now, they can be found here and on eBay.
                Gadzooks!

                That thing is a Wurlitzer.
                For $230 shipped, you even get an ICE debugger.

                The compiler is MicroChip's C18 Pro, yes?

                -drh
                "Det var helt Texas" is written Nowegian meaning "that's totally Texas." When spoken, it means "that's crazy."

                Comment


                • #53
                  Originally posted by salvarsan View Post
                  Gadzooks!

                  That thing is a Wurlitzer.
                  For $230 shipped, you even get an ICE debugger.

                  The compiler is MicroChip's C18 Pro, yes?

                  -drh
                  That price is off the website, I actually got mine off eBay, a company store called Wide Technologys has them on auction all the time for under $150

                  The compiler that comes on the accompanying CD is a "demo" version, so I didn't install it. I have CSS, and microC Pro, and PicBasic Pro on loan from a friend so I'm using those until I decide which I like best. PicBasic Pro is easiest of course, CSS has the slickest GUI, but microC Pro seems cool to me somehow, I might go with that. It could be it's most like Visual Studio which is what I used when I did code for money.
                  -Brad

                  ClassicAmplification.com

                  Comment


                  • #54
                    In looking back over these posts, something's not right about resolution numbers going on here.

                    What occurs to me is that regardless of the how you do the math (8-bit. 16-bit, or 32-bit) it still doesn't get anyone away from the fact that the ADC is a 10-bit convertor which only has 1024 levels of change relative to Vref.

                    The ADC's resolution is the determining factor that sets a minimum resolution when reading these sensors we are using. Going from a 1.3mV/G sensor down to a 0.400mV/G sensor without a corresponding increase in ADC resoution is counter productive.

                    In the case of the 16F883 in the Elepro gauss meter (and the Atmega328) have a 10-bit ADC means resolving Vref/1024 = mV_per_ADC_unit and in real numbers would look more like 5V/1024 = 0.004882 or 4.8mV per ADC unit, which in turn means that a sensor regardless of it's mV/G capacity must move it's output past 4.882 mV before the ADC in the PIC will move from one level to the next.
                    (ie; from ADC=1 to ADC=2)

                    For example when the sensor puts out 1.3mV above it's quiescent voltage of 1/2 Vref, the ADC doesn't change because it's sensitivity is 4.8mV, it's only when the sensor put's out 4.9mV that the ADC registers a change of 1. Which also makes the resolution of the sensor a bit counter productive to achieving fine resolution measurements with a 10-bit ADC.

                    Using the A1302 which has an output level of change of 1.3mV/G then the 10-bit ADC is changing it's output at a rate of 3.75 Gauss per ADC unit.

                    The AD22151 on the other hand has an output level of change of 0.400mV/G means in order for the 10-bit ADC (at 4.882 mV per unit) to register a change of from 0 to 1 the AD22151 will have to be putting out 4.9mV, but since this sensors output is 0.400mV/G it follows that the sensor has to be reading 12.2 Gauss per ADC unit, to get the ADC to go from 0 to 1.

                    So using the AD22151 which can measure more gauss than the A1302, effectively causes reduced resolution on a 10-bit ADC (ie; A1302 at 3.7G/ADC unit compared to the AD22151 at 12.2G/ADC unit)

                    It' seems to me that the only way one could use the AD22151 to get better resolution would be to go to a 12-bit ADC and then one could discern a lower mV/G reading over the wider range it provides.

                    Personally I feel the resolution we have currently is fine, I just post this thought for public consumption.
                    Last edited by RedHouse; 01-22-2010, 07:57 PM. Reason: typo's
                    -Brad

                    ClassicAmplification.com

                    Comment


                    • #55
                      Getting better measurement resolution by oversampling gives reproducible results.

                      ATMEL has a short useful doc (AVR121) titled
                      Enhancing ADC resolution by oversampling , available at:

                      http://www.atmel.com/dyn/resources/p...ts/doc8003.pdf

                      Practically speaking, if your signal lies between two bit values,
                      the ADC bobbles between value N and N+1 with a periodicity
                      proportional its nearness to the upper or lower value.

                      If your 10-bit(0-1023) ADC usually reads 600 but bobbles up
                      +1 for 25% of the measurements, you can oversample by 16 to
                      get 12-bit (0-4095) resolution and see 2401 reproducibly.

                      Their rule is to oversample 4^N where N is the incremental
                      number of bits you want.

                      I oversample 1024x out to a 16-bit sum and decimate down to 12-bits.

                      Works okay.
                      Last edited by salvarsan; 01-22-2010, 09:15 PM. Reason: ;':punctuation
                      "Det var helt Texas" is written Nowegian meaning "that's totally Texas." When spoken, it means "that's crazy."

                      Comment


                      • #56
                        Originally posted by salvarsan View Post
                        Getting better measurement resolution by oversampling gives reproducible results.[/SIZE][SIZE=4]

                        ATMEL has a short useful doc (AVR121) titled
                        Enhancing ADC resolution by oversampling , available at:

                        http://www.atmel.com/dyn/resources/p...ts/doc8003.pdf

                        Practically speaking, if your signal lies between two bit values,
                        the ADC bobbles between value N and N+1 with a periodicity
                        proportional its nearness to the upper or lower value.

                        [If your 10-bit(0-1023) ADC usually reads 600 but bobbles up
                        +1 for 25% of the measurements, you can oversample by 16 to
                        get 12-bit (0-4095) resolution and see 2401 reproducibly.

                        Their rule is to oversample 4^N where N is the incremental
                        number of bits you want.

                        I oversample 1024x out to a 16-bit sum and decimate down to 12-bits.

                        Works okay.
                        Ahh, I see, dithering the result and doing a shift at a higher sampling rate to fill-in the missing 12-bit parts, nice.
                        (well I suppose it's not "missing" if it's being sampled at a higher rate)

                        So why the huge font, yelling to/at me?

                        Thanks for the link to the doc BTW.

                        So I think it might still beg the question, why might this resoluton be needed in measuring guitar pickup magnets? when one reads a magnet with a probe (ours or a $1200 Bell) the reading is all over the place, it can vary 20-80 gauss just moving the probe a fraction of a millimeter. The sensors we use have a active sensing area of 1/1000 of an inch (.025mm) and with the fluctuation on gauss levels in a magnet when moving ever so slightly, why might we need to interpolate gauss?.

                        Seems to me like what we need is a bit more natural hysterisis built-in to our meters perhaps rather than oversampling/extrapolating a +/- 20 gauss into the readings. Kind of like the difference between a VU and peak input meter. For instance when moving your probe around a 3/16 Fender type pole or a 1/8" thick bar magnet (Humbucker) you can easily observe a 50G variance moving the probe in one millimeter of movement of the probe, how (seemingly) erratic the measurements appear when not calculating peak.

                        Not arguing, just food for thought.
                        Last edited by RedHouse; 01-23-2010, 04:01 AM.
                        -Brad

                        ClassicAmplification.com

                        Comment


                        • #57
                          Originally posted by RedHouse View Post
                          Ahh, I see, dithering the result and doing a shift at a higher sampling rate to fill-in the missing 12-bit parts, nice.
                          (well I suppose it's not "missing" if it's being sampled at a higher rate)
                          Check the doc.
                          The oversampling+interpolation relies upon a small amount of
                          system noise to create bobble at the low bit. It is the basis for
                          sigma-delta 1-bit oversampling converters.


                          If you/we/Elepro/? go to 12-bit hardware, we need to be more
                          careful about noise sources and supply voltage regulation.


                          MicroChip has a similar oversampling doc, AN1152:
                          http://ww1.microchip.com/downloads/e...g%2001152A.pdf
                          and includes source code, albeit for their dsp processors:
                          http://ww1.microchip.com/downloads/e...rce%20Code.zip
                          So why the huge font, yelling to/at me?
                          Earlier, a power line blip crashed the browser settings.
                          So I think it might still beg the question, why might this resoluton be needed in measuring guitar pickup magnets? when one reads a magnet with a probe (ours or a $1200 Bell) the reading is all over the place, it can vary 20-80 gauss just moving the probe a fraction of a millimeter. The sensors we use have a active sensing area of 1/1000 of an inch (.025mm) and with the fluctuation on gauss levels in a magnet when moving ever so slightly, why might we need to interpolate gauss?.
                          We interpolate the peak values. They are reproducible if you hold still.
                          Seems to me like what we need is a bit more natural hysterisis built-in to our meters perhaps rather than oversampling/extrapolating a +/- 20 gauss into the readings. Kind of like the difference between a VU and peak input meter. For instance when moving your probe around a 3/16 Fender type pole or a 1/8" thick bar magnet (Humbucker) you can easily observe a 50G variance moving the probe in one millimeter of movement of the probe, how (seemingly) erratic the measurements appear when not calculating peak.
                          Not arguing, just food for thought.
                          You're no fun.
                          There's nothing like an old-fashioned innerNet shit+flame war to make the ganglia tingle.

                          -drh
                          "Det var helt Texas" is written Nowegian meaning "that's totally Texas." When spoken, it means "that's crazy."

                          Comment


                          • #58
                            Why we do it

                            ...because we can.


                            Seldom does good+fast+cheap come in one package as it does with oversampling.


                            -drh
                            "Det var helt Texas" is written Nowegian meaning "that's totally Texas." When spoken, it means "that's crazy."

                            Comment


                            • #59
                              Originally posted by -Elepro- View Post
                              but did you use 10bit a/d without any kind of oversample or average? did yo display the result of a single sample? did you use same math for normal and peak hold mode?
                              after last posts my questions make more sense.... without oversampling/average you put to work a PIC18F to obtaining results very worse than the simple sensor+voltmeter solution
                              Last edited by -Elepro-; 01-23-2010, 01:46 PM.
                              .......my gaussmeter project..... ........
                              .......first pickup with my cnc winder........

                              .... NEW cnc pickup winder user manual.....

                              Comment


                              • #60
                                Originally posted by RedHouse View Post
                                So I think it might still beg the question, why might this resoluton be needed in measuring guitar pickup magnets? when one reads a magnet with a probe (ours or a $1200 Bell) the reading is all over the place, it can vary 20-80 gauss just moving the probe a fraction of a millimeter
                                Yes, the geometry of the problem means that the magnetic fields are non-uniform. Uniform magnetic fields are notoriously hard to create, and you can read about all this in particle physics where they really do need uniformity to a few percent, and have to perform engineering miracles to get it. I don't see how it makes sense to try to measure pickup magnets any closer than 10 gauss. Personally I poke them with a screwdriver, and if it sticks to the magnet, we're good to go. (Runs for cover )

                                RedHouse: I guess I eat my words on the PIC C compiler. I programmed the 16 series PICs in assembler for years, designed a whole range of laser and peltier drivers based on them, and grew to hate them with a passion.

                                The 18 series are more C-friendly. I just did a 4-channel DMX LED driver for a local lighting company based on an 18F4431, which I chose because of its four high-resolution PWM modules.

                                Although I swore off it, I ended up using assembler again, because the Microchip DMX example code was in ASM and I didn't have enough time to figure out how to integrate it with C code.

                                I know a guy who develops on the DSPICs. Last I saw, he had a remarkably convincing emulation of the Roland TB-303 running on one, filter non-linearities and all. He uses assembler, because he found that the C compiler doesn't support the DSP part of the chip. And I guess he's a Real Programmer too. Me, I just bought 6 Arduinos and got a free nose piercing :-)
                                Last edited by Steve Conner; 01-23-2010, 02:06 PM.
                                "Enzo, I see that you replied parasitic oscillations. Is that a hypothesis? Or is that your amazing metal band I should check out?"

                                Comment

                                Working...
                                X