How many Hertz can I measure over I²C ADC?

Hello,
how many Hertz can I measure with an Arduino over I²C on an ADC with 240 samples per second? I need to measure up to 1.2Mhz for a DIY Sonar. I´m just designing the circuit, and I don´t find ADC´s with 1.2Million Samples per second. I tought I need 1.2Million samples per second to read up to 1.2 Mhz. Am I wrong?

Seeing as the I2C bus runs at 100 KHz, or 400 KHz in the fast version you can not hope to get even one sample per cycle at 1.2MHz.

I tought I need 1.2Million samples per second to read up to 1.2 Mhz. Am I wrong?

Yes you need to sample at least twice per sample in order to determine the frequency. And if you want much accuracy on that then you need to sample a lot more than 2 samples per cycle.

Ok, thank you for answering my question. I´m trying to use another interface. Maybe Serial?

The only chance you will stand is with SPI. What Arduino do you have because you need one of the faster ones to attempt this sort of frequency, something in the MKR series or even the latest Teensy 4.0.

Do you think the ADS7883 will work? It is an SPI ADC with 3 million samples per second.

https://lcsc.com/product-detail/Others_Texas-Instruments_ADS7883SDBVT_Texas-Instruments-TI-ADS7883SDBVT_C122523.html

Hello,
I´m building a Sonar. And I need Amplifiers for it. I searched for them, but I found different types and I don´t know which type. The Piezo-Elements are running at 230V with 60W and my DAC´s are outputting around 5,5V with 180mWs.

What signal do you want to amplify? How much gain?

I want to Amplify Sonar Pings. I don´t know how much Gain I need.

The only sonar that I know much about (besides the HCSR04) is the Polaroid camera sonar. Polaroid uses a variable gain amp for amplifying the sensing of the echo. The gain varies over time from the transmittal of the ping. The gain is low at first and increases as time passes and the echo gets weaker.

Well you will get just over two samples per cycle, which is not great. What sort of precision are you after.

Personally I would not use a ADC for frequency measurement, I would use a digital counter of some type, probably HCMOS, considerably less money to make. There is a technique called pre-scaling where you put a divider in front of the measuring (countinting section). You will have to amplify the signal to the point your logic devices can use it. The amount of pre-scaling you need depends on your hardware and what accuracy you want, sample period and how fast you want to do it. This is in the medium frequency range of the RF spectrum. Try this link: http://www.ti.com/lit/an/scla007a/scla007a.pdf it will give you a lot of information on the capability of HCMOS devices. Try this link, it is a scaled down version of what you want; Frequency Counter Circuit Working and Applications
Good Luck & Have Fun!
Gil

Yes you can do that but counting only works for square and rectangular waveforms. With the OP saying he wanted to use an A/D I had assumed he had a waveform that required an A/D. But then I might have presumed too much.

Thinking about it more if it is for some sort of sonar device, why do you want to measure the frequency you are emitting. I would have thought you want to measure the arrival time of any reflected wave?

Thank you all for the answers and the links! I´ll try to use the information for my Project.

I want so much precision that I can generate a traditional 2D Sonar like graphic. Also I want to see the frequencies I am emmiting and all the others, on a Spectrogram (Passive Sonar). Because there is much to learn about sounds under Water.

You might think is is difficult to program, especially for noobs like me. That is right! For this reason i am using Matlab Simulink to create the Software.

Sorry for my bad English.

I want so much precision that I can display it on a traditional 2D Sonar style graphic.

That is not a very good requirement because that begs the question as to how big the display is. You need to nail it down to numbers.

I think that you need to go much faster in sampling than the minimum of two per cycle because

Also I want to see the frequencies I am emmiting and all the others

So if you want to see the shape of the returned wave then you have to allow for al the harmonics as well. This only leaves a "flash converter" for your A/D and these are very expensive the last time I looked. They are used in high definition TV digitization. I also tend to think that this puts it outside of the sort of speed you can get from a processor and you are into the realm of using FPGAs, which are another step in complexity and several times more expensive, especially for the lone amateur.

For this reason im using Matlab Simulink to create the Software.

Well don't hold your breath. My advise would be to start with something much less ambitious like an audio spectrum display. You well at least you stand some chance of getting something to work.

Just to add that I worked on an aspect of passive sonar when I worked for the Admiralty Underwater Weapons establishment in the mid 1970s.

electronicsnoob:
I want so much precision that I can generate a traditional 2D Sonar like graphic

Then you'll want to use analog.

Grumpy_Mike:
That is not a very good requirement because that begs the question as to how big the display is. You need to nail it down to numbers.

I think that you need to go much faster in sampling than the minimum of two per cycle because So if you want to see the shape of the returned wave then you have to allow for al the harmonics as well. This only leaves a "flash converter" for your A/D and these are very expensive the last time I looked. They are used in high definition TV digitization. I also tend to think that this puts it outside of the sort of speed you can get from a processor and you are into the realm of using FPGAs, which are another step in complexity and several times more expensive, especially for the lone amateur.
Well don't hold your breath. My advise would be to start with something much less ambitious like an audio spectrum display. You well at least you stand some chance of getting something to work.

Just to add that I worked on an aspect of passive sonar when I worked for the Admiralty Underwater Weapons establishment in the mid 1970s.

Thank you for all the good information. I greatly appreciate that.
The 2d graphic will be around 240p
I don´t want to see the shapes of the waves. I only want to see a line, like in the Picture below.

Well,
I found some Flash ADC´s on DigiKey. They cost around 50€. I need one ADC and one DAC. You´re right, it would be really expensive.

https://www.digikey.com/products/en/integrated-circuits-ics/data-acquisition-analog-to-digital-converters-adc/700?k=&pkeyword=&sv=0&pv153=103710&pv667=39665&sf=0&FV=-8|700%2C348|143047&quantity=&ColumnSort=0&page=1&pageSize=25

electronicsnoob:
Hello,
how many Hertz can I measure with an Arduino over I²C on an ADC with 240 samples per second? I need to measure up to 1.2Mhz for a DIY Sonar. I´m just designing the circuit, and I don´t find ADC´s with 1.2Million Samples per second. I tought I need 1.2Million samples per second to read up to 1.2 Mhz. Am I wrong?

Explain exactly what you want to do, I am sensing an xyproblem here, Sonar's don't usually need frequency measurement, just envelop tracking.

To sample N Hz requires more than 2N samples per second.

As each A:D needs time to settle you'll have a bit of waiting between readings with only 1 A:D.

An ESP32, shameless plug, has 2 A:D units. Each unit can be flip-flopped from measurement to measurement for an increase in measurement speed Analog to Digital Converter - ESP32 - — ESP-IDF Programming Guide latest documentation. The idea then is the possibility of using multiple, external, A:D units on a microController. If, like the ESP32, you had a multi core microController, you could send/receive on one core and signal process on the other core. Using freeRTOS, the built in OS for the ESP32 you'd be able to pass data from core to core.

MarkT:
Explain exactly what you want to do, I am sensing an xyproblem here, Sonar's don't usually need frequency measurement, just envelop tracking.

To sample N Hz requires more than 2N samples per second.

Thank you for the answer, it was already said in this Post:

Grumpy_Mike:
Seeing as the I2C bus runs at 100 KHz, or 400 KHz in the fast version you can not hope to get even one sample per cycle at 1.2MHz.
Yes you need to sample at least twice per sample in order to determine the frequency. And if you want much accuracy on that then you need to sample a lot more than 2 samples per cycle.

But I think I have to go even higher then 2 samples per wave. Maybe 10 to 20 or so, to record signalwaves and display them as not rectangular (if I will display them at all).