Shop OBEX P1 Docs P2 Docs Learn Events
$7 Frequency Counter Kit 50MHz - Page 2 — Parallax Forums

$7 Frequency Counter Kit 50MHz

2»

Comments

  • As far as the $7 frequency meter ... I bet I could immediately knock off $1.50 from his BOM by using a PIC16F54 instead of a PIC16F628.

    I have a similar project on my own eBay site on the horizon that would have much more versatility than the frequency meter listed here. Stay tuned ... no pun there
  • ercoerco Posts: 20,256
    Stay tuned ... no pun there

    I'm counting on you Beau!

  • jmgjmg Posts: 15,173
    As far as the $7 frequency meter ... I bet I could immediately knock off $1.50 from his BOM by using a PIC16F54 instead of a PIC16F628.

    I have a similar project on my own eBay site on the horizon that would have much more versatility than the frequency meter listed here. Stay tuned ... no pun there

    hmmm. the 16F54 is quite a bit smaller code size, is virtually brain-dead, and is still more than something like an EFM8BB1

    16F54 18 Pin Baseline PIC 512wF 25B SRAM 100: $0.52
    vs
    EFM8BB10F8G-A-QFN20 8kBF/512B RAM 12b ADC 100 $0.4650
    ( or EFM8BB10F8G-A-SOIC16 100 $0.4650)


    With the money spend on 8x LEDs & PCB, I'd rather they used a better MCU, and make a Reciprocal Counter.
    (and used a good TXCO too, Epson seem to be the present leaders )

    Pop up a link when you have your alternative ready
  • Original $7 kit arrived today, will probably assemble it this weekend. Did anybody notice the instructions are provided via DropBox?
  • ercoerco Posts: 20,256
    Yup, got mine 3 days ago, downloaded instrux. No worries. Haven't built yet, my $11 blue LED prebuilt one also came. 7 day free ship from China rocks!
  • ercoerco Posts: 20,256
    edited 2015-09-11 15:22
    Attaching the assembly instructions from Dropbox here if anyone wants. BTW, I'd add a drop of thick CA glue to help hold the power connector onto the PCB. IMO those electrical connectors are too weak.
  • Beau SchwabeBeau Schwabe Posts: 6,566
    edited 2015-09-12 15:54
    jmg ... just basing the info on the PIC chip used ... not that it is any better ... yes, it is a newer chip with more features, but for what it is being used for, the "newer" chip is defiantly overkill. Notice also that the input frequency is going to RA4. This essentially means that you have to have software in a tight loop to count the pulses. If the T0CKI pin was used instead then it could be treated similar to how a Counter on the Propeller is used to count external events, only the T0CKI pin can count pulses independent of the micro's system clock unlike the Propeller. So all that the software really needs to do is reset the TMR0 register and wait a specific interval which can be much more accurate than .... waiting a specific interval AND trying to count pulses at the same time AND being tied to the system clock ... as far as when you can increment the counter. Showing the result on a display is trivial in any case.

    PINTRICK.JPG

    PIC16F54 datasheet reference: (figure 7-5 pg 38)
    http://ww1.microchip.com/downloads/en/DeviceDoc/41213D.pdf
  • jmgjmg Posts: 15,173
    This essentially means that you have to have software in a tight loop to count the pulses.

    The specs give 60Mhz on low range, which is outside a SW loop ?
    If the T0CKI pin was used instead then it could be treated similar to how a Counter on the Propeller is used to count external events, only the T0CKI pin can count pulses independent of the micro's system clock unlike the Propeller. So all that the software really needs to do is reset the TMR0 register and wait a specific interval which can be much more accurate than

    The ideal Freq Counter is a Reciprocal Counter, which is more than a simple gated increment.
    Reciprocal Counters have two counting elements, and a nominal gate time, that is rounded to nearest whole Fi Cycles, and then Fi Cycles Value is Divided by the dT to give Hz.

    Do you have more details on what you were talking about releasing ?
  • jmg ... I had question about the 50MHz also, since the PIC16F628 they are using is only being supplied with a 20MHz crystal... there is no PLL multiplying inside of either PIC, and there is no way to count pulses from RA4 without being step locked with the processor frequency.

    Depending on the frequency range and your desired accuracy you can go about measuring an input frequency in two ways. One is to literally count the number of pulses within a given amount of time, and the other is to count the time between periods from rising edge to rising edge or falling edge to falling edge. ... Or a derivative of both. My plan was to do a derivative of both and at this time the details are really not that important since the whole thing is trivial.

    My initial post was merely looking at the cost between a PIC16F628 and PIC16F54 and thinking that a PIC16F628 was overkill for this type of application.... something as age old as a frequency counter is truly trivial. So much so that I have an old micro controller book that demonstrates a Frequency counter as a "Hello World" project.
  • jmgjmg Posts: 15,173
    jmg ... I had question about the 50MHz also, since the PIC16F628 they are using is only being supplied with a 20MHz crystal... there is no PLL multiplying inside of either PIC, and there is no way to count pulses from RA4 without being step locked with the processor frequency.
    ...

    If the T0CKI pin was used instead then it could be treated similar to how a Counter on the Propeller is used to count external events, only the T0CKI pin can count pulses independent of the micro's system clock unlike the Propeller.

    ? The drawing shown here
    http://www.ebay.com/itm/Red-0-1-60MHz-20MHz-2-4GHz-RF-Singal-Frequency-Counter-Cymometer-Tester-MeterR-/231261214978?hash=item35d83e1902
    labels the pin as RA4/T0CKI
  • ercoerco Posts: 20,256
    Built my kit in ~45 minutes and 2 beers. Fired up perfectly on the first test. Playing around with a BS2 right now. Will advise after I split the atom.

    A fun build. Nice quality PCB solders easily. Ah, the combined aromas of rosin core solder and brewski. So very nice.

    localroger, how'd you make out?
  • got busy and haven't built mine yet. Lawn to mow and mow and mow.
  • ercoerco Posts: 20,256
    Hey, I beat you for once. (I still haven't built my oscilloscope yet, dangit!)

    Spoiler: Off-brand processor alert!

  • OK I finally built my kit. Works nice, had fun going through a big drawer of old crystals.

    On the plus side this is a much easier build than the oscilloscope. The board is much more open and better labeled, there are a lot fewer parts, and there are no grounding planes to make soldering difficult. You do need to watch the capacitor values, one of the 22 pf was stamped crookedly and I mistook it for the 102 at first.

    On the minus side the documentation sucks compared to the oscilloscope; they do not suggest component order, which the oscilloscope does to keep you moving from short components to taller ones so that parts don't fall out while you're soldering them, and they offer no ID hints or other guidelines, just a picture of the finished board. You can pretty much guess the resistors by quantity but they all look very similar. I used the magic component identifier as I did on the scope kit.

    It would make a nice embedded display for a transmitter or receiver, and it can do receivers because of the IF offset capability. I wonder if my dip meter will generate enough signal for it to count...
  • ercoerco Posts: 20,256
    edited 2015-09-16 04:58
    localroger wrote: »
    one of the 22 pf was stamped crookedly

    I had exactly the same, one crooked 22 stamp. :)

    Agreed, all those light blue background Chinese resistors are impossible to read. Multimeter resistance checking is essential.

Sign In or Register to comment.