Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [frequency]

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

1
vote
2answers
223 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;...
0
votes
1answer
26 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 ...
0
votes
1answer
50 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 ...
0
votes
2answers
32 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. ...
0
votes
1answer
86 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 ...
0
votes
1answer
73 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 ...
0
votes
0answers
26 views

Why does MKRZero code read value off of wire on A0, even though there is no voltage/current? [duplicate]

I have a MKR Zero running the code from the official Arduino site : https://www.arduino.cc/en/Tutorial/AnalogToMidi The circuit wasn't working (always reading a value of 0 on A0 -- as detailed in ...
0
votes
0answers
28 views

What might be some reasons this MKRZero circuit and sketch fail to read frequency?

I've built the following circuit on my MKR Zero I've also uploaded, compiled and deployed the code from the associated article (https://www.arduino.cc/en/Tutorial/AnalogToMidi) with no errors. Note: ...
0
votes
1answer
83 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,...
0
votes
1answer
185 views

Read frequency of input in digital pins

This is a somewhat theoretical question: Let's say I have some sensor that sends digital signals to one of Arduino's digital ports. Now, I don't know the frequency it sends those signals in. For ...
-1
votes
1answer
241 views

Generating Sinusoid Signal of 40khz [closed]

I would like to generate a sinusoidal signal of 40kHz using Arduino Uno. Maximum I could generate was 1kHz, using bit banging, fast PWM. Do you have ideas of how to boost it to 40kHz? I used "...
0
votes
1answer
141 views

Measuring high frequencies (300kHz) with arduino

I'm designing a frequency generator with ICL8038, which would output sine, square and triangle waves, which would reach frequency such as 300kHz. I've already designed a circuit around the ICL8038, ...
0
votes
0answers
1k views

Arduino Due pwm frequency

I've been trying for hours to change the PWM frequency of my Arduino Due to a value between 15kHz...18kHz but nothing worked. I found this manual https://folk.uio.no/jeanra/Microelectronics/...
0
votes
1answer
416 views

Measuring frequency of 3-wire 12V fan on Arduino Uno

I am using a PC 12V fan (40x40mm), which I control speed with voltage (with adjustable power supply). I would like to measure the frequency of the fan with Arduino and read it on serial monitor. I've ...
1
vote
2answers
49 views

How to add prefactor to clock frequency at compile time?

I want to use an Arduino Mega at 8MHz because my power supply is bad and I have only 4.3V (no way I can fix that), which is outside the operation range of the ATMega1280 at 16MHz. I think the right ...
0
votes
1answer
30 views

Where is CLKPR located on Ubuntu 16.04 with Arduino 1.8.3

I would like to see the definition of CLKPR. I guess that similarly to PORTB and other registers, it should be defined by the toolchain? (see Where is PORTB defined? ) Am I right? Where should I look ...
1
vote
1answer
632 views

Arduino Due's clock frequency

I want to change the clock frequency of the Arduino Due. The default value of the main clock, according to the SAM micro-controller, is 4 Mhz. But I found in some forums that it is 84 Mhz. But I need ...
0
votes
0answers
61 views

Getting the frequency from my guitar to output on the Serial Monitor

Does anyone know an easy way for a beginner to get the correct frequency from an analog source (guitar) that is connected to an Arduino? I am using an Arduino Uno and have been trying to get the ...
1
vote
1answer
41 views

Arduino Due custom platform for school and library installation

I have made a custom-development hardware for our school, where you can plug in an Arduino Due. It is mainly for driving all kind of motors and reading sensor signals. Therefore I added a custom SAM ...
1
vote
0answers
15 views

Deceleration time logger between frequencies

i need to measure the air resistance and roll resistance of a vehicle. I plan on using a toothed disc with a proximity sensor which will output a square wave signal in to an arduino. Then I will drive ...
2
votes
2answers
431 views

Can I read two PWM signals and output two square waves on an UNO?

My system requires that I read two independent PWM signals (60hz) and output two corresponding square waves. These output square waves vary in frequency according to their corresponding input duty ...
1
vote
0answers
161 views

How can I configure the RFM95 LoRa module to emit packets at only 'one' particular frequency?

I have created a LoRa gateway using a Pi3; I have used a RFM95 module for it. So, it is a single channel gateway, and I'm operating it at 868.1Mhz. But my LoRa node(also a RFM95, on an Arduino Uno), ...
2
votes
2answers
644 views

Read Audio Data in Real-time over 3.5mm Stereo Cable

My Goal Have Arduino read audio output from a TRS stereo audio cable (coming from a computer, smartphone, etc.). As motivation for this use-case, once some audio data (depending on the sample rate) ...
1
vote
4answers
398 views

Problem with the Frequency meter code

I am trying to build a frequency meter using Interrupts and Timer1, which works as if the system receives an Interrupt it would get the timer's data and would calculate Signal's Frequency = 1 / (...
3
votes
4answers
3k views

Listen for specific frequency

I’m trying to build a custom baby monitor for my wife who is deaf. It needs to detect loud noises and listen for a specific series of tones from a feeding pump our daughter uses. It will then send a ...
4
votes
2answers
158 views

Arduino-based mains frequency monitor follow-up

Following my previous question, I'm getting closer to thinking about putting together this mains frequency monitor. I would just like to do a sanity check on my electronics before I order the ...
1
vote
2answers
3k views

How do i generate exact number of PWM pulses in arduino?

So my code here generates a PWM wave of 38Khz on Port B pin 7 of arduino Mega 2560 . For that I have used a prescaler of 8 and then set the ICR1 register value to 51 . I have also set the WGM10 ,WGM11,...
0
votes
2answers
626 views

How to get 38 Khz clock from Timer 0/2 in Arduino Mega 2560?

I have been trying to generate a PWM wave of 38 Khz (13 microsec= ON period , 13 microsec= OFF period). Currently I am using Timer 0 to generate the PWM wave , however i am confused as to how to ...
5
votes
5answers
394 views

Arduino-based mains frequency monitor

I'm looking to put together a simple mains frequency monitor based on the Arduino platform. The mains here are 250 V @ 50 Hz, but obviously these fluctuate slightly, which is the whole point of the ...
6
votes
1answer
1k views

ATmega AVR frequency measurement with timer/counter

I've been rehashing some existing libraries I found on some obscure forums to measure a frequency on digital pin 5, using the ATmega328P/ATmega2560 Timer/Counter modules and an interrupt based ...
1
vote
2answers
2k views

Generate 1.7 Mhz with PWM in Uno?

I have this code: void setup() { pinMode(11, OUTPUT); TCCR2B = 0; TCNT2 = 0; TCCR2A = _BV(WGM21); TCCR2A |= _BV(COM2A0); OCR2A = 249; } void loop() { soundBuzzer(); } void soundBuzzer(...
1
vote
0answers
339 views

Arduino Audio Recorder - Speed Correct but Wrong Pitch

I'm working on an audio recorder project on an Adafruit Adalogger with SAMD21 ARM-based processor using the Arduino IDE. The desired sampling frequency is 10 kHz, 12-bit resolution with an analog ...
7
votes
4answers
535 views

Programming standalone Atmega328p-PU with NE555N timer IC

I know I may sound a little idiotic to ask, but as I have seen in the internet that to program a standalone Atmel chip like that from of the Arduino's, you need 2 22pF ceramic capacitors and a 16mhz ...
0
votes
1answer
1k views

Playing a pcm file through a speaker with arduino

I'm trying to play an audio file through a speaker with arduino. However, I do not want to use pre-constructed libraries such as the tmrpcm library. I was instructed to perhaps even recreate the ...
0
votes
3answers
1k views

Contoller for a stepper motor

I am currently implementing the following setup: Arduino Mega 2650 -- DRV8834 -- Stepper motor Everything works fine, however since it can provide a higher torque I want to run the stepper in half ...
0
votes
1answer
574 views

Making the speaker play a certain frequency of sound

I'm trying to make the piezo speaker play a sound of certain frequency. However, although I think the code is fine, the sound plays with a frequency between 130 ~160 only, and the frequency actually ...
1
vote
1answer
1k views

Read frequency to voltage with Arduino

How to read frequency into voltage with Arduino with an external source of frequency of 0-1Khz max?
2
votes
2answers
464 views

Arduino audio frequency reader

I have a simple project for my arduino : light some leds when i send a certain frequency from my smartphone through the jack output . For example , I play a simple audio file generated with a ...
0
votes
2answers
1k views

Arduino ATmega 2560 frequency measurement

I would like to measure frequency with an Arduino 2560 board. The approach is to use a timer interrupt set to one second and pin interrupt to count interrupts in one second. The problem I have is ...
0
votes
4answers
465 views

Delay between multiple analogReads

I'm trying to read 4 analog inputs (1kHz speed). I changed the prescaler to 16 for my Arduino Leonardo according to this link. I then tried to read the analog pins and I used the following code to ...
0
votes
0answers
116 views

Does increasing PWM frequency effect on IC temperature

I have an application that requires to increase the PWM frequency. There are some instructions allowing this up to 36,000 hz (have not tried this myself). Has anyone ran the frequency of the Arduino ...
1
vote
0answers
268 views

How to find a clear frequency when use SI4463 [closed]

I use RH_RF24 to control SI4463, and success to send some simple data. But I know maybe there will be disturb . So, I want a way to avoid disturb. First, whether there is a way that choose a best(...
5
votes
4answers
2k views

ArduinoUNO/MEGA, Is there a way to exceed 256 in analogWrite

I am using Arduino UNO/MEGA, I want to analogWrite(pin, val); where the value is 0-1023. How can I make that ? Thanks.
0
votes
3answers
397 views

>=500Mhz microcontroller that works with arduino sketches? [closed]

I'm looking for a decently beefier arduino, but from what I can tell by using google the best I can get is up to 80mhz clock speed. I need something closer to or higher than 500 with more ram, I found ...
1
vote
3answers
2k views

Change Digispark clock speed, run at low voltage?

I have a low voltage (3.2v) application. I was hoping to use the Digispark. I have a solution using a separate Tiny85, but want to use the Digispark USB programming. To run at lower voltage I think ...
1
vote
1answer
768 views

Change from using the external crystal to the internal oscillator

BACKGROUND I have made my own Arduino PCB based on the circuit of the Arduino Pro Mini (below) (including the external oscillator). I have already written the firmware and the code is stable. The ...
0
votes
2answers
5k views

Arduino sound equalizer

I'm trying to build a led equalizer using arduino and I want to light up with the frequencies. And I need a little help on how I should do it cause Im a beginner. Should I use pulsein() or analogin ...
3
votes
3answers
458 views

Ensuring specific frequency at specific time?

I, at the moment am trying to come up with a simple way where I can program an Arduino to provide a step signal with a given frequency, at a specific time. The frequency has to be ramped up, and ...
0
votes
0answers
194 views

Generate the step signal for running a stepper motor

I am trying to make a stepper motor run, not sure what kind of signal I should provide the Step pin of my control board. I read somewhere that a simple PWM would make it move, but it is prefered to ...
1
vote
0answers
472 views

Arduino FFT library - Open Music Labs installation help

I downloaded the zip file of the FFT library from the below link http://wiki.openmusiclabs.com/wiki/ArduinoFFT and it now as I implement the example codes, it gives out a message which says "Error ...