Pages: [1]   Go Down
Author Topic: New to Arduinos Question.  (Read 1183 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello, I don't know if I must write in this section of the forum but well here I go smiley-grin
Im interested in using an Arduino with a HMC5883LMagnetometer and MPU-6050 6 Axis Gyroscope Accelerometer
The idea is that I could just read the output of both components with the Arduino and send them to the computer by USB. Im new with Arduinos and I don't have one , but, Im interested in getting one, and I have the following question:
Is there any Arduino capable of reading from both components at the same time or do I need to do some kind of multiplexing ?
Also is there any tutorial that I could use in order to in some way get the idea of how to connect this components?
Logged

Ayer, Massachusetts, USA
Offline Offline
Edison Member
*
Karma: 50
Posts: 1767
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Both devices are I2C devices, which means they are on the same bus.  Each device has an address, and it only will respond when it sees that address.  So, you first would say to the magnetometer, give me a reading, and then you would ask the gyroscope to give you a reading.  These don't occur at the precise same time if you are looking at things from a quantum level, but they are close enough for practical uses, unless you are going at near light speeds.

One thing to note, both devices are rated to 3.46/3.6v and most Arduinos run at 5v (except the Due, and some low powered chips).  You will need to make sure that the devices get signals at the correct voltage.
« Last Edit: August 29, 2013, 01:00:26 am by MichaelMeissner » Logged

NSW Australia
Offline Offline
Edison Member
*
Karma: 35
Posts: 2404
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So, just a little more detail on that, though I can't give a full tutorial here.  Just Google to match "Arduino" with the chip numbers and look for code.

Oh, this was your first post here.  We do not know your programming experience so clearly your first step is to purchase the Arduino.  The general answer is that - of course it will work with these components, it is already the most popular platform for DIY multicopter systems (correct me someone, if I am wrong!).

You should get the components already assembled into little boards in similar fashion to the Arduino.  It is unlikely to actually be cheaper to get them individually anyway.  For experimentation, pin headers are usually provided to be soldered into the boards and used with breadboards and jumpers with "Dupont" pins, though of course for a "final" assembly, you would solder wiring to the boards without the pins.  Needless to say, you start by familiarising yourself with running "sketches" on the plain Arduino board alone - if you expect to require the USB connection to the computer then it makes sense to use a board with that interface built-in, such as a Uno or Nano.  If you did not require the USB in the final application, you use a Pro Mini.

The I2C bus is a form of "daisy chain" - all devices on it are simply in parallel (there is no "in" or "out" polarity of the connections, just two data connections SCL = Serial Clock and SDA = Serial Data plus Vcc and ground, total four wires).  The matter of the supply voltage is of some import, for the processor you need 5V supply if you wish to use one with a 16MHz clock, 3.3V only permits use of an 8 MHz clock (and the clock crystal or resonator is a fixed component).  If however the peripherals are only rated at 3.3V and you wish to use them with a 5V main board, you will need a level converter - also available from the very same sources as the magnetometer and Gyro/ Accelerometer boards.

Incidentally, just purchase a module with all those devices mounted.  I suggest you don't even think of assembling them onto a board yourself.  If you look for "10DOF" (degrees of freedom) you will find boards - purposed for miniature aircraft guidance systems such as the multicopters - with four sensor components including a barometer which is of course, an altimeter.  10DOF refer to three axis accelerometer, three axis gyro, three axis compass and barometer.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the replies, This will help me a lot!
If some one else want to add something else most appreciated smiley
Logged

Pages: [1]   Go Up
Jump to: