element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Arduino Forum Reading 0 to 100mV On Arduino Uno
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Verified Answer
  • Replies 5 replies
  • Answers 1 answer
  • Subscribers 392 subscribers
  • Views 2294 views
  • Users 0 members are here
Related

Reading 0 to 100mV On Arduino Uno

gregn67
gregn67 over 8 years ago

I have a project that I need some help with...

 

We have a signal that ranges from 0 to about 100mV.  We need to translate that to a tone that gets louder as the voltage goes up.

 

I have an Arduino Uno board and have written a quick Scratch program (using ScratchX) that reads A0 and set's the volume of a tone based on that value.

 

But, I think that this will only work for 0 to 5V signals.

 

Is there a way to increase the sensitivity of the analog inputs?

 

Thanks in advance!!

 

Greg

  • Sign in to reply
  • Cancel

Top Replies

  • rachaelp
    rachaelp over 8 years ago in reply to gregn67 +3 verified
    The ADC on the Arduino is either 10-bit or 12-bit depending on the model. That means that your read value is in integer between 0 and 1023 for the 10-bit ones and 0 and 4095 for the 12-bit ones. So you…
  • rachaelp
    rachaelp over 8 years ago +2 suggested
    Hi Greg, The map() function should scale the input range for you. See here: https://www.arduino.cc/en/Reference/Map Bear in mind that with a 0-100mV signal you'll have limited resolution and your steps…
  • gregn67
    gregn67 over 8 years ago in reply to rachaelp +2
    It's all starting to make sense to me now!! The map function works perfectly!! Thanks soooo much!! Greg
Parents
  • rachaelp
    0 rachaelp over 8 years ago

    Hi Greg,

     

    The map() function should scale the input range for you. See here: https://www.arduino.cc/en/Reference/Map

     

    Bear in mind that with a 0-100mV signal you'll have limited resolution and your steps will be large. A better solution is to scale the signal with an amplifier external to the Arduino so that it becomes a 0-5V signal into the ADC to make the best of the resolution of the ADC.

     

    Best Regards,

     

    Rachael

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • gregn67
    0 gregn67 over 8 years ago in reply to rachaelp

    So... to make sure I understand this correctly...

     

    If I wanted to change the analog pin 0 from 0 to 5V to 0 to 0.5V, I would use this command;

         map(0, 0, 5, 0, 0.5);

     

    Thanks for suggestion...

     

    Greg

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • rachaelp
    0 rachaelp over 8 years ago in reply to gregn67

    The ADC on the Arduino is either 10-bit or 12-bit depending on the model. That means that your read value is in integer between 0 and 1023 for the 10-bit ones and 0 and 4095 for the 12-bit ones. So you can look at what range your are seeing from the read of the ADC and scale it to a range which works for what you are doing. So depending on what you are doing in your code it might just be a case of using an appropriate range for the values you are reading or you can use map() to make them more convenient for what you are doing.

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • gregn67
    0 gregn67 over 8 years ago in reply to rachaelp

    It's all starting to make sense to me now!!

     

    The map function works perfectly!!

     

    Thanks soooo much!!

     

    Greg

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • rachaelp
    0 rachaelp over 8 years ago in reply to gregn67

    You're welcome. Glad to hear it's all working for you now image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • rachaelp
    0 rachaelp over 8 years ago in reply to gregn67

    You're welcome. Glad to hear it's all working for you now image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube