Skip to main content

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
1 answer
4k 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
1 answer
492 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 ...
0 votes
1 answer
2k views

How to change input pin of FreqCounter Arduino Uno/Dumilanove library?

The following link to the library defines arduino pin 5 for input pin for signal. https://www.pjrc.com/teensy/td_libs_FreqCount.html But the problem is I'm using an 16x2 LCD display with the ...
1 vote
0 answers
247 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); ...
1 vote
1 answer
279 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
2 answers
306 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
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 ...
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,...
2 votes
1 answer
110 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 ...
2 votes
3 answers
4k 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 ...
2 votes
2 answers
7k views

Building an adjustable low frequency PWM controller with Arduino

I am looking for a way to create an adjustable PWM controller capable of modulation frequency from 0-100 (more preferably 0-1000) Hz, duty cycle from 0-100%, and able to accept a voltage range of 5-...
-1 votes
1 answer
1k 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
1 answer
2k 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, ...
1 vote
1 answer
2k 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 ...
2 votes
3 answers
3k 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
1 answer
2k views

Difference in bootloader of ATmega with 16MHz external crystal and 8MHz external crystal

I have used your bootloader for ATmega2560-16AU with 16MHz external crystal and it works like a wonder. In my new project I have a 3V power supply. Therefore, I am planning to use a low frequency ...
0 votes
1 answer
3k 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
2 answers
180 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
1 answer
93 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 ...
2 votes
2 answers
7k 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,...
2 votes
0 answers
19 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 ...
6 votes
5 answers
951 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 ...
1 vote
2 answers
2k 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) ...
2 votes
2 answers
1k 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 ...
2 votes
0 answers
267 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
2 answers
7k views

Sets of Ultrasonic frequencies using arduino uno

Is it possible to create a set of ultrasonics frequencies using only the Arduino? What code to be used? And how am I going to do for it to work? For this project I need to focus in the emitter side; ...
1 vote
4 answers
871 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 / (...
5 votes
4 answers
7k 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 ...
2 votes
1 answer
291 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
2 answers
2k 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
1 answer
4k 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
1 answer
3k 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?
6 votes
4 answers
938 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 ...
2 votes
2 answers
2k views

How can I set 4 Arduino Leonardo PWM-ports between 200Hz and 1kHz?

I've noticed that I can set D9, D10, and D11 to around the timer 1 can be set to ~244Hz. However I need 4 ports that are between 200-1000Hz but I have been unable to figure out how to find the last ...
0 votes
1 answer
3k 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
1 answer
1k 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 ...
2 votes
2 answers
891 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 ...
1 vote
2 answers
2k 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 ...
1 vote
3 answers
10k views

High Frequency Sine Wave Generation

I'm new to the world of Arduino and I'm working on a wireless charging project that needs a 5.7MHz sine wave. I've tried using a Due and changing the PWM and DAC, but I can't get a clean sine wave at ...
4 votes
4 answers
5k 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
1 answer
2k 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
2 answers
9k 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
3 answers
894 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 ...
1 vote
3 answers
885 views

FreqMeasure.h uncompatible with my code problem

I have written code to read temperatures on a motor which also has pulse feedback to see speed, (one hall sensor) and my previous version of the code does work fine, however when i add example ...
2 votes
0 answers
713 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 ...
2 votes
1 answer
981 views

Strobe Frequency Calculation, how its done?

I'm using the Arduino sketch for LED stroboscope found here: http://mehax.blogspot.co.uk/2011/02/arduino-stroboscope.html. Also below, I've inserted the loop part where this calculations are made: ...
0 votes
3 answers
642 views

Frequency generator

Can arduino generate the frequency with the resolution of 2 decimal places? i.e. 100.12 Hz, 98.23Hz, 1.92Hz... recently I need to generate a frequency to allow a stepper motor to move accordingly. ...
1 vote
1 answer
2k views

Pin toggle speed

If I use direct port manipulation, what is the average number of clock cycles it takes to flip a pin on the arduino ie. void loop(){ PORTB |= 0b00010000; PORTB &= ~0b00010000; } So how ...
0 votes
1 answer
376 views

Will Arduino Pro Mini 3.3V run at half the speed of 5V version?

Provided a very simple sketch like this: void loop() { digitalWrite(1, !digitalRead(1)); } ... should I expect 5V Arduino to run twice as fast as 3.3V, or are there some internal adjustments in ...
-1 votes
1 answer
3k views

Arduino Uno & Simulink - high frequency pulses

I'm trying to control a large stepper motor with high frequency pulses (eventually around 4kHz), but what I get out of the simulink scope is super different from what the Arduino is putting out. I'm ...