Friday, August 1, 2014

Venturing into ARM Territory

Still thinking about the autopilot, I decided the Arduino was not going to make it for computing the inertial measurement unit (IMU) direction and error.

So I ordered some new stuff: 
STM32F429I-DISCO, STM32F4DISCOVERY and NUCLEO-F401RE from element14. They were not the cheapest, but they pretend to be a Malaysian company, so no problem with Customs. And they ship from Singapore so next day delivery for $2.50 US.

These are all small 32 bit ARM Cortex-m4 processors. The NUCLEO is Arduino shield compatible and the slowest at 84Mhz. The Discovery ones are the older generation, but 168Mhz. The big one has an TFT touch disply, so it cost a little more. I am hoping the NUCLEO will be fast enough since it is cheap.

I also ordered a 10DOF(degrees of freedom) IMU from a local company MyDuino.com.  It is a compact and low cost IMU from DFRobot. It integrates the ADXL345 accelerometer, the HMC5883L magnetometer, the ITG-3205 gyro and the BMP085 barometric pressure sensor on one board. They are all I2C devices and 3 axises each. So with careful combination you get a true magnetic course and the speed of deviation from that course. Just what an autopilot needs.

NUCLEO-F401RE at about $11 each at least should fun for a few days.
They are all mbed enabled with stlink built in. This means they implement a USB memory stick when plugged into a computer with USB. Programming the flash is magic. Copy the binary to the drive and if it recognizes it, it flashes the processor and removes the program from the drive.

Because it is mbed enabled you can go to mbed.org, create an account and instntly compile, download and install a number of demos. It seems easy to write programs and a reaasonable number of libraries are there.

One big gotcha though. If you have poor Internet connectivity like me on the boat, it is all done on-line. The user interface is FireFox.

I have installed the ARM tool chain to cross compile under Linux. And downloaded the ARM hardware support files from ST.com, but it is not as simple as the mbed stuff. There are other IDEs, like Arduino, but I havent fornd an open source one small enough to down load here yet.

I also have not found the mered of example and hardware driver libraries like the Arduino yet. Hopping that I just haven't looked in the right place yet.