DIY- gForce meter 1.0 [UPDATE]

Image

 

So this time around, it’s another fun and functional microcontroller based DIY, a g-force measurement system with data logging to SD card.

HARDWARE USED:

1) Arduino UNO w/ATmega328P
2) 3-axis accelerometer breakout
3) SD card
4) SD card breakout w/level shifting circuit
5) LED

HOW IT WORKS:

Basically, the system uses an accelerometer to measure g-force and a SD card to store the data. An Arduino UNO is used to process the data coming from the accelerometer and save it on to a SD card. The system was originally developed for setup tuning and performance optimization in RC cars. It makes use of Ch3 on the Rx for initiating or terminating the data logging sequence, which means you’ll need a three channel radio to make this work. However, if you’re familiar with Arduino, you can easily modify the code to substitute appropriate control actions and happily use it wherever and with whatever you want.

Technically, I’m using an ADXL335 3-axis accelerometer that can measure upto +/-3g. It doesn’t have an impressive output resolution, but I find it good enough for my application. The system reads data from all the three axes, which means it can measure a decent amount of useful data.
In RC cars, cornering forces, forward/reverse acceleration, breaking/collision forces, vertical shocks and suspension damping analysis data can be acquired. All this data is logged on to the SD card in independent .txt files for each axis.

 

Image

HOW TO USE:

Mount the gForce gauge on to your RC car, wire it up to Ch3 on Rx, press Ch3 on your Tx to initiate data logging, do some hard acceleration/ breaking or take on some high speed corners or whatever you want to measure and press Ch3 again to terminate the data logging sequence. A small LED is used to indicate the data logging in process. Unplug the SD card, connect it to a computer and You have the data that you can analyse and make necessary changes to your RC car to make it run faster and smoother.

The Arduino schematic does not show the level-shifting circuit required for the SD card, but it’s necessary, refer to the “SDcard Breakout DIY” schematic.
Format the SD card to FAT32 file system before using. Please use older less capacity SD cards like 2 GB or less. Not tested with SDHCs yet and MicroSD cards with SD adapter can be used, but again, 2GB MicroSD cards or less only. A few more warnings have been mentioned in the Arduino sketch itself, they’re worth noticing.

The Arduino code compiles to a binary sketch of roughly 17.24 KB in size, so the Arduino boards based on ATmega8 and ATmega168 will not work due to their limitations in flash memory size. I have tried to shrink the code as much as possible, but my smallest sketch is 15.79 KB and it’s 1.5 KB too much to fit on a ATmega168. I’m no expert, so if someone is capable of shrinking the code significantly, please do share it with me. For now, an ATmega328/Arduino Uno is apt and an ATmega2560/Arduino Mega with it’s plethora of I/Os is plenty.

Please watch the voltage ratings of your I/O devices. My ADXL335 breakout board came with an on-board 3.3v voltage regulator, which is why my schematics show it connected to the 5v supply. The same applies to SD card breakout board.

 

Image

CONCLUSION:

It’s not that much of a complicated DIY, but you need intermediate electronics skills at minumum. Quite a few things can go wrong, I wouldn’t suggest you try this as your first electronics based project. However, nobody is stopping you- frying a microcontroller chip is a crime not punishable by law!

COMING UP:

Additionally, I’m in the process of developing a real-time g-force analysis system using wireless transceiver modules like Xbee and putting all the hardware on a single PCB, no more bulky deveopment board hassle. Coupled to the telemetry system is a software interface that reads the incoming data in real-time and outputs the same in the form of a graph on a computer screen. The same bit of software can also be used to read the SD card data and generate a graph.

 

Image

FUTURE DEVELOPMENT:

Finally, a few of you are probably already planning to stick the gForce gauge on a model aeroplane or something like that, in that case, we’re on the same boat. I’m planning to build a smaller & light weight system for model aircrafts, helicopters and multirotors using the ADXL345 which has a higher resolution and an impressive range of upto +/-16g. Should be fun bragging to your friends, “My heli pulls 2Gs on 3D!!”

Download:  (Arduino code, schematics, pictures) https://www.dropbox.com/s/lm5mcbca4pklxku/AjCreations_gForce1.0.zip

UPDATE: I made a simple graph generator on LabVIEW for the gForce data. Download and extract the zip folder, open gForce2.0.exe, browse the .txt file and a graph will be generated. The app is very basic and might have bugs, I have added the LabVIEW source code (gForce2.0_editable) in the zip so you can modify it as you like.
Download: https://www.dropbox.com/s/588xz4meg727m8l/gForce_LabVIEW.zip

For any queries and more information, leave a comment here on my blog or email me on– anjan.anjan5@gmail.com
Good luck, DIYers!

Tagged: , , , , , , , , , , , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: