By Sam Proctor, Smart Solutions Research & Development
Having had the time to experiment with the Arduino Mega for a while we are now in the position to start building the Data Capture Board, exciting stuff really.
You may well ask, what is this data capture board for?
Continuing our aim to extend the life of racing motorcycle engines we need to be able to capture useful data that will ultimately allow us to achieve this goal.
Vibration analysis & Oil analysis are two keys tools within Condition Monitoring and in the context of Motorcycle engines, areas that are expected to yield the greatest chance for success.
The data capture board therefore will be used to acquire vibration data, not only this we also desire to do as much analysis as possible on-asset or as close to the point of data acquisition as possible.
Motivation for on asset analysis is in reducing the amount of data that needs to be transferred from the asset to another location for analysis.
This article describes building the prototype boards that will be used to capture the data and a first look at some sample data captured. Finally we will look at the output from applying some analysis to this data.
When starting out on this data capture board we wanted to make something that was a bit more flexible that just mounting everything on one board.
With this in mind we decided to locate the Arduino and SDCard on the same physical board and have the IMU connect via a cable. This would allow us to somewhat isolate the Arduino from vibration via a damping mount, the SDCard connections don’t look very ‘vibration resistant’.
Also since the Adafruit IMU connections via API a cable connector here would allow for other sensors to be examined further down the line.
In order to attach the connector and SDCard breakout board a shield has to be built for the Arduino Mega. RS Components stock the official shield development kit which we decided to use. This allows us to mount the SDCard board and solder the SPI cable without risking any damage to the Arduino board.
The parts to be used for this board are:
- Arduino Mega
- Mega Shield Development Kit
- Adafruit SDCard Breakout Board
- Adafruit 10DOF Breadout Board
- Adafruit Perma-Proto board
- Cables & Connector I had hanging around
Fabrication & Assembly
This part of the process is quite straight forward albeit time-consuming when done for the first time. As typical with a new design lots of testing as you go is required.
Starting with the Shield Development Kit, the pins to attach to the Arduino board are soldered on along with the reset button.
I also added a red LED to act as a power indicator since the LEDs on the Arduino are all but obscured by the Shield. Once this was done we can attach the shield to the Arduino, plug in the USB cable and expect to see the LED turn on!!!
as can be seen below it worked.
Moving swiftly on we now turn our attention to the IMU board. As previously mentioned we are using a separate board for the IMU to make data capture modular.
So in order to make the IMU board we need to solder the IMU to the Perma-Proto board. This Perma-Proto board is nice concept and allows for us to make a suitable board that can be mounted on a piece of rotating machinery.
Once the IMU is soldered on, we then have to connect the relevant pins to the cable. We were using a 5 pin cable for the 4 pins required from the IMU so it is pretty easy to solder these up and cut off the spare lead to avoid mistakes later on.
Below is a picture of the finished board, the idea is the mount this board via M5 bolts to the asset. This provides quite a lot of flexibility in terms of its mounting options.
Now we are back on the shield, the task at hand is to solder the SDCard board and IMU connecting cable to the shield board. This part is a little tricky since I was using jumper wires to create a tidy circuit.
The process is the pre-bend each wire so that it fits as flush as possible to the shield otherwise we are likely to result in a mess of wires. The result can be seen in the image below.
So there we have it, the circuit is essentially complete, we are able to insert the SD Card easily into its slot. The IMU connects while preventing the Arduino from having to be subject to the same vibration levels.
Quite interestingly what we have here is the base of a modular system, we could build a number of other shields with different data storage / transmission devices these could be swapped whilst still being able to connect the IMU.
Now the board is built its time to do a test of the devices, so lets write some code to check the SDCard is present and start sampling from the IMU. This test code will then log the samples to the SDCard, if this test passes then we can be confident in the board working as we intended.
To write this code we will use XCode rather than the standard Arduino IDE, thus Part 2 of this article series deals with getting XCode setup and the code we use to achieve the data capture.