M005_ArduinoAnalogInputs.SP19.v1.pdf - Module 005 Arduino...

This preview shows page 1 - 2 out of 12 pages.

Arduino Analog Inputs Module 005: Arduino Analog Inputs Introduction One of the most powerful features of the Arduino board is its ability to take an analog voltage and convert that analog voltage into a number – a 10-bit binary number – but don’t worry if you don’t know binary, Ardunio will present this to you as a decimal number between 0 and 1023. The ability to sample voltages enables you to design projects that interface the real world of sound, heat, pressure, motion, acceleration, radiation, etc., to the digital world of the Arduino. The “sensor” devices that convert the properties of the real world to a voltage are part of a general class of devices called transducers. A transducer transforms one kind of energy into another. You are very familiar with these devices – even your own body is full of them. All of the interfaces to your computer is a transducer of one form or another – the microphone input converts the coherent motion of the air (sound) hitting the microphone into a voltage that is input to the computer – the speaker output converts the voltage generated by the computer to sound waves – the computer’s camera inputs electromagnetic radiation in the visible light range from the surrounding environment and converts the resulting image to a voltage that the computer can then process and store. The magic hardware that allows the analog and digital world to interface are complex devices – an A/D Converter (Analog-to- Digital Converter) and a DAC (Digital-to-Analog Converter). The Arduino only has an Analog-to-Digital Converter so you can only input analog inputs (a signal with a vast number of voltage options). You cannot output an arbitrary voltage level. Some other platforms like the TI development boards also include a D/A converter so that they can output analog signals. This module will help you set up a simple experiment that illustrates the hardware and software considerations so that you can become familiar with the simple statements needed to get a digitized version of the voltage from any analog device/sensor that works within the electrical constraints of the Arduino.
Image of page 1

Subscribe to view the full document.

Arduino Analog Inputs Procedures Building a circuit to test To fully understand the process of reading an analog voltage and use the result to control external circuitry let’s build two circuits. An input circuit and an output circuit. The input circuit consists of a simple device that can provide a variable voltage that can be fed into one of the analog input pins on the Arduino/RedBoard. The simplest way to create a controllable voltage would be to build a voltage divider using a potentiometer. We can have the Arduino then control an LED whose brightness depends on the voltage at the analog input pin.
Image of page 2
You've reached the end of this preview.
  • Spring '14
  • Universal Serial Bus, Serial communication, Serial port

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern