Carduino 2.0 – Intel Galileo Setup

Out of the box the Galileo is setup to run sketches uploaded from volatile memory, which is really lame. I didn’t spend much time with it using the stock SPI kernel. So, an SD card is pretty much required to do any serious development with this board. This is not a bad thing (although you aren’t running in real-time anymore), since having a full OS to use has lots of advantages. Plus, this way I can automate the build process in a way I’m more familiar with. Continue reading

Carduino 2.0

Over a year ago I got an Arduino Uno and a CAN-BUS Shield to try and make some kind of datalogger for my car. I was also interested in using the OpenXC library with it (which might need a port if there isn’t one already, since it uses the Digilent chipKIT Max32 development board). While OpenXC allows interfacing with Android stuff for phones, I’m more interested in a self-contained datalogging type deal. Connecting a phone to review/control things would be a plus, but not required. Mainly, it would record to an SD card for later manipulation on any platform.

The problem with the Uno was that it has limited flash storage space, 32KB total. Lots of strings (for LCD output) in my source combined with some poorly written C++ CAN-BUS/SD/GPS libraries that SK PANG provide with the CAN-BUS shield, and the compiled output is just too large. The libraries are a hodge-podge of various OSS projects. I intend to rewrite them in C. You can run the binaries off the SD Card, but that’s not what I wanted the SD Card for.

Carduino 2.0

So, I just got a Arduino Galileo, which is way overkill. It was either get a Arduino Mega, which has enough flash but is otherwise relatively the same (and likely going to be obsolete soon), or get the Galileo. Instead of Atmega powered, it has a real Intel x86 SoC and runs Linux! No more AVR cross-compiling. And since it is Arduino Uno “shield compatible”, I don’t have to worry about the shield not working (I think! I’m assuming the shield follows the Uno spec.).

8MB Flash, 400MHz clock speed and a whole other bunch of superior specs I don’t remember. Now, the embedded Linux kernel is on that 8MB, and takes most of it up. So at first it looked like I was in the same boat. However, it has a built-in SD card slot that you can load up another, larger, image onto. Now I have two SD Card slots, one on board and one on the CAN-BUS shield. One for the OS, one for logging data. Perfect.

First I have to get familiar with the Galileo and setup the environment. After that I can start developing. So this will be split up into at least two other parts.

Carduino

I’ve been working on a small Arduino project to datalog my commute. I’m using an Arduino Uno with SK Pang’s CAN Bus Shield. I also have added the optional GPS and LCD to the mix. There is an micro-SD card slot for storage.

sIMG_20130129_191447

The aim of the project is just to collect data. As much as I can put into the SD card. I plan on calculating driving efficiency using somewhat arbitrary measures like throttle modulation, temperature, etc.

Hardware:

So, all-in-all, about $170.

 

sIMG_20130129_184137

Here are most of the parts before soldering the JST stuff on.

sIMG_20130129_184208

The actual JST socket should be on the other side of the PCB. Oops. And I wish the “joystick” wasn’t soldered on from the get-go, so I could mount it (or something similar) somewhere else.

I’ve gotten the (horribly written) example code working, and know that it will work with my car. I’m attempting to modularize the example code and mix it with my own to make a slightly better designed program.

The repository is public.

I might also incorporate parts of OpenXC in this as well. And I’ve forked OpenXC in the hopes of one day porting it to work with this CAN Bus shield.

I followed this guide to work in Eclipse.