G Meter
Intro: G Meter
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
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:
Because I used COMMON ANODE LEDs:
"digitalWrite(led1G, HIGH);" turns the LEDs to OFF not ON.
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;
"digitalWrite(led1G, HIGH);" turns the LEDs to OFF not ON.
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;
STEP 3:
Here is an image of the circuit board I designed using expresspcb I also attached the PCB file and a parts list for doing this. You can make this board or leave all of you components on the arduino and try to fit it all in project box.
Note: the pin numbers labeled on the arduino board DO NOT correspond directly to the actual pin on the ATMega chip.
Note: the pin numbers labeled on the arduino board DO NOT correspond directly to the actual pin on the ATMega chip.
STEP 4:
Here is a video of my project completed on a bread board. The LEDs go up in .1g intervals Red=.2g Green= .1g
It starts with .2g to get rid of any false readings from bumps. So if there is 1 Red and 1 Green lit then that = .3g
On a breadboard:
http://www.youtube.com/watch?v=Aqjah4zaSgE&context=C3437408ADOEgsToPDskLehWVoW5nqCrdBkbWkdK3j
Finished:
It starts with .2g to get rid of any false readings from bumps. So if there is 1 Red and 1 Green lit then that = .3g
On a breadboard:
http://www.youtube.com/watch?v=Aqjah4zaSgE&context=C3437408ADOEgsToPDskLehWVoW5nqCrdBkbWkdK3j
Finished:
STEP 5: Final Project in a Box
Here is my completed project and the code. I will try to add the actual wire hook ups for those of you making it while attached to the arduino. Also here is my code (be kind it is my first EVER attempt a writing code)
http://www.youtube.com/watch?v=VX4jI8zNGVY&feature=player_embedded
http://www.youtube.com/watch?v=VX4jI8zNGVY&feature=player_embedded
24 Comments
infared067 11 years ago
hacourt 10 years ago
Vrooooooom 12 years ago
imperio 12 years ago
kikiorg 12 years ago
(Of course, the better question is, "what use is a G-meter in a late 80's VW." :) )
bhouston 12 years ago
imperio 12 years ago
bowmaster 12 years ago
Epimetheus 12 years ago
andamas 12 years ago
dagaherz 12 years ago
Could you adapt the project to work in 12V or 5V to get power from the car?
Good idea...hummm my car has "lazy spaces" too!!!
bhouston 12 years ago
Machine 12 years ago
I'd like to use that same style of illustration for my Instructables (yet to do one).
bhouston 12 years ago
http://fritzing.org/
Fo55ilise 12 years ago
Machine 12 years ago
Level 1 says "Pathetic, can't you do better?"
Level 2 says "Marvellous, now she's beginning to tip."
Level 3 says"Yippeeee, nearly on our side."
Level 4 says "Call an ambulance and a tow-truck."
zmashiah 12 years ago
I am actually building one myself with small Dot-Matrix display and ADXL345 sensor.
As for powering the unit, The boards specify 12V as their maximum supply voltage, and in the car the voltage can get slightly higher (13V is not uncommon), so I would refrain to directly power it from the 12V, but you could easily use a USB car charger to get 5V or put a 7805 regulator.
Machine 12 years ago
Maybe it should make sounds too, the higher the G the higher the pitch...
Epimetheus 12 years ago
askjerry 12 years ago
(Just bustin' on ya)