Loguino Data Aquisition for Arduino

I’ve been interested in capturing data from the seven since the moment I could drive it. I’ve looked at commercial data loggers, and there are plenty of good options, I use the ETB Digidash on the Fury, and it’s very competent, not least in the analysis software.

For the seven though, I didn’t feel there was a good fit for a number of reasons:

  • not many data logging tools support reading data from the megasquirt ECU, which is critical to get any information about the engine at runtime.
  • Many data loggers are geared towards providing an in car display system, but I already have a working dashboard that I like.
  • Usually they are limited to a number of channels, each channel having a predefined function or purpose.
So I decided one day to make my own, my first step was the bifferboard, this is a 486pc on a chip, it was easy to program since it runs linux, but it wasn’t the right tool for the job.  I’d hear lots of good things about Arduino, an embedded platform, and once I got my head around the API, it was clear this was the perfect solution, and shortly thereafter loguino was born.
Loguino itself is a generic logging platform, it functions a little bit like log4perl/java/etc in that you have a logging class that accepts log messages, and logger outputs that take those messages and do something meaningful with them.  Most of the time this is simply write the message to a disk, or output it over the serial line, but it could be used to control shift lights or any other task too.
Data is generated by pollers, pollers are polled periodically and generate messages which are picked up by the loggers.  The first task was to write one for the megasquirt, this allows me to pull engine data directly into the logging tool. The next step was gps speed and positioning, and then support for accelerometers and gyroscopes.
I chose a very simple logging format, rather than use columns, I decided to use key value pairs, this means the tool can be completely agnostic about formatting, time, and everything else.  My view is that once data is downloaded of the loguino, it will go into a database and be queried.  Having seen google chart, and flot, I decided there was no real need to use excel or write complex software, instead it should be a case of adding and removing series, and scaling them.  This spawned metriflot, a data visualization package, and was a great way for me to learn some Ajax and django.
Having tested loguino over the summer, I’ll be doing a permanent install over the winter with wheel speed sensors, brake temperature, pressure, and all sorts of other sensors, and generally tidying up the packaging.  Next year I’ll be able to concentrate on the analysis where I want to have more intelligent data trending, for example:
  • Is the engine temperature hot because of the outside temperature, speed, or a fault?
  • Is the oil pump failing or was i just not driving hard enough?
There is a lot of potential here, as well as a good chance for me to learn more about electronics and data analysis, and hopefully it will benefit others too.
Loguino was released under the GPL license, and is hosted on google code.

CFD for the Seven

I’ve long had an interest in CFD, and now that OpenFOAM is getting pretty mature, I decided to have a go at modeling the seven.  I drew the car using Solidworks, I focussed more on the shape of the car, rather than accuracy of the chassis etc and the result is a fairly simple parametric model.

Lotus seven replica modeled using open foam, visualized using paraview
SimpleFOAM was used to create the data, then ParaView to visualize the result.

As I only have a couple of macs at home, I used RDP to connect to an amazon EC2 instance to do the actual drawing.  This works surprisingly well, and has the added advantage of not having another windows system to deal with.

To perform the actual CFD, I use openFOAM running on my mac mini to do the preprocessing, then ship this off to a linux instance on ec2 to do the actual calculation.

Looking at this thread, it would appear that its worth spending some time tweaking the solver to converge sooner, since my main issue right now is the time for a run, and the memory requirement for meshing, it would make sense to optimize this, so i’ve written a workflow and some optimization logic.  The end result should be a model that can tune itself within certain parameters, not only for the solver, but also for the model itself, with Solidworks reading in parameters at run time and generating a new STL file for each combination.

Post finals, I’ll tidy it up and publish the optimizer.

Metriflot

After lamenting about the difficulty of getting specific usage and utilization reports out of the scheduling system, I decided to write a tool to help.  What I basically want is a tool that can collect metrics on one or more systems, graph any combination of metrics and not much else.  There are plenty of tools to chose from, and we use quite a few of them already.

There’s ganglia, which is great for capturing cluster data, and it is used extensively, however I need to deal in exact values, so the average queue time a year ago isn’t acceptable, i need real, hard data.  I could tweak RRD, but at the end of the day its also not that pretty, and prettiness counts, especially when dealing with stake holders.

There is RTM, which is based on cacti, its pretty good and it has soon good graphs out the box, but it doesn’t have the graphs I need, its not very pretty, and its also not very solid.  I’m never 100% confident in the data I get from RTM, and in all honesty, its just overkill for my simple graphing needs.

Lastly, there is platform analytics, but its really a windows tool, yes it does pretty things, and is very extensible, but I can probably write the tool I want faster than even installing analytics.

The end result is metriflot, a catonation of metric, and flot, the latter being the ajax graphing library i’m using.  It meets my immediate requirement which is to create some simple graphs of esoteric cluster usage statistics, and in the process learned some more Django, Ajax, and Flot.

I’ve uploaded the source to google code here.