Arduino Uno R4 WiFi DAC Signal Generator – Sine, Square, Triangle With LED Matrix

by RonFrtek in Circuits > Arduino

560 Views, 1 Favorites, 0 Comments

Arduino Uno R4 WiFi DAC Signal Generator – Sine, Square, Triangle With LED Matrix

Arduino Uno R4 WiFi DAC Signal Generator – Sine, Square, Triangle With LED Matrix

In this tutorial, we’ll use the Arduino Uno R4 WiFi’s built-in DAC and LED Matrix to build a simple signal generator capable of producing sine, square, and triangle waves.

The built-in DAC (Digital-to-Analog Converter) is used to generate the analog waveforms directly from the board. The DAC on the Arduino Uno R4 WiFi provides 12-bit resolution (0–4095 levels) and outputs an analog voltage from 0V up to approximately 3.3V, allowing smooth waveform generation.

A rotary encoder is used to change the output frequency, while pressing the encoder button switches between the different waveform types.

The currently selected waveform is shown as an icon on the LED matrix, and when the encoder is rotated, the selected frequency value is displayed so you can easily adjust the signal in real time.

This project demonstrates how to create a compact waveform generator using the Arduino Uno R4 WiFi, combining the DAC output, rotary encoder input, and the onboard LED matrix display.

The result is a small interactive signal generator capable of generating sine, square, and triangle waves with adjustable frequency while providing visual feedback directly on the board.

Note: The project uses the built-in DAC and LED matrix of the Arduino Uno R4 WiFi, so only a rotary encoder is required as external hardware.

Watch the Video!


You can download the Visuino file below.


What You Will Need

UNO R4.jpg
Encoder.jpg
VisuinoAdvrtisemen_ArduinoUNO_Q.jpg
jumper-wires.jpg
breadboard.png
osciloscope5.png
  1. Arduino UNO R4 Wifi
  2. Rotarry Encoder
  3. Breadboard
  4. Jumper wires
  5. Oscilloscope (Optional to see the output signal)
  6. Visuino program: Download Visuino


The Circuit

2026-03-18_15-49-30.jpg

🔄 Rotary Encoder Module Connections

  1. Connect Encoder pin [CLK] to Arduino pin [3]
  2. Connect Encoder pin [DT] to Arduino pin [4]
  3. Connect Encoder pin [SW] to Arduino pin [2]
  4. Connect Encoder pin [+ (VCC)] to Arduino pin [5V]
  5. Connect Encoder pin [GND] to Arduino pin [GND]

🔌 Signal Output Connections

  1. Connect Arduino pin [A0] to oscilloscope Signal pin (probe)
  2. Connect pin [GND] to oscilloscope GND (probe)

Start Visuino, and Select the Arduino UNO R4 WiFi Board Type

select-board-uno.jpg
FH3YDQCMK38UXKS.jpg

Start Visuino as shown in the first picture Click on the "Tools" button on the Arduino component (Picture 1) in Visuino When the dialog appears, select "Arduino UNO R4 WiFi" as shown on Picture 2

In Visuino Add Components

2026-03-06_11-32-37.jpg
2026-03-06_11-28-12.jpg
2026-03-06_11-27-21.jpg
2026-03-06_11-24-21.jpg
2026-03-06_11-33-55.jpg
2026-03-06_11-35-23.jpg
2026-03-06_11-36-31.jpg
2026-03-06_11-38-51.jpg
2026-03-06_11-39-45.jpg
  1. Add "Rotary Encoder Sensor" component
  2. Add "Integer To Analog" component
  3. Add "Sine Analog Generator" component
  4. Add "Square Analog Generator" component
  5. Add "Triangle Analog Generator" component
  6. Add "Analog Mux(Multi channel Switch)" component
  7. Add "Debounce Button" component
  8. Add "Counter" component
  9. Add "Clock Demux(Multiple Output channel Switch)" component

In Visuino Set Display

sine_wave.png
square_wave.png
triangle_wave.png
2026-03-11_14-06-47.jpg
2026-03-11_14-09-33.jpg
2026-03-11_14-11-07.jpg
2026-03-11_14-11-27.jpg
2026-03-11_14-11-49.jpg
2026-03-11_14-40-14.jpg
2026-03-11_14-40-32.jpg
  1. Select Arduino UNO R4 WiFi and in the properties Modules > Display > Orientation set to goDown
  2. Select Arduino UNO R4 WiFi and in the properties Modules > Display > Elements click on the 3 dots and in the Elements window:
  3. Drag "Fill Screen" to the left side
  4. Drag "Text Field" to the left side and in the properties window select "Elements" and click on the 3 dots button, In the Elements window drag "Font" to the left side and in the properties window set "Font" to Adafruit\Picopixel

Close this Elements window

  1. And drag in the main Elements window drag "Draw Bitmap" to the left side and in the properties window load Sine_wave.png
  2. drag another "Draw Bitmap" to the left side and in the properties window load Square_wave.png
  3. drag another "Draw Bitmap" to the left side and in the properties window loadTriangle_wave.png

In Visuino Set Components

2026-03-06_14-20-49.jpg
2026-03-06_14-21-08.jpg
2026-03-06_14-22-08.jpg
2026-03-06_14-21-47.jpg
2026-03-06_15-03-54.jpg
2026-03-13_19-25-40.jpg
  1. Select "RotaryEncoderSensor1" and in the properties set "Max" > "Value" to 100, and "Roll Over" to False
  2. Select "RotaryEncoderSensor1" and in the properties set "Min" > "Value" to 0, and "Roll Over" to False
  3. Select "SineAnalogGenerator1" and in the properties select "Frequency" and click on the pin icon and select "Float Sink Pin"
  4. Select "SquareAnalogGenerator1" and in the properties select "Frequency" and click on the pin icon and select "Float Sink Pin"
  5. Select "TriangleAnalogGenerator1" and in the properties select "Frequency" and click on the pin icon and select "Float Sink Pin"
  6. Select "Counter1" and in the properties set "Max" > "Value" to 2
  7. Select "Counter1" and in the properties set "Min" > "Value" to 0
  8. Select "Mux1" and in the properties window set "Input Pins" to 3
  9. Select "MultiSource1" and in the properties window set "Input Pins" to 4
  10. Select "ClockDemmux1" and in the properties window set "Input Pins" to 3

In Visuino Connect Components

2026-03-13_19-08-25.jpg
ArduinoR4-Sig-Gen.png
  1. Connect Counter1 pin [Out] to MultiSource1 pin [In]
  2. Connect MultiSource1 pin [0] to Mux1 pin [Select]
  3. Connect MultiSource1 pin [1] to Arduino > Display > Fill Screen1 pin [Clock]
  4. Connect MultiSource1 pin [2] to ClockDemux1 pin [Select]
  5. Connect MultiSource1 pin [3] to ClockDemux1 pin [In]


  1. Connect ClockDemux1 pin [Output 0] to Arduino > Display > Draw Bitmap1 pin [Clock]
  2. Connect ClockDemux1 pin [Output 1] to Arduino > Display > Draw Bitmap2 pin [Clock]
  3. Connect ClockDemux1 pin [Output 2] to Arduino > Display > Draw Bitmap3 pin [Clock]


  1. Connect Mux1 pin [Out] to Arduino DAC pin [14]


  1. Connect RotaryEncoderSensor1 pin [Out] to Arduino > Display > Fill Screen1 pin [Clock]
  2. Connect RotaryEncoderSensor1 pin [Out] to Arduino > Display > Text Field1 pin [In]
  3. Connect RotaryEncoderSensor1 pin [Out] to IntegerToAnalog1 pin [In]


  1. Connect Arduino Digital pin [3] [Out] to RotaryEncoderSensor1 pin [Clock (A)]
  2. Connect Arduino Digital pin [4] [Out] to RotaryEncoderSensor1 pin [Direction (B)]


  1. Connect Arduino Digital pin [2] [Out] to Button1 pin [In]
  2. Connect Button1 pin [Out] to Counter1 pin [In]


  1. Connect IntegerToAnalog1 pin [Out] to SineAnalogGenerator1 pin [Frequency]
  2. Connect IntegerToAnalog1 pin [Out] to SquareAnalogGenerator1 pin [Frequency]
  3. Connect IntegerToAnalog1 pin [Out] to TriangleAnalogGenerator1 pin [Frequency]

Generate, Compile, and Upload the Arduino Code

F1L6ZR3MK38UZWC.jpg


In Visuino, at the bottom click on the "Build" Tab, make sure the correct port is selected, then click on the "Compile/Build and Upload" button.

Play

Congratulations! You have completed your project with Visuino. Also attached is the Visuino project, that I created for this tutorial, you can download it and open it in Visuino: https://www.visuino.com

#Arduino #SignalGenerator #ArduinoDAC #LEDMatrix