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
Cypress Kits
  • Products
  • Dev Tools
  • Cypress Kits
  • More
  • Cancel
Cypress Kits
Forum Interfacing more than one accelerometer using PSoC 4
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Cypress Kits to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 10 replies
  • Subscribers 29 subscribers
  • Views 1209 views
  • Users 0 members are here
Related

Interfacing more than one accelerometer using PSoC 4

Former Member
Former Member over 11 years ago

Is anyone knows about how to interface two accelerometers using PSoC 4? I want to access two MMA7455L.Thank you

  • Sign in to reply
  • Cancel

Top Replies

  • hlipka
    hlipka over 11 years ago in reply to cy.gul +1
    Since SPI is a bus, there is no need to use multiple masters. Multiple chip-select signals are enough (and save pins that way). Different masters are only needed when the SPI configuration (CPOL / CPHA…
  • DAB
    0 DAB over 11 years ago

    Hi Yakub,

     

    I have not heard of anyone needing more than one accelerometer, but I am assuming you are talking about a standard 3-axis chip.

     

    If you want to use more than one 3-axis chip, then I am very curious about your application/idea.

     

    Conceptually, all you need is enough A/D ports on your PSOC to do the basic interface.  As I recall, there are at least twelve on the board, so you should be able to make it work.

     

    DAB


    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • hlipka
    0 hlipka over 11 years ago

    The MMA7455L has both I2C and SPI outputs. I would recommend using SPI. Connect MISO, MOSI and CLK lines together. Then use two different select signals, and control them manually (via a control register) in your code. With that setup, you can use a single SPI master component, and select manually which one to talk to.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • vsluiter
    0 vsluiter over 11 years ago in reply to DAB

    Hi DAB,

     

    in this design I connected 7 gyro's and 7 accelerometers to one microcontroller:)

     

    I used SPI for that, with chip selects.

    The reason for choosing SPI was that we needed to get the data within a certain time after a synchronisation trigger, and SPI is much faster than I2C. The MMA455L has an address pin, so you could easily connect two of these to one I2C bus.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • DAB
    0 DAB over 11 years ago in reply to vsluiter

    Hi Victor,

     

    Thanks for the update.

    I have to admit, this is an area that I only spent a limited time working on projects.  So in my mind, one accelerometer was plenty, but now I can see a much larger world where they could be employed.  Its always a good day to learn something new.

     

    DAB


    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • cy.gul
    0 cy.gul over 11 years ago

    Hi Yakub,

    The MMA7455L seems to be an I2C/SPI accelerometer.

     

    The PSoC 4 has a SCB (serial communication block) that can have 2 x I2C/SPI/UART on it. These alone can get you talking to 2 accelerometers.

     

    Additionally, you can run a UDB-based SPI or I2C for a 3rd one in case you need it.

     

    See this as an example: PSoC 4 Pioneer Kit Community Project#035 – UART, I2C, and SPI Joystick Example

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • hlipka
    0 hlipka over 11 years ago in reply to cy.gul

    Since SPI is a bus, there is no need to use multiple masters. Multiple chip-select signals are enough (and save pins that way). Different masters are only needed when the SPI configuration (CPOL / CPHA) are needed.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 11 years ago in reply to DAB

    Hi DAB,

     

    Thank you for your answer. In this case, I want to show in PC about 8 direction movement (like direction of the wind, e.g: N, NE, E, SE, S, SW, W, NW) using two accelerometer

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • vsluiter
    0 vsluiter over 11 years ago in reply to Former Member

    I can't see why you'd need two accelerometers for that... Please look into 2- or 3-axis accelerometers, they can give you 2-axis information in a single package!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • DAB
    0 DAB over 11 years ago in reply to Former Member

    Hi Yakub,

     

    I agree with Victor, you should only need to use one accellerometer to get a full 360 by 360 movement direction.

    If you have a good MCU, the trigonometry is pretty basic to work out the direction from which the force is being applied to the sensor.

     

    DAB


    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 10 years ago in reply to vsluiter

    Hi vsluiter,

     

    Could you introduce more about the project you mentioned with 7 gyro's and 7 accelerometers? Like what sensors and what microcontroller?

     

    I have a project which needs 3 gyro's and 3 accelerometers. This is my first project related to hardware thing. Could you help me through? Thanks,

     

    SoFun

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
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