I am new to the Arduino world and trying to wire a Triple Axis Accelerometer (Model ADXL335 from SparkFun) to an Arduino Pro Mini 5V and get readings from the accelerometer. I may be going about the wiring in the wrong manner and would appreciate any advice.
I have wires running from the Arduino Pro Mini 5V from the analog A4 and A5 pins to a Logic Level Converter (from SparkFun) to the HV and GND pins. On the pins LV and GND (on Logic Level Converter) I have wires running to the GND and VCC on the Accelerometer. From pins A1, A2 and A3 on the Arduino I am running wire to the X, Y, and Z connections on the Accelerometer.
Anyway, I have written a simple program to get the readings on A1, A2, and A3 and print them to the serial monitor every 100ms. Occasionally, I will get some non-zero readings but mostly I am seeing just "0, 0, 0" printing on the screen. I seem to get the non-zero readings any time I place a finger on the logic-level converter, but none of my connections seem to be poor.
Do I have this wired properly or am I way off?
Thank you in advance for any resources or advice you can give.
I was under the impression that the accelerometer must receive no more than 3.3V. Since the Arduino outputs 5V I was thinking the level converter could be used to step down the voltage.
That's true, are you using the level converter to power the ADXL?
Note that it's called a Logic Level Converter, it's designed to convert logic levels of current not power supplies (although the ADXL only needs 350uA). The LLC needs a 5v (HV) and a 3v3 (LV) source, you need to provide both. 5v is easy but you really should use a 3v3 regulator to get the LV source.
from the Arduino Pro Mini 5V from the analog A4 and A5 pins to a Logic Level Converter (from SparkFun) to the HV and GND pins.
This doesn't sound right, I can't imagine how it would work.
GND should go to GND.
LV should go to 3v3.
HV should go to 5v.
All that said I'd ditch the LLC and get a 3v3 regulator. As the power requirements are so low you could use a voltage divider with two resistors as well I would think. (not ideal though, but should work until you get a regulator)