Underwater ROV‎ > ‎Electronics‎ > ‎

Compass and Accelerometer

 am compiling a list of pins and where I will want to solder components.  Mostly I need to determine how many pins I will need to plug in in order to start soldering pins for the plugs to the arduino mega proto shield.

Here is a list of the breakdown of the pins/breakouts I'll want to position onto the shield.

  • manipulator (5 servos)
  • It would be possible to share ground and 5vdc
    • 1 shoulder rotate
    • 1 shoulder articulate
    • 1 elbow articulate
    • 1 wrist rotate
    • 1 gripper
  • Electronic Speed Control
    • 4 motors x 3 servo pins
  • (or) Control relays for the motors
Lights relay?
  • 2 x 2
  • Pins: 5
    • 3 analog
    • 1 ground
    • 1 +5vdc
  • Pins: 4
    • 2 Digital i2c (commmunications pins)
    • 1 ground
    • 1 +5vdc
  • Pins: 3
    • 1 Digital
    • 1 ground
    • 1 +5vdc
  • Pins: 3
    • 1 Analogue - Vout
    • 1 Ground
    • 1 +5 vdc - Vs
Light Sensor:??

Ethernet Shield Pins?
        Mega shield requires some rearranging to get the stock arduino ethernet shield to work.
Working on getting the Compass and Accelerometer to work

Compass on the breadboard waiting to solder some pins.

When attempting to get the compass to work, it took a little sleuthing.
The Arduino Mega has defined i2c channels (sda and sdl in the communications pin group).  It was necessary to plug the compass into those pins in order for it to talk to the arduino properly.  After that, I was able to hook a servo up and control the servo with the compass.

After getting the compass to work, I decided to try out the accelerometer.  The accelerometer plugs into the analog input pins, and no sleuthing was required to get it to function. :D
The compass and accelerometer on the breadboard.

This is the serial output of the compass:

This is the serial output of the accelerometer: