• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Circuit Ideas for You

Get free circuit ideas online.

  • Home
  • Privacy Policy
  • About
Home » Arduino Sine Wave Output Circuit with RC Filter

Arduino Sine Wave Output Circuit with RC Filter

Last updated on 2 July 2026 by Admin-Lavi Leave a Comment

This project show how to make simple Arduino sine wave circuit with RC filter; as Arduino cannot give real analog output, but it only gives PWM signal.

So we use low pass RC filter to change PWM into smooth sine wave; also two potentiometer control amplitude and frequency, therefore, this circuit is very easy and good for small experiment.

Low Pass RC Filter Blocking High Frequency PWM:

Graph showing how RC filter removes high-frequency components:

Gain
1.0 |---------\
0.8 |          \
0.6 |           \
0.4 |            \_____
0.2 |                  \______
0.0 |_____________________________→ Frequency
                 fc

fc is cutoff frequency = 1 / (2 × pi × R × C)

Arduino Code:

#include <Arduino.h>

int ampPin = A0;
int freqPin = A1;
int pwmPin = 11;

float angle = 0.0;

void setup() {
pinMode(pwmPin, OUTPUT);
}

void loop() {
int ampRead = analogRead(ampPin);
int freqRead = analogRead(freqPin);

float amplitude = map(ampRead, 0, 1023, 0, 255);
float frequency = map(freqRead, 0, 1023, 1, 50);

float sineValue = sin(angle) * amplitude + amplitude;
int pwmValue = constrain(sineValue, 0, 255);

analogWrite(pwmPin, pwmValue);

angle += 0.02 * frequency;
if (angle > 6.28) angle = 0;
}

Circuit Working:

Arduino Sine Wave Output Circuit Diagram with RC Filter

Parts List:

ComponentsValuesQuantity
Resistors2.2k1
Potentiometer 10k2
CapacitorCeramic 100nF1
SemiconductorArduino Uno1

This circuit show how to make simple sine wave using Arduino and we can change sine wave frequency and amplitude very easily.

Arduino pin 11 give PWM signal out and then this PWM value keep changing like sine shape and this also make digital sine form.

Then R1 with capacitor C1 make low pass filter and then filter remove fast PWM and give smooth analog sine.

After that, potentiometer VR1 control amplitude going to A0 and potentiometer VR2 control frequency going to A1 and then finally, Arduino read both values and change the output signal.

Formula with Calculation:

Low pass filter cutoff frequency formula:

fc = 1 / (2 × pi × R × C)

here,

  • R is 2.2k
  • C is 100nF

fc = 1 / (2 × 3.14 × 2200 × 0.0000001)
fc = 1 / (1.38 × 0.00022)
fc = 723 Hz

Hence, this is enough to smooth PWM around 31kHz of Arduino.

How to Build:

To build a Arduino Sine Wave Output Circuit with RC Filter following are the steps to follow:

  • First, collect all parts same like circuit diagram.
  • Next, Arduino A0 go to center pin of amplitude potentiometer VR1, other two pins go to 5V and GND.
  • Then Arduino A1 go to center pin of frequency potentiometer VR2, other two pins go to 5V and GND.
  • After that, Arduino pin 11 connect to resistor R1 2.2k and other side of R1 connect to capacitor C1 100n and other leg of capacitor go to GND.
  • Now point between R1 and C1 is final sine wave output and also be sure all grounds connect together.

Conclusion:

To conclude, this Arduino Sine Wave Output Circuit with RC Filter is easy way to make smooth sine signal, as this signal is not perfect like real DAC but good for hobby and audio demo.

Also, two potentiometer knobs give easy control for amplitude and frequency; further, the circuit is easy to build and good for beginners.

Filed Under: Arduino Projects, DIY Projects, Mini Projects

About Admin-Lavi

Lavi is a B.Tech electronics engineer with a passion for designing new electronic circuits. Do you have questions regarding the circuit diagrams presented on this blog? Feel free to comment and solve your queries with quick replies

Previous Post: « 7812 Based 12 Volt DC Power Supply Circuit
Next Post: Simple 12V Battery Charger Circuit using TIP41 Transistor »

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar




Categories

  • 555 Timer Projects (137)
  • Alarm Circuits (81)
  • Amplifier Circuits (94)
  • Arduino Projects (103)
  • Audio Circuits (190)
  • Automation Circuits (150)
  • Automobile Circuits (40)
  • Battery Charger Circuits (89)
  • DIY Projects (437)
  • Free Energy (12)
  • Heater and Temperature Controllers (32)
  • High Voltage (24)
  • Hobby Circuits (244)
  • Indicator Circuits (63)
  • Inverter Circuits (17)
  • IoT projects (12)
  • LDR Circuits (47)
  • LED and Lamps (201)
  • Meters and Testers (44)
  • Mini Projects (392)
  • Motor Controllers (26)
  • Oscillator Circuits (70)
  • Power Supply Circuits (245)
  • Radio Frequency (8)
  • Remote Control Circuits (12)
  • Renewable energy (20)
  • Security and Protection (128)
  • Sensors and Detectors (236)
  • Solar Circuits (31)
  • Timer Circuits (63)
  • Transistor Circuits (178)
  • Transmitter Circuit (19)
  • Tutorials (33)
  • Voltage Regulator (67)
  • Water Level Controller (10)

Recent Posts

  • Low Current Controlled Battery Charger Circuit using LM723 IC
  • 741 Op-Amp Treble Booster Circuit
  • Simple Diode and Transistor Based Audio Limiter Circuit
  • Simple 500mW Speaker Driver Circuit
  • Easy DIY LM386 Audio Amplifier Circuit

Recent Comments

  1. Admin-Lavi on High Voltage Fence Charger Circuit
  2. etere on High Voltage Fence Charger Circuit
  3. Admin-Lavi on High Voltage Fence Charger Circuit
  4. egidio grzinic on High Voltage Fence Charger Circuit
  5. Logic OR Gate Circuit using Transistors - Circuit Ideas for You on Automatic Street Light Circuit using LDR

Copyright © 2026 | New Circuit Ideas