Maker Pro
Maker Pro

Measuring magnitude and phase in an RC circuit

coilin_wilson

Apr 29, 2017
2
Joined
Apr 29, 2017
Messages
2
Hi everyone,

I was given a project to do by my professor to measure the magnitude and phase of an RC circuit (1 resistor, 1 capacitor) through the Arduino Uno IDE. I am just new to Arduino and I hoping someone could point me in the right direction.

Thanks,
Coilin
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
12,608
Joined
Nov 17, 2011
Messages
12,608
What kind of RC circuit (low pass, high pass)?
What have you done so far to tackle this task?
What does your circuit look like?
Which are your ideas how to proceed?
What frequency range? You are aware that magnitude and phase of an RC filter are frequency dependend, aren't you?
 

coilin_wilson

Apr 29, 2017
2
Joined
Apr 29, 2017
Messages
2
What kind of RC circuit (low pass, high pass)?
What have you done so far to tackle this task?
What does your circuit look like?
Which are your ideas how to proceed?
What frequency range? You are aware that magnitude and phase of an RC filter are frequency dependend, aren't you?

Hi Harald,

Thanks for your reply,

It is a low pass filter,

So far I have made calculations and used Multisim to confirm my answers to make sure they are correct.

The circuit is just 1 resistor, 1 capacitor built on breadboard that will be programmed and powered through Arduino Uno.

I was wondering if there was a program available to do this project or if not what way I should do it.

From 0Hz to 10kHz

Thnaks,
Coilin
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
12,608
Joined
Nov 17, 2011
Messages
12,608
I was wondering if there was a program available to do this project or if not what way I should do it.
I think you should develop that program as part of the task.

As usual there is not on ebest way to do this, there are several ways. Do you use an external waveform generator? Note that you cannot use the areduino's analogwrite function here as it outputs pwm at a frequency of ~500 Hz or 1000 Hz, depending on the specific arduino.

I see an issue with the frequency range: The arduino takes about 100µs to read an analog input which limits the sample rate to approx. 10 ksamples/second. To sample a 10 kHz signal you'd need at least 20 kHz (or more) to fulfill the Nyquist-Shannon theorem. The arduino thus limits your measurements to 5r kHz or less.
 
Top