Simple STM32 Frequency meter from 1Hz to 30 MHz (Arduino IDE)
HTML-код
- Опубликовано: 13 сен 2024
- This project is sponsored by PCBWAY www.pcbway.com...
A frequency meter, also known as a frequency counter, is a device or instrument used to measure the frequency of an oscillating signal. This time the frequency meter uses an inexpensive STM32 microcontroller and this time, thanks to his better perfomances of the MCU, the frequency range is from 0 to 30 MHz, and therefore it is ideal for use in HF radio devices .
The device is really simple to build and consists of several components
- STM32F103C6 or STM32F103C8 microcontroller board
- 8 Digit 7 Seg Display module
- and one 100nF capacitor
This is an incredibly inexpensive measuring device, the total cost of which does not exceed a few dollars, and is an indispensable instrument in any laboratory.
Detailed instructions, schematic, and code at:
www.hackster.i...
Chapters:
0:08 Short Demo
1:34 Description
2:52 STM32 microcontroller
3:22 Inside
4:00 Demonstration Reactangular sig.
6:27 Demonstration Sinusoidal signal
7:27 Conclusion
If you like my job buy me a coffee: ko-fi.com/mircemk
Visit my RUclips Channel for more Projects , DIY and How To Make videos:
/ mirkopavleskimk
by mircemk
SUBSCRIBE LIKE AND SHARE !!!!
Thanks for your Support !
#Arduino #STM32 #counter #electronics #PCBWay
Love your ideas of making inexpensive measurement equipment for hobbyists!
I understand the signal goes to an input pin, but then what happens inside?
For example, to measure frequency, common techniques would be:
1a) Configure free-running timer, and whenever a transition is detected, the ISR code would read the timer's counter to compute the frequency
1b) Configure Input-Timer Capture, where the timer value is latched when an edge is detected. The Isr code would read the timer's latched value to compute frequency
2) Configure a timer for a specific period of time, and count the number of ISR interrupts due to edge transitions that occur during that time to compute frequency
Some STM32 have pins that can be configured for "External Clock Input" Input, where the hardware peripheral, automatically counts the number of transitions on the line! There's a post "External TRigger for TIMER 3" that even shows how a non-ETR pin (ex. CH3) can be used by as the input to the Slave Mode Controller (TIMx_CCMR1=1) by selecting the XOR of CH1,2,3 as the TI1 source (TIMx_CR2.TI1S = 1). However, I assume you still need a precise timer running to interrupt and see how many transitions were counted during that time?
FYI,
If you set the ETR prescaler to divide by 8, it counts up to 240MHz.
This is done by changing the SMCR register value:
TIMER2_BASE->SMCR = (1
excellent
cool project .. can this be done with "OLED Display Module 128X64 " ?!
😎 cool
Do you have a video to build that frequency generator your using with the display?
ruclips.net/video/KSovEpCmWY0/видео.html
Everything MCU'd nowadays... You can do it with some decade counters, an inverter buffer and a crystal for far cheaper and simpler.
Maybe so, but making it would be much more complicated
I would argue about "cheaper"
Excelente trabajo. Gracias!!!