#985

Поделиться
HTML-код
  • Опубликовано: 16 июл 2024
  • Episode 985
    I decided to layout a board for the frequency counter with pre-scaler and display. There will be a future video of the counter operating at 1GHZ, I had to change the divisor from 64 to 256.
    PCB available:
    www.pcbway.com/project/sharep...
    I will do a follow video when I get the firmware running.
    Be a Patron: / imsaiguy
  • НаукаНаука

Комментарии • 46

  • @jainmanish123
    @jainmanish123 2 года назад +1

    Very nice introduction and good to see the progress on the frequency counter. Still waiting for my prescalers to show up in mail.... . Even if there is no eeprom I think the offset can be due to some fixed software delays as it was constant and you can adjust them in the main program itself once you have the golden number.
    Once again thanks for sharing.

  • @mpm990
    @mpm990 2 года назад +1

    An Arduino is much more fun and modern to program than a PIC12F as you could find 20 years ago. thank you for the very nice editing. (note: it will not go below 3mhz)

  • @homebrewguykc1atw268
    @homebrewguykc1atw268 2 года назад

    Thanks for sharing nice info. I have all parts, and will make it as winter project. Thank you

  • @TheRetiredtech
    @TheRetiredtech 2 года назад

    That is amazing

  • @md.almunsur5947
    @md.almunsur5947 2 года назад

    Nice project

  • @craigs5212
    @craigs5212 2 года назад +1

    Nice little project, I did one like this a while back. A couple of things to watch out for, the counter timer input is limited to 1/2 the CPU clock frequency -- small note in the data sheet. Second the nano clock resonator is neither accurate nor temperature stable, it's only attribute was like the lowest cost part they could find. The millis() function is also not accurate and has jitter based on how they had to generate the millis count. They prescale the counter input by 64 then count to 256 with the counter. If you do the math this is not 1mS but 1.024mS. So about every so often they adjust the count by skipping a count. This gets you close but the count is still off a little. To provide a 1 second gate for the counter use an external source not the internal nano clock or millis function. Funny, I just went through this the other day, had to examine the code behind the millis funciton because I couldn't figure how they got 1.000mS using a 16MHz clock and a 256 bit counter -- the math didn't work out.

  • @__--JY-Moe--__
    @__--JY-Moe--__ 2 года назад

    good 1 ! sharp!!

  • @ademiltondasilvaleite4381
    @ademiltondasilvaleite4381 8 месяцев назад

    My suggestion to Prescaller: is to use the 2SC9018 AM/FM IF amplifier transistor for 1100 MHz, I use it in a Cristal Frequency Meeter ( It has a wide working frequency range)

  • @ralphjarmain3851
    @ralphjarmain3851 2 года назад

    A nice-to-have would be a power meter (don't know how easy you could add that with the existing prescaler / firmware)

  • @stefflus08
    @stefflus08 2 года назад

    Yeah it really is satisfying to see one's plan printed out with glorious shiny solder mask. I've almost stopped etching my own.
    High freq response, why is the prescaler so far from the SMA?

  • @kd9kck376
    @kd9kck376 2 года назад +3

    Most arduinos have some form of EEPROM in them that is for saving stuff between power cycles. (I think most have 255 bytes if it.)

    • @digihz_data
      @digihz_data 2 года назад +1

      1024 bytes eeprom on Uno, nano and pro mini. Mega I think has 4096 bytes eeprom.

  • @VinayKumar-tr7gx
    @VinayKumar-tr7gx 2 года назад

    How do I read a sine wave of 1MHz through an arduino based frequency counter. I have used Op-Amp but itwas of no use

  • @t1d100
    @t1d100 2 года назад

    Nice project. Thank you for sharing. We really do recognize and appreciate your efforts. Some questions... What is the purpose of C8 having such a large Farad value? Any concern about in-rush current stress? It looks to be a Tantalum? If so, why? I am confused as to whether the green, manufactured PCB was the first one ordered, that I thought you said had an error? Or, did you make the correction, reorder boards, build the corrected version and that is what we saw? Anyway, my interest is in what the error(s) was/were and, if you bodged them on the back of the first board, what did you do? Meaning, maybe we could learn from that/those mistakes... Just FYI, I can not read the schematic. Even in full-screen, it is too blurry.

    • @IMSAIGuy
      @IMSAIGuy  2 года назад

      General practice to have one large uf and one small for low freq and high freq. I just choose 10uf and 0.01uf for fun. no concern about current inrush
      green board ordered and tested. if found I routed 5v to the wrong pin on the arduino and that the switches were routed to analog pins that cannot be configured to digital inputs, the second revision i fixed the errors and ordered red boards.
      go to the pcbway website for a clear schematic

    • @absurdengineering
      @absurdengineering 2 года назад

      Inrush current is self limiting on such small capacitors. Remember that an ideal capacitor coupled to an ideal voltage source has an infinite inrush current. Little ceramic caps fed from very low impedance sources have stupendous inrush - you can get a 0805 capacitor size spike 10A or even more. A tantalum of this size has a couple tenths of an Ohm ESR usually, and that’s plenty enough, especially when fed via long wires. It does help to have a fast clamp across the power input on the entrance to the board, so that the inevitable ringing of the long supply wires won’t zap anything. Jim Williams IIRC has an app note about supply transients cause by low ESR capacitance that kill voltage regulators. Of course there are good reasons for low ESR capacitors, it just takes some proper design work and bench testing to quench all the spikes.

  • @ibrahimkocaalioglu
    @ibrahimkocaalioglu 5 месяцев назад

    esp32 the way to go :)

  • @gmanshackshack6822
    @gmanshackshack6822 2 года назад +1

    328 has onboard EEPROM

  • @jensschroder8214
    @jensschroder8214 10 месяцев назад

    the ESP32 is more complicated. Program, WiFi, 2 core.
    the ESP8266 is also built bugy
    The Mega832 is just an 8 bit computer and good at doing a single job

  • @mstover2809
    @mstover2809 8 месяцев назад

    On the PCBWay website linked, someone mentioned the fact that pin 5 of the arduino is NOT defined in code.
    Have you ever released an updated version of the code for this?
    As for the diodes used to protect the front end (prescaler input) you may want to use Germanium diodes IF you can get any (1N34A or 1N270?) as the turn on voltage is around 300mv or so.

    • @IMSAIGuy
      @IMSAIGuy  8 месяцев назад

      pins 4 and 5 are i2c so they don't need defining

    • @mstover2809
      @mstover2809 8 месяцев назад

      @@IMSAIGuy Perhaps I am using the wrong terminology - D5 is an input from the prescaler, yes? D5 is not defined in the code. SO, sre you using the I2C input for that?
      Or is it listed as some other pin in the code.
      I DO see A4 and A5 as the SDA and SCL lines to the display.

    • @IMSAIGuy
      @IMSAIGuy  8 месяцев назад

      @@mstover2809 oh yes, A4 A5 are used for i2c, d5 is an input and should be defined as input. I guess it worked for me with out definition.

  • @zaprodk
    @zaprodk 2 года назад +2

    No, you do not to push a button to program the ESP32. The modern dev boards have auto reset.

    • @IMSAIGuy
      @IMSAIGuy  2 года назад

      yes, I like the ones that program easily, unfortunately there are still new boards that still do require Boot 0

  • @mohsinsiddique2486
    @mohsinsiddique2486 10 месяцев назад

    Please make an arduino tx tone decoder like ctcss and dcs

  • @brianbrumfield3330
    @brianbrumfield3330 2 года назад

    Personally I would have put the frequency counter into an FPGA with an I2C interface to read off the frequency registers that would be updated after each measurement cycle. An FPGA would give more resolution, with a divide by 4 pre-scaler it would measure GHz frequencies. To keep the FPGA simple I would read off the counter and do the math in the processor. Calibration would be stored in the processor eeprom.

    • @IMSAIGuy
      @IMSAIGuy  2 года назад +1

      I'll be waiting for your build and video

    • @brianbrumfield3330
      @brianbrumfield3330 2 года назад +1

      ​@@IMSAIGuy I did this design back in 2015 and I know I have the verilog code and the schematic for it. The project I was looking at in 2015 was almost exactly what you are doing here. Except the VCO was another product we build that has an external VCO control input which I was controlling with a16 bit DAC. My plan was to get the frequency counter calibrated then have the CPU step through 256 steps that covers the full range of the DAC and record the frequency in a eeprom to use as a look up table to get me close to the desired frequency then let the CPU fine tune it using interpolation. Unfortunately the project was a low priority and eventually died on the vine and has never been revisited.
      I have the first revision of the PCB here at home and I do have the verilog code functional for the most part but needs a lot more attention. Back then I wanted the FPGA to do all the auto ranging which was giving me lots of problems. If rip out the auto ranging features and let the CPU set the range / pre-scaler as needed that would make it much easier. If I use the prototype to work on the verilog code while I get the schematic trimmed down to just what is needed and then make a new layout. Famous last words "It shouldn't take me that long" but don't hold your breath!
      I have always wanted to make a frequency counter but I've never had a real reason to actually build it outside of work. I won't build something just to be building it, I have to have a need for it. I will give it a try and if I get it working I will send you one. But until then you should continue with your plan.

    • @absurdengineering
      @absurdengineering 2 года назад +1

      An FPGA for this is like going with a tank after a fly. There are high resolution single chip time-to-digital converters that make the whole thing mostly trivial and give you resolution and update rate that until recently was reserved for $2k+ instruments that has to implement interpolation on an ASIC. An FPGA will top out at clock rates that were no problem to direct counting (no prescaler) frequency counters decades ago. You can build a 1GHz direct counter using an ECL counter for the lowest digits, those are still being made. No prescaler needed.

  • @mr1enrollment
    @mr1enrollment 2 года назад

    don't forget some termination at input

  • @lordmemester8798
    @lordmemester8798 Год назад

    0:36 I thought he said "Ice squared sea lions" but he actually said "I²C lines" which makes much more sense

    • @IMSAIGuy
      @IMSAIGuy  Год назад

      when the sea lions in the artic sleep on the ice, their fat takes on a squared appearance.

  • @irgski
    @irgski 2 года назад

    input protection diodes may be limiting how much input you can provide.
    Scope it out.

    • @IMSAIGuy
      @IMSAIGuy  2 года назад

      No. It was just too fast. I had to change to a 256 divisor

  • @ThinklikeTesla
    @ThinklikeTesla 2 года назад

    What's a reasonably economical way to get a benchtop 10Mhz reference signal at high accuracy for calibration? GPS disciplined osc? WWV tuner + LNA?

    • @IMSAIGuy
      @IMSAIGuy  2 года назад

      GPS disciplined is $100 and is easy. WWV is ok but requires practice and only when you can receive the station. rubidium is getting expensive and requires some DIY for power supply and heatsink. if you get an oven oscillator and can cal it (friend?) they are stable for decades. my old HP equipment are all still spot on (8591,8712,8921)

    • @ThinklikeTesla
      @ThinklikeTesla 2 года назад

      @@IMSAIGuy Hmm. How tricky would it be to make your board accept a 1PPS signal from an external GPS module as a timebase or special calibration mode?

    • @ivolol
      @ivolol Год назад

      @@ThinklikeTesla if you get an m8n gps it can program it over usb-serial to output a slightly dodgy, but accurate period, 10mhz wave

  • @glendonblount6556
    @glendonblount6556 2 года назад

    I have a question, how do you know where to place the vias?

    • @IMSAIGuy
      @IMSAIGuy  2 года назад

      anywhere you want. anytime you need to go from top layer to bottom

  • @microled2012
    @microled2012 2 месяца назад

    Please, can you tell me where you bought the SAB6456 prescaler ?

    • @IMSAIGuy
      @IMSAIGuy  2 месяца назад

      I don't remember, eBay?

  • @ivolol
    @ivolol Год назад

    If you don't need WiFi and working in 5v is easier than I don't see why you'd want esp32, as long as you had stock of arduinos

  • @md.almunsur5947
    @md.almunsur5947 2 года назад

    This project calibration don't matched