SlideShare una empresa de Scribd logo
1 de 14
What are Analogue Signals
0 Analogue signals is said to be a quantity which
 changes continuously with time.

0 The values that it takes changes continuously with
 time.

0 Usually represented by waveforms which is a graph
 between quantity and time.

0 E.g.: speed of a car, voltage variations etc etc
Capturing Analogue Data
0 Since most of information available in the real world is
 available only in the analogue form, it is an important
 requirement for physical computing devices to sense this
 information.

0 Sensors : Devices which convert analogue information in
 whatever form it might be to electrical analogue signals.

0 These electrical signals can be sent to the microcontroller.
ADC
0 The Arduino’s microcontroller cannot work with analogue
 voltage levels directly.

0 A device called an ADC is present in the microcontroller to
 convert this analogue data to digital data.

0 This digital data is a number representing the analogue
 value sampled by the ADC.

0 Physical Quantity >> Electrical Signals >> Number
ADC Resolution
0 The Arduino has an inbuilt ADC with a 10 bit resolution
 with reference set as AREF (default = VCC)

0 This means that between GND and AREF, the arduino can
  sense 2^10 = 1024 different voltages.
0 Where 0 == GND and 1024 = AREF
0 The output of the ADC will be a number between 0 and
  2^10 -1

0 Resolution : 5-0/1024 = 4.9mV
0 This should the difference between any two samples of the
 ADC for the ADC to recognize it as two different voltage
 levels.
Sampling Rate
0 Each time the ADC senses the input voltage level and
 outputs a number, we call that a “sample”.

0 The number of such samples the ADC is capable of in a
 second is called sample rate of the ADC.

0 Measured in Hz or Samples per second.

0 If sampling rate is low, information might be lost in
 conversion.
Sine wave sampled with a high
                               sampling rate




Sine wave sampled with a LOW
sampling rate
Analogue Reference
0 By default all Arduino analogue pins have a reference of
  5V.
0 This gives a resolution of 4.9mV between 0 – 5V


0 If required, the AREF pin can be used to give an external
 reference. (between 0 – 5V only)

0 E.g.: If 1.1V is given to the AREF pin,
   0 Resolution = 1.1/1024 = 1.04mV between 0 – 1.1V
Practical ADC sampling
0 Arduino’s theoretical sampling rate is 77kHz. (see
 datasheet)

0 Practically, ADC samples at ~56Khz.

0 !! Arduino doesn’t have a DSP so sampling is done by CPU
 only. Other tasks given to the CPU will affect Sampling rate
 adversely.

0 E.g.: If sampling ADC and sending data through Serial Port,
 effectively ~10Khz can be obtained.
Using the Arduino ADC
0 Potential dividers convert mechanical energy (twist)
 to voltage changes.

0 Open 5. ADC folder. Upload the code onto arduino.


0 Make pot connections as per circuit diagram..


0 If all goes well twisting the pot should make the LED
 blink slower or faster. Check serial monitor too!
Working of The ADC
0 Use analoguereference() to change the how the ADC takes
 reference signal for the analogue input.

0 Connect the analogue input to an analogue pin.
0 Analogue pins are called A0 – A6.

0 Use analogueread(pin) to initiate and perform a single ADC
 conversion.

0 Returned value is stored in an integer and is used in setting
 delay of LED13 blinking.
Code to write
0 Read the sensor

0 Store the value of the analogueread() into an int

0 Use it as the delay in blinking LED13

0 Move the pot around.

0 Send the value of the ADC onto serial port
Question Time

Más contenido relacionado

La actualidad más candente

Electronics schematic circuits for the hobbyist
Electronics   schematic circuits for the hobbyistElectronics   schematic circuits for the hobbyist
Electronics schematic circuits for the hobbyist
Naga Tejaswi
 

La actualidad más candente (20)

Rebooting Computing chalkwell
Rebooting Computing chalkwellRebooting Computing chalkwell
Rebooting Computing chalkwell
 
Arduino Hackday: Rebooting Computing
Arduino Hackday: Rebooting ComputingArduino Hackday: Rebooting Computing
Arduino Hackday: Rebooting Computing
 
Sensor Lecture Interfacing
 Sensor Lecture Interfacing Sensor Lecture Interfacing
Sensor Lecture Interfacing
 
Electronics schematic circuits for the hobbyist
Electronics schematic circuits for the hobbyistElectronics schematic circuits for the hobbyist
Electronics schematic circuits for the hobbyist
 
Lec 4
Lec 4Lec 4
Lec 4
 
Digital voltmeter using 89c51 microcontroller
Digital voltmeter using 89c51 microcontrollerDigital voltmeter using 89c51 microcontroller
Digital voltmeter using 89c51 microcontroller
 
