Questions tagged [frequency]

Defines how often something occurs, such as pulses in a digital signal, or oscillations in a radio wave.

Filter by
Sorted by
Tagged with
0 votes
0 answers
20 views

2 independent PWM signals with an ability to change frequency on Arduino UNO R3

I tried to generate 2 independent PWM signals with their inverted signals on Arduino UNO R3. I can change the frequency for just one PWM signal, but the frequency of the second signal is constant at ...
Aya's user avatar
  • 1
0 votes
0 answers
21 views

Tunable 0-5VDC input to Frequency (407-2643 Hz)

I am trying to replace a no longer manufactured volts-to-frequency converter that is part of a simulator we use for training. I understand reading the Analog pin and converting it to VDC, then I have ...
Scott Kozokas's user avatar
1 vote
0 answers
37 views

Using I2S MEMS microphone breakout (SPH0645) as frequency detector

Good day. I would like to ask for help regarding the code for my project. I am using an I2S MEMS microphone breakout (SPH0645) to my Arduino Nano 33 IoT. Here are my pin configurations LRCL to A2 of ...
niwran gaming's user avatar
0 votes
1 answer
26 views

Frequency problems with DIY arduino and resonator

I made a simple music program using an arduino Uno and the tone() function. It works fine. I decided to build my own circuit using a barebones AVR and upload that program. I did not know exactly what ...
user1584421's user avatar
  • 1,385
2 votes
2 answers
152 views

Tone() generates a high pitched sound when button is released

I have a simple circuit that makes use of the tone() function to produce some sounds. I also have a button, hooked with an interrupt function, that whenever is pressed, a variable changes. Sometimes, ...
user1584421's user avatar
  • 1,385
-1 votes
2 answers
98 views

Arduino 75kHz output frequency setup

i don't know how to manipulate arduino uno or mega registers and timers to be close to 75kHz output frequency. Could you help please ?
Teddol's user avatar
  • 85
1 vote
2 answers
1k views

Changing Frequency of PWM Pin on Arduino Uno

I am trying to change the frequency of the PWM output from an Arduino Uno R3 (Been using Pin 9) to 200 Hz with a duty cycle of 20%. This is for an ESC that is connected to a 12V motor, and I know the ...
wroex24's user avatar
  • 13
-1 votes
1 answer
81 views

Generate a sine wave with a predefined frequency and amplitude via DAC0 or DAC1 with Arduino Due

Good Morning to everyone, I am a PhD Student in experimental fluid mechanics at the University of Naples "Federico II", Italy. I am working on Arduino Due card and i am novel in applications ...
AlessandroScala's user avatar
-1 votes
1 answer
81 views

Getting more Hz while working with 3 serial ports (IMU sensors)

im doing a university project where we use 2 IMU sensors and a SD card reader to save the data from sensors. As you will probably see from the code, we specify the sensor port we listen to, save data ...
Aivion2000's user avatar
1 vote
0 answers
71 views

Help in Frequency Conversion in ArduinoRP2040

Having a bit of a problem with the Arduino Nano RP2040. I'm trying to use the onboard microphone to read the frequency of a sound and then use that variable for calculations. However, while I can get ...
jay4567's user avatar
  • 11
-1 votes
1 answer
197 views

What is the minimum sampling rate in ADC in Arduino due?

I am looking for a very low frequency application like below 300Hz. What is the minimum sampling rate in Arduino due? I am very new to this. I see in the datasheet that max sampling rate is 20MHz.
Nimasha Pilippange's user avatar
0 votes
1 answer
144 views

How to get started with writing code for a Hall Effect sensor?

One of my biggest questions concerns coding a Hall effect sensor to find wheel speed with an arduino mega. I’ve got an lcd in digital pins(7,8,9,10,11,12) and a Hall effect sensor in digital pin 2. I ...
Aarav Shah's user avatar
-1 votes
1 answer
31 views

Synchronizing an internal frequency to an external one

