Tag Archives: arduino micro

Soldering, Soldering, Soldering 🙂 Everything else had been following the amazingly well written guides of the LSM9DS0 made by sparkfun. Nine degrees of freedom at a rate of “a few per second”(currently 9Hz) since I’ve followed just the basic setup without fancy interrupt usage.

One thing thats really important to mention is the different signal voltage level of the SDA and SCL pins between the Micro(5V) and the IMU Breakout Board(3.3V) – which in case you connect them together without bi-directional level shifting, as you might expect since i2c is designed for exactly that, would lead to blue chip burn.

So wiring on the bread board (and not removing the wires used by the arduino motor shield v2, so do not get too confused by that):

and applying the library to the arduino IDE, leads to a working live example with 2 outputs per second:So the next step is to increase the rate by improving the setup wiring, parse that data into ROS Hydro by a SensorMsg/Imu publisher, kalman and combining these with other odom sources like my currently used (and sadly poor) or even an GPS source to a exact and really usable Odometry by the robot_pose_ekf package for later Simultaneous Localization and Mapping (SLAM) – a real autonomous mapping and navigation. Sounds easy right?

I’ve experimented with the [amazon &title=BMP180&text=BMP180]. Since its a 3,3V breakout board which is I²C capable I had concerns since the Micro usually uses 5V on its Pins. But without a reason: the I²C on the[amazon &title=BMP180&text=BMP180] needs to get a voltage of 5V and the arduino micro also provides 3.3.
So wiring all together:

The Adafruit Motor Shield is a very well documented piece of electronics. Its capable of controlling 2 stepper motors or 4 dc motors with a additional possibility of moving 2 servo motors at once(!). So its perfect for small robot projects!
It has four phases of 1,4 Amps maximum current each with an even higher peak current – in case you cool it for instance by a fan it should even take more regular current like the chips datasheets promise. The voltage of the motors should be between 5 and 12 Volts (can be increased to 13 like most car batteries do have at least as long as I’ve connected it to mine for about 30 minutes).

The coolest thing about it is the I²C protocol (and the connected build in PWM-Chip) it speaks. Because of that its stackable with for instance other motor shields and can drive up to 96 Motors with a single i2c signal giver.
In most cases the signals come from the arduino family, more precisely the Duemilanove, Diecimila, Uno (all revisions), Leonardo and Mega/ADK R3 and higher. As you might recognized, there is no arduino micro in the list, but as it is just a smaller version of the Leonardo it should be possible to work too – right? The answer is: yes it does – at least if you solder right and find the connections that need to be made since the SDA and SCL Pins are digital 2 and 3 on the Micro and A4 and A5 on the shield. Adding 5V, 3V and ground is enough to get it running. (But keep an eye to short circuits and separate powering circuits for the micro)

The motor shield comes with an arduino library where everything gets explained very well. Just one thing they forget to mention is the needed:

Arduino

1

#define USE_USBCON

the motorsI’ve got to admit that the motors had been a bad joice so far – they are way to weak. I nearly drove me nuts to get them working, because I couldn’t believe how weak they are 🙂
So I’ve learned a lot about stepper motors datasheets and all of its very confusing unit handling the hard way. And I’ve done the mistake a lot of stepper motor newbies do: assuming the voltage needs to be the same as the batteries voltage. Avoid that thought in case you are building a robot currently 🙂