Operating electrical devices with PIR sensor. No coding, No controller
Operating electrical devices with PIR sensor. No coding, No controllerOperating electrical devices with PIR sensor. No coding, No controller
Operating electrical devices with PIR sensor. No coding, No controller
 
Temperature control Switch and Display By Led
Temperature control Switch and Display By LedTemperature control Switch and Display By Led
Temperature control Switch and Display By Led
 
Lec 3
Lec 3Lec 3
Lec 3
 
Home automationusing ir remote
Home automationusing ir remote Home automationusing ir remote
Home automationusing ir remote
 
Electronics schematic circuits for the hobbyist
Electronics   schematic circuits for the hobbyistElectronics   schematic circuits for the hobbyist
Electronics schematic circuits for the hobbyist
 
Transformer Interfacing with Laptop
Transformer Interfacing with LaptopTransformer Interfacing with Laptop
Transformer Interfacing with Laptop
 
Presentation door knock
Presentation door knockPresentation door knock
Presentation door knock
 
Arduino - Ch 2: Sunrise-Sunset Light Switch
Arduino - Ch 2: Sunrise-Sunset Light SwitchArduino - Ch 2: Sunrise-Sunset Light Switch
Arduino - Ch 2: Sunrise-Sunset Light Switch
 
Wireless sensors
Wireless sensorsWireless sensors
Wireless sensors
 
Automatic DC Fan using LM35 (english version)
Automatic DC Fan using LM35 (english version)Automatic DC Fan using LM35 (english version)
Automatic DC Fan using LM35 (english version)
 
International Journal of Engineering Research and Development
International Journal of Engineering Research and DevelopmentInternational Journal of Engineering Research and Development
International Journal of Engineering Research and Development
 
Automatic IN/OUT Indicator with Doorbell Manual
Automatic IN/OUT Indicator with Doorbell ManualAutomatic IN/OUT Indicator with Doorbell Manual
Automatic IN/OUT Indicator with Doorbell Manual
 
Ir sensor mechanism and interfacing with a micro controllers.PPT
Ir sensor mechanism and  interfacing with  a micro controllers.PPTIr sensor mechanism and  interfacing with  a micro controllers.PPT
Ir sensor mechanism and interfacing with a micro controllers.PPT
 
Automatic Room Lock And Lights Off Circuit
Automatic Room Lock And Lights Off CircuitAutomatic Room Lock And Lights Off Circuit
Automatic Room Lock And Lights Off Circuit
 

Destacado (9)

Introducing the Arduino
Introducing the ArduinoIntroducing the Arduino
Introducing the Arduino
 
Equilibre games
Equilibre gamesEquilibre games
Equilibre games
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
GP. Natal
GP. NatalGP. Natal
GP. Natal
 
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
 
PresentacióN Construccion 2
PresentacióN Construccion 2PresentacióN Construccion 2
PresentacióN Construccion 2
 
PR-Tracking leicht gemacht - mit Social Media Monitoring
PR-Tracking leicht gemacht - mit Social Media MonitoringPR-Tracking leicht gemacht - mit Social Media Monitoring
PR-Tracking leicht gemacht - mit Social Media Monitoring
 
Wiring the world for a new model of health care
Wiring the world for a new model of health careWiring the world for a new model of health care
Wiring the world for a new model of health care
 
As novidades do PHP5 (2005)
As novidades do PHP5 (2005)As novidades do PHP5 (2005)
As novidades do PHP5 (2005)
 

Similar a 03 analogue anrduino fundamentals

Interfacing to the analog world
Interfacing to the analog worldInterfacing to the analog world
Interfacing to the analog world
Islam Samir
 
adcanddac hai kya bhayy me know if-01.pptx
adcanddac hai kya bhayy me know if-01.pptxadcanddac hai kya bhayy me know if-01.pptx
adcanddac hai kya bhayy me know if-01.pptx
shivraj3252
 
Analog to digital conversion
Analog to digital conversionAnalog to digital conversion
Analog to digital conversion
Engr Ahmad Khan
 

Similar a 03 analogue anrduino fundamentals (20)

Lecture 12 (adc) rv01
Lecture 12  (adc) rv01Lecture 12  (adc) rv01
Lecture 12 (adc) rv01
 
UNIT 4 & 5 - I nterfacing_Lecture7.pptx
UNIT 4 & 5 - I         nterfacing_Lecture7.pptxUNIT 4 & 5 - I         nterfacing_Lecture7.pptx
UNIT 4 & 5 - I nterfacing_Lecture7.pptx
 
Interfacing to the analog world
Interfacing to the analog worldInterfacing to the analog world
Interfacing to the analog world
 
Physical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digitalPhysical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digital
 
Fundamental of MSD Module-III Part-a.ppt
Fundamental of MSD Module-III Part-a.pptFundamental of MSD Module-III Part-a.ppt
Fundamental of MSD Module-III Part-a.ppt
 
analog to digital adn digital to analog .ppt
analog to digital adn digital to analog .pptanalog to digital adn digital to analog .ppt
analog to digital adn digital to analog .ppt
 
Pic ppt 13104022(4th_year)
Pic ppt 13104022(4th_year)Pic ppt 13104022(4th_year)
Pic ppt 13104022(4th_year)
 
Chapter 9.pptx
Chapter 9.pptxChapter 9.pptx
Chapter 9.pptx
 
Raspberry Pi - Lecture 4 Hardware Interfacing Special Cases
Raspberry Pi - Lecture 4 Hardware Interfacing Special CasesRaspberry Pi - Lecture 4 Hardware Interfacing Special Cases
Raspberry Pi - Lecture 4 Hardware Interfacing Special Cases
 
Analog to digital converter
Analog to digital converterAnalog to digital converter
Analog to digital converter
 
adcanddac hai kya bhayy me know if-01.pptx
adcanddac hai kya bhayy me know if-01.pptxadcanddac hai kya bhayy me know if-01.pptx
adcanddac hai kya bhayy me know if-01.pptx
 
Successive approximation adc
Successive approximation adcSuccessive approximation adc
Successive approximation adc
 
Analog to digital converter
Analog to digital converterAnalog to digital converter
Analog to digital converter
 
EEE UNIT-2 PPT.pdf
EEE UNIT-2 PPT.pdfEEE UNIT-2 PPT.pdf
EEE UNIT-2 PPT.pdf
 
Amvdd Data Converter Fundamentals
Amvdd Data Converter FundamentalsAmvdd Data Converter Fundamentals
Amvdd Data Converter Fundamentals
 
03 analog control_sp17
03 analog control_sp1703 analog control_sp17
03 analog control_sp17
 
Prese000
Prese000Prese000
Prese000
 
ADC and DAC Best Ever Pers
ADC and DAC Best Ever PersADC and DAC Best Ever Pers
ADC and DAC Best Ever Pers
 
Data convertors
Data convertorsData convertors
Data convertors
 
Analog to digital conversion
Analog to digital conversionAnalog to digital conversion
Analog to digital conversion
 

Más de Wingston

03 layouts & ui design - Android
03   layouts & ui design - Android03   layouts & ui design - Android
03 layouts & ui design - Android
Wingston
 
Linux – an introduction
Linux – an introductionLinux – an introduction
Linux – an introduction
Wingston
 
Introduction to the Arduino
Introduction to the ArduinoIntroduction to the Arduino
Introduction to the Arduino
Wingston
 
4.content mgmt
4.content mgmt4.content mgmt
4.content mgmt
Wingston
 
8 Web Practices for Drupal
8  Web Practices for Drupal8  Web Practices for Drupal
8 Web Practices for Drupal
Wingston
 
7 Theming in Drupal
7 Theming in Drupal7 Theming in Drupal
7 Theming in Drupal
Wingston
 
6 Special Howtos for Drupal
6 Special Howtos for Drupal6 Special Howtos for Drupal
6 Special Howtos for Drupal
Wingston
 
5 User Mgmt in Drupal
5 User Mgmt in Drupal5 User Mgmt in Drupal
5 User Mgmt in Drupal
Wingston
 
3 Configuring Drupal
3 Configuring Drupal3 Configuring Drupal
3 Configuring Drupal
Wingston
 

Más de Wingston (20)

OpenCV @ Droidcon 2012
OpenCV @ Droidcon 2012OpenCV @ Droidcon 2012
OpenCV @ Droidcon 2012
 
05 content providers - Android
05   content providers - Android05   content providers - Android
05 content providers - Android
 
04 activities - Android
04   activities - Android04   activities - Android
04 activities - Android
 
03 layouts & ui design - Android
03   layouts & ui design - Android03   layouts & ui design - Android
03 layouts & ui design - Android
 
02 hello world - Android
02   hello world - Android02   hello world - Android
02 hello world - Android
 
01 introduction & setup - Android
01   introduction & setup - Android01   introduction & setup - Android
01 introduction & setup - Android
 
OpenCV with android
OpenCV with androidOpenCV with android
OpenCV with android
 
C game programming - SDL
C game programming - SDLC game programming - SDL
C game programming - SDL
 
C programming - Pointers
C programming - PointersC programming - Pointers
C programming - Pointers
 
Introduction to Basic C programming 02
Introduction to Basic C programming 02Introduction to Basic C programming 02
Introduction to Basic C programming 02
 
