Simple Scope Using Nextion Display & Visuino

About the project

Learn how easy it is to make a simple scope using Nextion display with Arduino and Visuino. Watch the Video!

Project info

Difficulty: Easy

Platforms: ArduinoDFRobotIteadVisuino

Estimated time: 1 hour

License: GNU General Public License, version 3 or later (GPL3+)

Items used in this project

Hardware components

DFRobot Gravity:Analog Rotation Potentiometer Sensor V2 For Arduino DFRobot Gravity:Analog Rotation Potentiometer Sensor V2 For Arduino x 1
Jumper wires (generic) Jumper wires (generic) x 1
Arduino UNO Arduino UNO x 1
Itead Nextion NX4024T032 - Generic 3.2" HMI TFT Intelligent LCD Touch Display Module Itead Nextion NX4024T032 - Generic 3.2" HMI TFT Intelligent LCD Touch Display Module x 1

Software apps and online services

Arduino IDE Arduino IDE
Visuino Visuino

Story

Step 1: What You Will Need

  • Arduino UNO (or any other board)
  • Nextion Display
  • Potentiometer module (Optional)
  • Breadboard
  • Jumper wires
  • Nextion Editor program: Download Nextion
  • Visuino program: Download Visuino

Step 2: The Circuit

  • Connect Nextion Display VCC red wire to Arduino 5V pin
  • Connect Nextion Display GND black wire to Arduino GND pin
  • Connect Nextion Display Yellow wire (RX) wire to Arduino TX pin
  • Connect Nextion Display Blue wire (TX) wire to Arduino RX pin
  • Connect Potentiometer pin[VCC] to Arduino pin[5V]
  • Connect Potentiometer pin[GND] to Arduino pin[GND]
  • Connect Potentiometer pin[Out] to Arduino Analog pin[A0]

Step 3: Nextion Editor

  • Download Nextion Editor and Install it
  • Start Nextion Editor
  • In the Nextion Editor click on the "New" button
  • In the Window set the name for the Project like "Scope"
  • In the "Setting" window select the Model of your Nextion Display & click "Ok"
  • Select Display Direction 90 & click "Ok"
  • In the Editor on the left in the "Toolbox" find:
  • "Waveform" & drag it to the right, resize it to fit the screen
  • In the Toolbar click on the "Compile" button
  • In the Menu Select "File" > "TFT File Output"
  • Set the Output folder & click on the "Output" button
  • Save the File to the SD card
  • Insert the SD card to your Nextion Display
  • Power the Arduino and you will notice that the Nextion Display will start to Update it self
  • On the Finish disconnect the power and remove the SD card from the Nextion display

Step 4: Start Visuino, and Select the Arduino UNO Board Type

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" as shown on Picture 2

Step 5: In Visuino Add & Set Components

  • Add "Nextion Display" component
  • Double click on the "DisplayNextion1" And in the Elements window drag "Scope" to the left side
  • Close the Elements window

Using Signal generator:

  • Add "Sine Analog Generator" component
  • Optional Set "Frequency" or other properties in the Inspector window
  • Connect "SineAnalogGenerator1" pin [Out] to "DisplayNextion1" > "Scope1" > "Channel1" pin [In]

Using Potentiometer:

  • Connect Arduino Analog pin 0 [Out] to "DisplayNextion1" > "Scope1" > "Channel1" pin [In]

Step 6: Generate, Compile, and Upload the Arduino Code

Before Uploading Disconnect RX pin on Arduino and connect it back after the Upload.

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.

Step 7: Play

If you power the Arduino module the Nextion display will show the Sine wave, and if you connect the potentiometer you will be able to change the wave on the Nextion Display.

This approach is very handy to display different data on the scope such as Temperature or humidity.

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

Schematics, diagrams and documents

Visuino File

Visuino File

Code

Visuino File

Credits

Photo of Ron

Ron

Arduino Developer

   

Leave your feedback...