In this question: Procedure for changing frequency of Nano or similar, @EdgarBonet gave a very nice method of generating timings that don't divide the system clock evenly. He also said that it would ...
Jim Mack's user avatar
  • 237
0 votes
1 answer
160 views

Procedure for changing frequency of Nano or similar

I need to get interrupts at one of three specific rates: 1920, 2000, and 2400 per sec, at a fairly high precision (~10 ppm). I've asked about this on Electronics but I think here might be more ...
Jim Mack's user avatar
  • 237
0 votes
1 answer
161 views

Arduino, generating smaller frequency than 31Hz

I'm controlling a car instrument panel with Arduino using the tone() function, however with Arduino Uno's minimum 31Hz frequency I can only set the speedometer at ~12mph or more. I'd like to be able ...
Piotr's user avatar
  • 3
2 votes
1 answer
776 views

ATMega4809 via Nano Every marked as 20Mhz, but does this confirm it is actually at 16Mhz?

If you go to the official Arduino Nano Every page and click the Tech Specs tab, you'll see that it lists it as running at 20Mhz. Turn On Verbose Compile However, if you go into the Arduino IDE and go ...
raddevus's user avatar
  • 402
10 votes
1 answer
2k views

Why is our refresh rate consistently decreasing in logging on SD card?

The current code is used to gather the state of 12 infrared beams and log them to an SD card using the real time clock to mark the time. The code uses a switch to turn the device on and off and an LED ...
JClark's user avatar
  • 103
1 vote
0 answers
254 views

FG Frequency output

I have bought the Brushless DC-Flat Motors Series 2610 and Pin number 6 is called FG which is defined as frequency output. I have plugged this pin into the Arduino in A0 and I have tried displaying ...
Ahmed Abdulla's user avatar
1 vote
0 answers
138 views

Changing frequency by button press

I have to up the frequency by 100 hz by button press for upto 1khz; I am stuck on using the debounce source code. The problem is every time I press button the value for "i" goes to random ...
Hermen Chavez's user avatar
2 votes
1 answer
316 views

analogRead() doesn't read more than 500Hz

I connected a wave generator to the analog pins to read the frequencies of the waves generated. I used different frequencies of sine waves with a minimum of 0V and maximum of 5V. Whenever the voltage ...
Omar Ali's user avatar
  • 121
1 vote
2 answers
1k views

What is the maximum frequency input signal that I can accurately track on a GPIO pin?

This all started with me wanting to use an Arduino to make a tachometer. This is all now working fine, but it got me wondering what the highest frequency digital signal that I could read? So I built a ...
Rob W's user avatar
  • 138
1 vote
1 answer
167 views

Time signal. Determine the presence of pulses and their duration [closed]

I want to detect the exact time signal from an FM radio station. The signal is transmitted in the form of 5 short pulses and one long one. My task is to determine the presence of a pulse in the audio ...
Антон's user avatar
7 votes
6 answers
5k views

Is it possible to generate an exact 15 kHz clock pulse using an Arduino?

I want to generate a 15 kHz pulse with an Arduino using Timer1, but the problem is that if we want a 15000 Hz clock we need to initialize the timer with 1/15000 seconds or 66.66 microseconds, but we ...
astrick's user avatar
  • 93
3 votes
3 answers
186 views

Recognize peak in specific frequency area