Introduction to Basic C programming 01
Introduction to Basic C programming 01Introduction to Basic C programming 01
Introduction to Basic C programming 01
 
Linux – an introduction
Linux – an introductionLinux – an introduction
Linux – an introduction
 
Embedded linux
Embedded linuxEmbedded linux
Embedded linux
 
Introduction to the Arduino
Introduction to the ArduinoIntroduction to the Arduino
Introduction to the Arduino
 
4.content mgmt
4.content mgmt4.content mgmt
4.content mgmt
 
8 Web Practices for Drupal
8  Web Practices for Drupal8  Web Practices for Drupal
8 Web Practices for Drupal
 
7 Theming in Drupal
7 Theming in Drupal7 Theming in Drupal
7 Theming in Drupal
 
6 Special Howtos for Drupal
6 Special Howtos for Drupal6 Special Howtos for Drupal
6 Special Howtos for Drupal
 
5 User Mgmt in Drupal
5 User Mgmt in Drupal5 User Mgmt in Drupal
5 User Mgmt in Drupal
 
3 Configuring Drupal
3 Configuring Drupal3 Configuring Drupal
3 Configuring Drupal
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Último (20)

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 

03 analogue anrduino fundamentals

  • 1.
  • 2. What are Analogue Signals 0 Analogue signals is said to be a quantity which changes continuously with time. 0 The values that it takes changes continuously with time. 0 Usually represented by waveforms which is a graph between quantity and time. 0 E.g.: speed of a car, voltage variations etc etc
  • 3. Capturing Analogue Data 0 Since most of information available in the real world is available only in the analogue form, it is an important requirement for physical computing devices to sense this information. 0 Sensors : Devices which convert analogue information in whatever form it might be to electrical analogue signals. 0 These electrical signals can be sent to the microcontroller.
  • 4. ADC 0 The Arduino’s microcontroller cannot work with analogue voltage levels directly. 0 A device called an ADC is present in the microcontroller to convert this analogue data to digital data. 0 This digital data is a number representing the analogue value sampled by the ADC. 0 Physical Quantity >> Electrical Signals >> Number
  • 5. ADC Resolution 0 The Arduino has an inbuilt ADC with a 10 bit resolution with reference set as AREF (default = VCC) 0 This means that between GND and AREF, the arduino can sense 2^10 = 1024 different voltages. 0 Where 0 == GND and 1024 = AREF 0 The output of the ADC will be a number between 0 and 2^10 -1 0 Resolution : 5-0/1024 = 4.9mV 0 This should the difference between any two samples of the ADC for the ADC to recognize it as two different voltage levels.
  • 6. Sampling Rate 0 Each time the ADC senses the input voltage level and outputs a number, we call that a “sample”. 0 The number of such samples the ADC is capable of in a second is called sample rate of the ADC. 0 Measured in Hz or Samples per second. 0 If sampling rate is low, information might be lost in conversion.
  • 7. Sine wave sampled with a high sampling rate Sine wave sampled with a LOW sampling rate
  • 8. Analogue Reference 0 By default all Arduino analogue pins have a reference of 5V. 0 This gives a resolution of 4.9mV between 0 – 5V 0 If required, the AREF pin can be used to give an external reference. (between 0 – 5V only) 0 E.g.: If 1.1V is given to the AREF pin, 0 Resolution = 1.1/1024 = 1.04mV between 0 – 1.1V
  • 9. Practical ADC sampling 0 Arduino’s theoretical sampling rate is 77kHz. (see datasheet) 0 Practically, ADC samples at ~56Khz. 0 !! Arduino doesn’t have a DSP so sampling is done by CPU only. Other tasks given to the CPU will affect Sampling rate adversely. 0 E.g.: If sampling ADC and sending data through Serial Port, effectively ~10Khz can be obtained.
  • 10. Using the Arduino ADC 0 Potential dividers convert mechanical energy (twist) to voltage changes. 0 Open 5. ADC folder. Upload the code onto arduino. 0 Make pot connections as per circuit diagram.. 0 If all goes well twisting the pot should make the LED blink slower or faster. Check serial monitor too!
  • 11. Working of The ADC 0 Use analoguereference() to change the how the ADC takes reference signal for the analogue input. 0 Connect the analogue input to an analogue pin. 0 Analogue pins are called A0 – A6. 0 Use analogueread(pin) to initiate and perform a single ADC conversion. 0 Returned value is stored in an integer and is used in setting delay of LED13 blinking.
  • 12.
  • 13. Code to write 0 Read the sensor 0 Store the value of the analogueread() into an int 0 Use it as the delay in blinking LED13 0 Move the pot around. 0 Send the value of the ADC onto serial port