Summary of Make A G Meter using Arduino
This project involves installing a lateral gravitational force meter (G Meter) using an Arduino in the dummy LED locations of a late 80's VW gauge cluster. The G Meter uses an ADXL335 accelerometer to measure lateral G-forces and displays the results via 5 RGB LEDs. The guide provides parts lists for both Arduino-based and standalone circuit versions, explains wiring specifics, especially for common anode RGB LEDs, and includes code adjustments for different LED configurations.
Parts used in the VW Gravitational Force (G Meter) Project:
- Arduino (optional for Arduino-based setup)
- 5 RGB LEDs (RedGreenBlue, common anode)
- Project box (optional)
- 9V Battery
- ADXL335 Accelerometer (from Adafruit)
- Perf board
- 5 x 1K ohm resistors
- 5 x 500 ohm resistors
- Small jumper wires
- Circuit board (for standalone setup)
- ATmega168/328 microcontroller (for standalone setup)
- 28-pin socket
- 16 MHz resonator
- 104 capacitor
- 10 µF capacitor
- 3.3V regulator (LM1117T)
- Ribbon cable
- Header connectors
- 9V Battery connector
I have a late 80’s VW and the gauge cluster has 5 dummy LED locations underneath the other warning lights. Well I was tired of the m not doing anything, so I decided to do something about it. I came up with the idea to put a lateral gravitational force mater (G Meter) in there place
Step 1:
Gather up the needed supplies
If you wish to use your Arduino:
1- Arduino
5- RedGrenBlue LEDs (Mine are common anode)
1- Project box (if you don’t want it in your dash)
1- 9v Battery
1- Accelerometer (I used ADXL 335 from Adafruit) http://www.adafruit.com/products/163
1- piece of Perf board
5- Resistors 1K ohm
5- Resistors 500 ohm
And some small wires for jumpers.
All parts needed if you wish to make it standalone:
1 -Circuit Board
1- ATmega168/328
1- 28 Pin socket
5- RGB LEDs (Mine were common anode)
5-Resistors 1K ohm
5-Resistors 500 ohm
1- 16MHZ Resonator
1- 104 cap
1- 10uf cap
1- 3.3v rg. (LM1117T)
1- ribbon cable
1- header connectors
1- Acceleromoter
1- 9v Batt. Connector
Here is the picture of the wiring needed for a breadboard setup.
The orange wires hook to the 500 ohm resistors and then hook to the RED LED cathode.
The Green wires hook to 1kohm resistor the hook to the GREEN LED cathode.
The common anode is hooked to +3.3v
X axis output of ADXL335 goes to PIN 0 (Picture is slightly different)
+3.3v and Gnd are hooked to power and ground pins of ADXL335
The AREF pin on the Arduino is hooked to +3.3v
Step 2:
If you use common cathode you will need to change the code.If you wish to change the pin number just change the beginning of the code:int led1G = 2;
int led1R = 3;
int led2G = 4;
int led2R = 5;
int led3G = 6;
int led3R = 7;
int led4G = 8;
int led4R = 9;
int led5G = 10;
int led5R = 11;
int X_AXIS = 0;