I am wondering if it is possible to attach a microphone to an Arduino board and make the Arduino recognize a volume peak in a specific range of frequencies. I want it to detect a specific peak (for ...
Jacobus's user avatar
  • 31
1 vote
1 answer
108 views

How the light brightness stays constant when we increase the frequency of stroboscope

Well I am trying to make a Stroboscop. I found this code at blow: and tried. It works normally. But if I increase the RPM so decrease the "strobeDelay" time, the brightness of the LEDs goes ...
mehmet's user avatar
  • 277
1 vote
0 answers
484 views

How to change the update rate in TinyGPS++?

I am working with TinyGPS++ library and Arduino-nano and I want to change the update rate. I worked before with Adafruit GPS and uses the below code for updating it. // Set the update rate GPS....
Krupali Mistry's user avatar
3 votes
2 answers
2k views

Generate 1khz square signal with Arduino Mega

I want to generate a 1khz square signal with an Arduino Mega. I have read the MCU contains several timers. What i want to do is to configure one of this timers. My first question is: Is there a way to ...
Bob5421's user avatar
  • 141
3 votes
1 answer
283 views

Measure audio frequency through pulse duration

Hello dear StackExchange users, i want to develop an Infrared blaster which i can plug into the headphone jack of a phone or console of choice. In order to communicate what frequency to modulate the ...
MyFairJulie's user avatar
2 votes
0 answers
608 views

1.7 MHz generator for a water atomizer

I'm creating a controller for a small greenhouse, I have a DHT22 for measuring and two relay module that controls heating and cooling systems, and I will use a piezo to produce humidity when it goes ...
Edgard's user avatar
  • 21
0 votes
1 answer
1k views

How to run atmega328p at 8, 4 and 1 mhz?

Instead of using the regular Arduino board I have purchased the atmega328p-pu along with this components: 22pf ceramic capacitor 10K resistor 16mhz crystal 47uF capacitor 3.3 Volts Power supply The ...
Tono Nam's user avatar
  • 938
0 votes
2 answers
334 views

How can arduino read a frequency higher than 16Mhz?

I will like to understand how does Arduino measure a frequency. Also how does my voltmeter can measure a frequency as well. Since I am a beginner on using microcontroler I would read a frequency like ...
Tono Nam's user avatar
  • 938
0 votes
1 answer
432 views

Fading LED with different frequencies

I have a potentiometer attached to one analog port of arduino (assume A0) I'm reading the value of that using input_voltage = analogRead (A0); which is a value between 0-1023. So I want to map this ...
Ramtin's user avatar
  • 3
1 vote
2 answers
225 views

Clock frequency VS cycle time

I am considering switching from Arduino Pro Mini 5V 16MHz to Arduino Pro Mini 3.3V 8Mhz for some project because I would like to run it with a 4.5V input power. Will the switch from 16 to 8Mhz double ...
Altaris's user avatar
  • 13
0 votes
1 answer
53 views

Will an Arduino UNO operating at 16mHz communicate with UART / I2C with an STM32 operating at a different frequency?

I plan to connect Arduino UNO via I2C / UART with a controller based on STM32F334K8T6, whose frequency will be about 20mHz or higher. Tell me, does the difference in clock frequencies of ...
Delta's user avatar
  • 263
0 votes
0 answers
84 views

Frequency Doesn't increase when Button Is Pressed

I’m trying to output a frequency that can be increased and decreased by using 2 buttons. I’m trying to first of all configure the first button (which increases the frequency). I’m trying to also add ...
Neamus's user avatar
  • 115
1 vote
1 answer
342 views

Timer 1 Arduino - Create 2 Timers

I’m trying to output 2 separate frequencies using 2 output pins from an Arduino using the Timer 1 library. A snippet of the code is show below. void setup() { Serial.begin(9600); pinMode(button,...
Neamus's user avatar
  • 115
0 votes
1 answer
3k views

Trouble with setting the PWM frequency for Arduino Due

I'm using Arduino Due and I set the analog read and write resolution to 12-bit for better resolution. Basically all I do is to vary PWM duty cycle by controlling analog DC input voltage from 0 to 3.3V....
user16307's user avatar
  • 237
0 votes
1 answer
3k views

ESP 32 changing frequency instead of duty cycle

Using this code on an esp32 allow to vary duty cycle of the PWM with a fixed 5000Hz frequency and is working fine. My question is how to vary frequency and keep duty cycle on a fixed value? // the ...
lucian_v's user avatar
0 votes
1 answer
324 views

Writing Data through Pin at certain frequency

I have an Arduino UNO which is connected to an KLZ25 board, the Arduino sends an 1MHz Clock at Pin 9 and now I should write the PDM-Data with 1 Mhz at pin 8. But i don't know how to write with such a ...
FoldFence's user avatar
  • 103
0 votes
1 answer
407 views

6 channel PWM with 2 - 5 kHz frequency

Is it possible to set all 6 PWM frequencies to a value between 2 and 5 kHz? I've read that the base frequency for pins pins 5 and 6 is 62500 Hz. And the divisors for the pins 5 and 6 are only this ...
Wa Kai's user avatar
  • 111
2 votes
0 answers
817 views

Measuring Amplitude/Frequency of sound

I need to read an analog signal at about 500-1000Hz for at least 5 seconds. I've a battery powered microphone wired into an analog and ground pin on my arduino and am trying to measure the frequency ...
zueses's user avatar
  • 21
0 votes
1 answer
459 views

making power harmonics analyser which will measure the amplitudes of the fundamental and its multiples (like 50hz, 100hz, 150hz,200 hz,...) there are)

i have been intendng to make a power frequency harmonics analyser which will measure the amplitudes of the fundamental and its multiples (like 50hz, 100hz, 150hz,200 hz,...) there are examples for ...
Melvin Thomas's user avatar
1 vote
0 answers
220 views

Sketch works on MEGA 2560 timer2, but does not work on timer1

I set the PWM frequency on MEGA 2560 like this: TCCR2A = 0; TCCR2B = 0; TCNT2 = 0; TCCR2A = _BV(COM2A1) | _BV(COM2B1) | _BV(WGM20); ...
laoadam's user avatar
  • 45
2 votes
2 answers
436 views

Generated frequency is not as expected

This code sets a pin HIGH for 1 microsecond and then LOW for 1 microsecond. The expected frequency should be about 500 kHz. When measuring the output the frequency is about 96.4khz. Why ? int del = 1;...
deadpixel's user avatar
0 votes
1 answer
535 views

Turn infrared LED on and off in order to simulate an infrared signal

Note I am able to send and recieve IR signals. This question is only for purposes of learning. When using the existing library #include <IRremote.h> it is very simple to read and transmit ...
Tono Nam's user avatar
  • 938
1 vote
1 answer
269 views

Can I use arduino to generate 8mhz frequency ultrasonic pulses in piezo discs?

void setup() { pinMode(freqOutputPin, OUTPUT); Serial.begin(9600); // Set Timer 2 CTC mode with no prescaling. OC2A toggles on compare match // // WGM22:0 = 010: CTC Mode, toggle ...
Danish's user avatar
  • 15
0 votes
2 answers
291 views

How can I calculate approximate cycles per second from pulsed pin on Arduino MKR Zero?

The relevant tech specs for a MKR Zero are: 32.768 kHz (RTC*), 48 MHz *Real-Time Clock What I'm curious about is how I might do an approximate calculation of cycles per second from operations. ...
raddevus's user avatar
  • 402
0 votes
1 answer
3k views

Changing PWM on Arduino Mega, pins 9 & 10 to 20 to 25 KHz

I'm trying to run a Nema 17 motor with a l298N motor Driver for a school project. The issue is that I am running the motor with PWM to avoid overheating of the driver, however the resulting noise at ...
Jordan Gladstone's user avatar
0 votes
1 answer
1k views

More than 4 PWM output at 25khz?

Is it possible using an arduino to control more than 4 PWM fan at 25khz ? I have found this but 4 PWM limited with an UNO https://arduino.stackovernet.com/fr/q/8407 An other arduino, like a 2560 ...
Seb Lemania's user avatar
0 votes
1 answer
1k views

How to increase the volume in speaker using talkie library in arduino uno...?

What else should I add to this code to increase the volume..?? #include "talkie.h" Talkie voice; const int8_t speech[] PROGMEM= {0x00,0x00,0x00,0x08,0xd8,0x39,0x54,0x00,0xa7,0xa6,0x32,0xe0, 0x04,...
user49463's user avatar