SlideShare a Scribd company logo
Arduino Qt HMI - Serial Port
A Term Paper Final Report
by
SATYENDRA KUMAR J
M. Tech. (Mechatronics) 1st semester Student
Under the supervision of
T ESHWAR RAO
ASSOCIATE PROFESSOR
DEPARTMENT OF MECHANICAL ENGINEERING
K L University, Green Fields,
Vaddeswaram- 522502, Guntur(Dist), Andhra Pradesh, India.
April - 2017
contents
• Abstract
• Introduction
• Required Setup
• Methodology
• Theory(PWM)
• analogWrite()
• Observation
• analogRead()
• Qt HMI Screens.
• References
Abstract
• To create customized Qt graphical user
interfaces (GUI), which facilitates brightness
control of LED, and RPM display of DC
Motor,connected to an Arduino Uno
Microcontroller.
Introduction
• By using the Qt's serial port functionality in
conjunction with an Arduino uno
Microcontroller (RS232 device) ,it is possible
to control the color brightness of an LED.
• similarly change the speed of a DC motor by
sending the values from a Qt GUI in a range of
0 to 255 and display the RPM of motor on the
same GUI.
• Serial commands can be sent from GUI (Qt)
and the same way parsing them on Arduino (at
a baud rate of 9600),communication will be
established with the Qt GUI and there to the
LED or DC Motor connected to Arduino
Microcontroller by jumper wires on a
breadboard.
Required Setup
• Install Qt 5.7.1.
• Serial Port Library installed on the Host
machine. (Windows/Ubuntu).
• Qt C++ based GUI screen for sending PWM
values (0 to 255).
• Resistors(300 Ω upto 1KΩ), (red, purple,
brown stripes)
• LEDs (Red, Green, Blue colors).
• DC Motor.(0to 5Volts),1000RPM.
• Jumper wire pack (M to M)
• BreadBoard
Methodology
• It is possible to control the brightness intensity
of the Red, Green, Blue lights (RGB LED)on
the Breadboard by writing code in Qt C++, and
sending commands from Qt GUI to the
Arduino microcontroller.
• So whenever there is a change in the value on
the GUI control present on the computer, the
corresponding value is sent to Arduino
microcontroller.
Pulse Width Modulation
• Pulse Width Modulation( PWM), is a
technique for getting analog results with digital
means, the on-off pattern can simulate voltages
in between full on (5 Volts) and off (0 Volts)
by changing the portion of the time the signal
spends on to off.
• The duration of "on time" is called the pulse
width.
• There are 5 pins on most Arduino boards
marked with "~" next to the pin number (on
some boards it is an “PWM” symbol).
• Pulse Width Modulation (or PWM) is a
technique for controlling power.In this case it
is used to control the brightness of LEDs.
• Roughly every 1/500 of a second, the PWM
output will produce a pulse. The length of this
pulse is controlled by the 'analogWrite'
function.
• By specifying a value in the analogWrite(val),
function between 0 and 255 a pulse can be
produced.
• If the output pulse is only high for 5% of the
time then whatever is driven will only receive
5% of full power.
• Similarly if the output pulse is high for 95% of
the time then whatever is driven will receive
95% of full power. (in this case an LED and DC
Motor).
• SIGNALS from one of the PWM pins on
Arduino Uno Microcontroller at different
voltages and duty cycles.
• Voltages (0V to 5V)
• Duty cycles samples (5%),(50%),and(90%).
• To get varying analog values, change, or
modulate, the pulse width.
• If this on-off pattern is repeated fast enough on
Arduino,with an LED,the result is as if the
signal is a steady voltage between 0 and 5v
controlling the brightness of the LED.
analogWrite
• 'analogWrite(0)' will not produce any pulse.
• 'analogWrite(255)' will produce a pulse that
lasts all the way until the next pulse is due.
• Values between 0 and 255 a pulse can be
produced with varying width.
analogRead
• The Arduino board will map input voltages
between 0 and 5 volts into integer values
between 0 and 1023.
• 'analogRead()' takes pin number starting from
0 to 5,0to 15 on Arduino Mega.
• 'analogRead(1)' returns value ranging from 0
to1023.
• By changing the values from 0 to 255 from Qt
GUI motor speed will vary,0 being 0 RPM and
255 at the max rpm of the DC motor.
Qt HMI screens
References
• Modeling and Simulation of Pulse-Width
Modulation Inverter
• GAI Zhi-wu 1,LI Dong-sheng 1 ,SONG Zhe-cun 1 ,MA Yong 2,YU Ji-lai 2 (1.Electromechanical
Engineering College of Northeast Forestry University,Harbin Heilongjiang 150040,China; 2.HarBin
Institute of Technology,Harbin Heilongjiang 150001,Chi
• Simulation Research of Switching Power
Supply Based on PWM
• WANG Bing,ZHANG Runhe,SUN Yanxia (Information Engineering College,Inner Mongolia
University of Technology,Hohhot,010051,China)
• https://forum.arduino.cc
• https://forum.qt.io

More Related Content

What's hot

LDR Counter
LDR CounterLDR Counter
LDR Counter
Ali Faizan Wattoo
 
Arduino Interface LM35 MQTT Using UART
Arduino Interface LM35 MQTT Using UARTArduino Interface LM35 MQTT Using UART
Arduino Interface LM35 MQTT Using UART
Sanjay Kumar
 
Physical prototyping lab1-input_output (2)
Physical prototyping lab1-input_output (2)Physical prototyping lab1-input_output (2)
Physical prototyping lab1-input_output (2)
Tony Olsson.
 
Object counter
Object counterObject counter
Object counter
suresh shindhe
 
Power point presenttation seminar
Power point presenttation seminarPower point presenttation seminar
Power point presenttation seminar9766686371
 
Digital object counter (group 12)
Digital object counter (group 12)Digital object counter (group 12)
Digital object counter (group 12)
Aviral Srivastava
 
Arduino by yogesh t s'
Arduino by yogesh t s'Arduino by yogesh t s'
Arduino by yogesh t s'
tsyogesh46
 
Visitor counter
Visitor counterVisitor counter
Visitor counter
Anjuman Meman
 
Arduino Programming for Basic Robotics - University of Moratuwa
Arduino Programming for Basic Robotics - University of MoratuwaArduino Programming for Basic Robotics - University of Moratuwa
Arduino Programming for Basic Robotics - University of Moratuwa
Abarajithan Gnaneswaran
 
Obstacle Avoidance Robot (Powered by Arduino)
Obstacle Avoidance Robot (Powered by Arduino)Obstacle Avoidance Robot (Powered by Arduino)
Obstacle Avoidance Robot (Powered by Arduino)
Amanullah Mahmood
 
Arduino Ch3 : Tilt Sensing Servo Motor Controller
Arduino Ch3 : Tilt Sensing Servo Motor Controller Arduino Ch3 : Tilt Sensing Servo Motor Controller
Arduino Ch3 : Tilt Sensing Servo Motor Controller
Ratzman III
 
Biratnagar Robotics Club, Nepal
Biratnagar Robotics Club, NepalBiratnagar Robotics Club, Nepal
Biratnagar Robotics Club, Nepal
Sarwar Alam Ansari
 
How to measure frequency and duty cycle using arduino
How to measure frequency and duty cycle using  arduinoHow to measure frequency and duty cycle using  arduino
How to measure frequency and duty cycle using arduino
Sagar Srivastav
 
Rotary encoder training material
Rotary encoder training materialRotary encoder training material
Rotary encoder training materialSáng Bùi Quang
 
Bidirectional Visitor Counter with Automatic ON-OFF Switch2
Bidirectional Visitor Counter with Automatic ON-OFF Switch2Bidirectional Visitor Counter with Automatic ON-OFF Switch2
Bidirectional Visitor Counter with Automatic ON-OFF Switch2DIPAN GHOSH
 
Optical Encoders
Optical EncodersOptical Encoders
Optical Encoders
Premier Farnell
 
02 General Purpose Input - Output on the Arduino
02   General Purpose Input -  Output on the Arduino02   General Purpose Input -  Output on the Arduino
02 General Purpose Input - Output on the Arduino
Wingston
 
Bidirect visitor counter
Bidirect visitor counterBidirect visitor counter
Bidirect visitor counter
Electric&elctronics&engineeering
 

What's hot (20)

LDR Counter
LDR CounterLDR Counter
LDR Counter
 
Arduino Interface LM35 MQTT Using UART
Arduino Interface LM35 MQTT Using UARTArduino Interface LM35 MQTT Using UART
Arduino Interface LM35 MQTT Using UART
 
Physical prototyping lab1-input_output (2)
Physical prototyping lab1-input_output (2)Physical prototyping lab1-input_output (2)
Physical prototyping lab1-input_output (2)
 
MPU-6050_RF24L01
MPU-6050_RF24L01MPU-6050_RF24L01
MPU-6050_RF24L01
 
Object counter
Object counterObject counter
Object counter
 
Power point presenttation seminar
Power point presenttation seminarPower point presenttation seminar
Power point presenttation seminar
 
Digital object counter (group 12)
Digital object counter (group 12)Digital object counter (group 12)
Digital object counter (group 12)
 
Arduino by yogesh t s'
Arduino by yogesh t s'Arduino by yogesh t s'
Arduino by yogesh t s'
 
Visitor counter
Visitor counterVisitor counter
Visitor counter
 
Arduino Programming for Basic Robotics - University of Moratuwa
Arduino Programming for Basic Robotics - University of MoratuwaArduino Programming for Basic Robotics - University of Moratuwa
Arduino Programming for Basic Robotics - University of Moratuwa
 
Obstacle Avoidance Robot (Powered by Arduino)
Obstacle Avoidance Robot (Powered by Arduino)Obstacle Avoidance Robot (Powered by Arduino)
Obstacle Avoidance Robot (Powered by Arduino)
 
Arduino Ch3 : Tilt Sensing Servo Motor Controller
Arduino Ch3 : Tilt Sensing Servo Motor Controller Arduino Ch3 : Tilt Sensing Servo Motor Controller
Arduino Ch3 : Tilt Sensing Servo Motor Controller
 
Biratnagar Robotics Club, Nepal
Biratnagar Robotics Club, NepalBiratnagar Robotics Club, Nepal
Biratnagar Robotics Club, Nepal
 
How to measure frequency and duty cycle using arduino
How to measure frequency and duty cycle using  arduinoHow to measure frequency and duty cycle using  arduino
How to measure frequency and duty cycle using arduino
 
Rotary encoder training material
Rotary encoder training materialRotary encoder training material
Rotary encoder training material
 
Bidirectional Visitor Counter with Automatic ON-OFF Switch2
Bidirectional Visitor Counter with Automatic ON-OFF Switch2Bidirectional Visitor Counter with Automatic ON-OFF Switch2
Bidirectional Visitor Counter with Automatic ON-OFF Switch2
 
Optical Encoders
Optical EncodersOptical Encoders
Optical Encoders
 
02 General Purpose Input - Output on the Arduino
02   General Purpose Input -  Output on the Arduino02   General Purpose Input -  Output on the Arduino
02 General Purpose Input - Output on the Arduino
 
Absolute
AbsoluteAbsolute
Absolute
 
Bidirect visitor counter
Bidirect visitor counterBidirect visitor counter
Bidirect visitor counter
 

Similar to Qt arduino serial_port

Temperature Controller with Atmega16
Temperature Controller with Atmega16Temperature Controller with Atmega16
Temperature Controller with Atmega16
Siddhant Jaiswal
 
Arduino Programming Familiarization
Arduino Programming FamiliarizationArduino Programming Familiarization
Arduino Programming Familiarization
Amit Kumer Podder
 
Embedded system course projects - Arduino Course
Embedded system course projects - Arduino CourseEmbedded system course projects - Arduino Course
Embedded system course projects - Arduino Course
Elaf A.Saeed
 
510 277-283
510 277-283510 277-283
510 277-283
idescitation
 
Generate pwm signal through arduino of various duty
Generate pwm signal through arduino of various dutyGenerate pwm signal through arduino of various duty
Generate pwm signal through arduino of various duty
PANKAJPRAJAPATI45
 
Physical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digitalPhysical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digital
Tony Olsson.
 
Automatic Power Factor Correction Using Arduino Uno
Automatic Power Factor Correction Using Arduino UnoAutomatic Power Factor Correction Using Arduino Uno
Automatic Power Factor Correction Using Arduino Uno
VineetKumar508
 
Arduino Workshop (3).pptx
Arduino Workshop (3).pptxArduino Workshop (3).pptx
Arduino Workshop (3).pptx
HebaEng
 
ARM Based Handy and Portable Oscilloscope Using Graphical Display
ARM Based Handy and Portable Oscilloscope Using Graphical DisplayARM Based Handy and Portable Oscilloscope Using Graphical Display
ARM Based Handy and Portable Oscilloscope Using Graphical Display
IJERA Editor
 
Arduino Thermometer
Arduino ThermometerArduino Thermometer
Arduino Thermometer
Mahmoud Salheen
 
INT4073 L07(Sensors and AcutTORS).pdf
INT4073 L07(Sensors and AcutTORS).pdfINT4073 L07(Sensors and AcutTORS).pdf
INT4073 L07(Sensors and AcutTORS).pdf
MSingh88
 
Pwm technique for dc motor Using Arduino
Pwm technique for dc motor Using ArduinoPwm technique for dc motor Using Arduino
Pwm technique for dc motor Using Arduino
KATHANSANJAYSHAH
 
Fun with arduino
Fun with arduinoFun with arduino
Fun with arduino
Ravikumar Tiwari
 
teststststststLecture_3_2022_Arduino.pptx
teststststststLecture_3_2022_Arduino.pptxteststststststLecture_3_2022_Arduino.pptx
teststststststLecture_3_2022_Arduino.pptx
ethannguyen1618
 
Arduino_Beginner.pptx
Arduino_Beginner.pptxArduino_Beginner.pptx
Arduino_Beginner.pptx
shivagoud45
 
Ardui no
Ardui no Ardui no
Ardui no
Amol Sakhalkar
 
arduinoworkshop-160204051621.pdf
arduinoworkshop-160204051621.pdfarduinoworkshop-160204051621.pdf
arduinoworkshop-160204051621.pdf
AbdErrezakChahoub
 
Arduino course
Arduino courseArduino course
Arduino course
Ahmed Shelbaya
 
arduinocourse-180308074529 (1).pdf
arduinocourse-180308074529 (1).pdfarduinocourse-180308074529 (1).pdf
arduinocourse-180308074529 (1).pdf
ssusere5db05
 
Interface stepper motor through Arduino using LABVIEW.
Interface stepper motor through Arduino using LABVIEW.Interface stepper motor through Arduino using LABVIEW.
Interface stepper motor through Arduino using LABVIEW.
Ankita Tiwari
 

Similar to Qt arduino serial_port (20)

Temperature Controller with Atmega16
Temperature Controller with Atmega16Temperature Controller with Atmega16
Temperature Controller with Atmega16
 
Arduino Programming Familiarization
Arduino Programming FamiliarizationArduino Programming Familiarization
Arduino Programming Familiarization
 
Embedded system course projects - Arduino Course
Embedded system course projects - Arduino CourseEmbedded system course projects - Arduino Course
Embedded system course projects - Arduino Course
 
510 277-283
510 277-283510 277-283
510 277-283
 
Generate pwm signal through arduino of various duty
Generate pwm signal through arduino of various dutyGenerate pwm signal through arduino of various duty
Generate pwm signal through arduino of various duty
 
Physical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digitalPhysical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digital
 
Automatic Power Factor Correction Using Arduino Uno
Automatic Power Factor Correction Using Arduino UnoAutomatic Power Factor Correction Using Arduino Uno
Automatic Power Factor Correction Using Arduino Uno
 
Arduino Workshop (3).pptx
Arduino Workshop (3).pptxArduino Workshop (3).pptx
Arduino Workshop (3).pptx
 
ARM Based Handy and Portable Oscilloscope Using Graphical Display
ARM Based Handy and Portable Oscilloscope Using Graphical DisplayARM Based Handy and Portable Oscilloscope Using Graphical Display
ARM Based Handy and Portable Oscilloscope Using Graphical Display
 
Arduino Thermometer
Arduino ThermometerArduino Thermometer
Arduino Thermometer
 
INT4073 L07(Sensors and AcutTORS).pdf
INT4073 L07(Sensors and AcutTORS).pdfINT4073 L07(Sensors and AcutTORS).pdf
INT4073 L07(Sensors and AcutTORS).pdf
 
Pwm technique for dc motor Using Arduino
Pwm technique for dc motor Using ArduinoPwm technique for dc motor Using Arduino
Pwm technique for dc motor Using Arduino
 
Fun with arduino
Fun with arduinoFun with arduino
Fun with arduino
 
teststststststLecture_3_2022_Arduino.pptx
teststststststLecture_3_2022_Arduino.pptxteststststststLecture_3_2022_Arduino.pptx
teststststststLecture_3_2022_Arduino.pptx
 
Arduino_Beginner.pptx
Arduino_Beginner.pptxArduino_Beginner.pptx
Arduino_Beginner.pptx
 
Ardui no
Ardui no Ardui no
Ardui no
 
arduinoworkshop-160204051621.pdf
arduinoworkshop-160204051621.pdfarduinoworkshop-160204051621.pdf
arduinoworkshop-160204051621.pdf
 
Arduino course
Arduino courseArduino course
Arduino course
 
arduinocourse-180308074529 (1).pdf
arduinocourse-180308074529 (1).pdfarduinocourse-180308074529 (1).pdf
arduinocourse-180308074529 (1).pdf
 
Interface stepper motor through Arduino using LABVIEW.
Interface stepper motor through Arduino using LABVIEW.Interface stepper motor through Arduino using LABVIEW.
Interface stepper motor through Arduino using LABVIEW.
 

Recently uploaded

Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
Aditya Rajan Patra
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
WENKENLI1
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理
一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理
一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理
dxobcob
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
camseq
 
bank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdfbank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdf
Divyam548318
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
nooriasukmaningtyas
 
AIR POLLUTION lecture EnE203 updated.pdf
AIR POLLUTION lecture EnE203 updated.pdfAIR POLLUTION lecture EnE203 updated.pdf
AIR POLLUTION lecture EnE203 updated.pdf
RicletoEspinosa1
 
Fundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptxFundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptx
manasideore6
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 
Water billing management system project report.pdf
Water billing management system project report.pdfWater billing management system project report.pdf
Water billing management system project report.pdf
Kamal Acharya
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
zwunae
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
MIGUELANGEL966976
 
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
obonagu
 
Unbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptxUnbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptx
ChristineTorrepenida1
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
gestioneergodomus
 
PROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.ppt
PROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.pptPROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.ppt
PROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.ppt
bhadouriyakaku
 
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
ssuser7dcef0
 
Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
symbo111
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
Rahul
 

Recently uploaded (20)

Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理
一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理
一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
 
bank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdfbank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdf
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
 
AIR POLLUTION lecture EnE203 updated.pdf
AIR POLLUTION lecture EnE203 updated.pdfAIR POLLUTION lecture EnE203 updated.pdf
AIR POLLUTION lecture EnE203 updated.pdf
 
Fundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptxFundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptx
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 
Water billing management system project report.pdf
Water billing management system project report.pdfWater billing management system project report.pdf
Water billing management system project report.pdf
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
 
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
 
Unbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptxUnbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptx
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
 
PROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.ppt
PROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.pptPROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.ppt
PROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.ppt
 
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
 
Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
 

Qt arduino serial_port

  • 1. Arduino Qt HMI - Serial Port A Term Paper Final Report by SATYENDRA KUMAR J M. Tech. (Mechatronics) 1st semester Student Under the supervision of T ESHWAR RAO ASSOCIATE PROFESSOR DEPARTMENT OF MECHANICAL ENGINEERING K L University, Green Fields, Vaddeswaram- 522502, Guntur(Dist), Andhra Pradesh, India. April - 2017
  • 2. contents • Abstract • Introduction • Required Setup • Methodology • Theory(PWM) • analogWrite() • Observation • analogRead() • Qt HMI Screens. • References
  • 3. Abstract • To create customized Qt graphical user interfaces (GUI), which facilitates brightness control of LED, and RPM display of DC Motor,connected to an Arduino Uno Microcontroller.
  • 4. Introduction • By using the Qt's serial port functionality in conjunction with an Arduino uno Microcontroller (RS232 device) ,it is possible to control the color brightness of an LED. • similarly change the speed of a DC motor by sending the values from a Qt GUI in a range of 0 to 255 and display the RPM of motor on the same GUI.
  • 5. • Serial commands can be sent from GUI (Qt) and the same way parsing them on Arduino (at a baud rate of 9600),communication will be established with the Qt GUI and there to the LED or DC Motor connected to Arduino Microcontroller by jumper wires on a breadboard.
  • 6. Required Setup • Install Qt 5.7.1. • Serial Port Library installed on the Host machine. (Windows/Ubuntu). • Qt C++ based GUI screen for sending PWM values (0 to 255). • Resistors(300 Ω upto 1KΩ), (red, purple, brown stripes) • LEDs (Red, Green, Blue colors). • DC Motor.(0to 5Volts),1000RPM.
  • 7. • Jumper wire pack (M to M) • BreadBoard
  • 8. Methodology • It is possible to control the brightness intensity of the Red, Green, Blue lights (RGB LED)on the Breadboard by writing code in Qt C++, and sending commands from Qt GUI to the Arduino microcontroller. • So whenever there is a change in the value on the GUI control present on the computer, the corresponding value is sent to Arduino microcontroller.
  • 9. Pulse Width Modulation • Pulse Width Modulation( PWM), is a technique for getting analog results with digital means, the on-off pattern can simulate voltages in between full on (5 Volts) and off (0 Volts) by changing the portion of the time the signal spends on to off. • The duration of "on time" is called the pulse width.
  • 10. • There are 5 pins on most Arduino boards marked with "~" next to the pin number (on some boards it is an “PWM” symbol). • Pulse Width Modulation (or PWM) is a technique for controlling power.In this case it is used to control the brightness of LEDs.
  • 11. • Roughly every 1/500 of a second, the PWM output will produce a pulse. The length of this pulse is controlled by the 'analogWrite' function. • By specifying a value in the analogWrite(val), function between 0 and 255 a pulse can be produced.
  • 12. • If the output pulse is only high for 5% of the time then whatever is driven will only receive 5% of full power. • Similarly if the output pulse is high for 95% of the time then whatever is driven will receive 95% of full power. (in this case an LED and DC Motor).
  • 13.
  • 14. • SIGNALS from one of the PWM pins on Arduino Uno Microcontroller at different voltages and duty cycles. • Voltages (0V to 5V) • Duty cycles samples (5%),(50%),and(90%).
  • 15. • To get varying analog values, change, or modulate, the pulse width. • If this on-off pattern is repeated fast enough on Arduino,with an LED,the result is as if the signal is a steady voltage between 0 and 5v controlling the brightness of the LED.
  • 16. analogWrite • 'analogWrite(0)' will not produce any pulse. • 'analogWrite(255)' will produce a pulse that lasts all the way until the next pulse is due. • Values between 0 and 255 a pulse can be produced with varying width.
  • 17.
  • 18. analogRead • The Arduino board will map input voltages between 0 and 5 volts into integer values between 0 and 1023. • 'analogRead()' takes pin number starting from 0 to 5,0to 15 on Arduino Mega. • 'analogRead(1)' returns value ranging from 0 to1023.
  • 19. • By changing the values from 0 to 255 from Qt GUI motor speed will vary,0 being 0 RPM and 255 at the max rpm of the DC motor.
  • 21.
  • 22. References • Modeling and Simulation of Pulse-Width Modulation Inverter • GAI Zhi-wu 1,LI Dong-sheng 1 ,SONG Zhe-cun 1 ,MA Yong 2,YU Ji-lai 2 (1.Electromechanical Engineering College of Northeast Forestry University,Harbin Heilongjiang 150040,China; 2.HarBin Institute of Technology,Harbin Heilongjiang 150001,Chi • Simulation Research of Switching Power Supply Based on PWM • WANG Bing,ZHANG Runhe,SUN Yanxia (Information Engineering College,Inner Mongolia University of Technology,Hohhot,010051,China)