element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • 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 & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • 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
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • 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 Arduino
  • 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 Not Answered
  • Replies 9 replies
  • Subscribers 403 subscribers
  • Views 846 views
  • Users 0 members are here
  • frontpage
Related

Arduino

Former Member
Former Member over 9 years ago

Is there any means i can give my huzzah esp8266 additional analog pins. im trying to connect my analog accelerometer to it which requires 3 analog pins.

  • Sign in to reply
  • Cancel

Top Replies

  • Robert Peter Oakes
    Robert Peter Oakes over 9 years ago in reply to Gough Lui +1
    Yes I agree that the unused pins should be terminated somehow but it was not saying this in the data sheet. Also in this case as the ADC in question has an upper limit of only 1V I would suggest connecting…
Parents
  • Robert Peter Oakes
    0 Robert Peter Oakes over 9 years ago

    You will need to use aN external ADC then your good to go. Not expensive and can use the i2c or spi bus. It's up to u.

     

    Internally the esp866 only has 1 ADC.  The other option is an external multiplexer to the one built in

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 9 years ago in reply to Robert Peter Oakes

    I do have a MUX, but my problem is getting accurate readings from it and it says all unused pins have to be connected. connected to what?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Robert Peter Oakes
    0 Robert Peter Oakes over 9 years ago in reply to Former Member

    Whats the part number of the MUX, or provide a link

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 9 years ago in reply to Robert Peter Oakes

    CD74HC4067

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Robert Peter Oakes
    0 Robert Peter Oakes over 9 years ago in reply to Former Member

    Not sure where it says that but the part looks like it should work with no issues. The Enable and address lines should all be connected to something but the analog lines should n0t matter

     

    Do you have a schematic. I assume your aware the ESP8266 ADC is only 0-1V MAX, not 0 - 3v3 right.

     

    a schematic will help here as I don't see why you would be getting an issue with what your describing

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Gough Lui
    0 Gough Lui over 9 years ago in reply to Former Member

    Unused pins need to be connected to avoid having "noise" signals potentially affect any adjacent pins. As far as I know, this definitely applies for all types of pins, as an "undefined" input could cause noise to be generated. I suggest you determine the type of pin (e.g. is it control, or an analog input) and connect it accordingly to either Vcc (supply) or Ground as appropriate to ensure the part functions correctly as intended. Note that digital multiplexer ICs are not intended to pass analog signals, so probably an analog switch is a better solution.

     

    - Gough

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Gough Lui
    0 Gough Lui over 9 years ago in reply to Gough Lui

    I didn't notice you said you were using a CD74HC4067. Probably need to check what your supply voltage to the CD74HC4067 is, as if you supply it with 5V, then the 3.3v logic from the ESP won't be recognized by the multiplexer. Best to supply it with 3.3v at the most.

     

    Inputs S0, S1, S2, S3 are digital select lines to select any one of the 15 inputs. If you want just three inputs, then I suggest you use Y0, Y1 and Y2 as the inputs, and that maps to codes 0000, 0001, 0010. With that knowledge, you can safely connect S3 and S2 to ground, as we don't need them, but S0 and S1 need to be connected to GPIOs from your board and driven with either 00, 01, 10.

     

    Input /E is an enable signal which is logically inverted (hence the bar). To enable the multiplexer, tie this pin to ground as well.

     

    The inputs other than Y0-Y2 which are used for the accelerometer can be tied to ground as well, or to high. It really doesn't matter, but I'd prefer you didn't leave them floating.

     

    Output Z needs to go to your ADC.

     

    I hope you realize that the multiplexer is really only a switch that lets you select the input one at a time - you won't be able to read all inputs "simultaneously".

     

    Also, as mentioned by Robert Peter Oakes, you should probably check whether the output from your accelerometer is compatible with the ADC input on the ESP on a voltage level basis, otherwise there could be damage.

     

    - Gough

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Robert Peter Oakes
    0 Robert Peter Oakes over 9 years ago in reply to Gough Lui

    Yes I agree that the unused pins should be terminated somehow but it was not saying this in the data sheet.

     

    Also in this case as the ADC in question has an upper limit of only 1V I would suggest connecting unused MUX inputs to 0... NOT VCC, as a mistake in programming will result in excessive volts applied to the ADC input.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • Robert Peter Oakes
    0 Robert Peter Oakes over 9 years ago in reply to Gough Lui

    Yes I agree that the unused pins should be terminated somehow but it was not saying this in the data sheet.

     

    Also in this case as the ADC in question has an upper limit of only 1V I would suggest connecting unused MUX inputs to 0... NOT VCC, as a mistake in programming will result in excessive volts applied to the ADC input.

    • Cancel
    • Vote Up +1 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