Go Down

### Topic: adxl3xx example in IDE (Read 975 times)previous topic - next topic

#### regomodo

##### Feb 14, 2010, 12:54 amLast Edit: Feb 14, 2010, 01:08 am by regomodo Reason: 1
I've got  a question about one of the examples in the IDE.

For the adxl3xx it has supply maximum voltage of 3.6V. However, in the IDE it says this

Quote

// Provide ground and power by using the analog inputs as normal
// digital pins.  This makes it possible to directly connect the
// breakout board to the Arduino.  If you use the normal 5V and
// GND pins on the Arduino, you can remove these lines.

Is this example safe? It works but right now I refrain from using it for long periods.

#### PaulS

#1
##### Feb 14, 2010, 04:51 pm
Which ADXL3xx accelerometer do you have? The one that Sparkfun sells (http://www.sparkfun.com/commerce/product_info.php?products_id=849) has this on the data sheet:

Quote
Wide supply voltage range: 2.4 V to 5.25 V

#### regomodo

#2
##### Feb 14, 2010, 05:11 pmLast Edit: Feb 14, 2010, 05:13 pm by regomodo Reason: 1
I have the adxl335 at the sparkfun page it says

Quote
There is no on-board regulation, provided power should be between 1.8 and 3.6VDC.

It's likely i've damaged mine right?

#### PaulS

#3
##### Feb 14, 2010, 05:41 pm
Quote
It's likely i've damaged mine right?

You haven't done it any favors. It's not difficult to create a voltage divider, using 2 resistors so that the device can be powered by a digital pin.

pin (5V) --> R1 -+-> R2 --> gnd
|

If R1 is ~3K and R2 is ~6K, the voltage to the adxl3xx will be ~3.67V. Make R1 a little larger or R2 a little smaller to drop the voltage going to the accelerometer. Measure with a voltmeter to be certain. Compute the current flow for you resistors to be sure that you don't exceed the current capabilities of the digital pin (40mA max; 20mA recommended). Make sure the resistors can handle the current flow, too.

#### regomodo

#4
##### Feb 14, 2010, 05:55 pm
When I first used the accelerometer I used the 3.3v output and tied Aref to 3.3v as well and that worked fine.

I then noticed the adxl3xx example in the ide and saw that you could slot the board into the 6 analog pins directly and naively thought the example was safe. "adxl3xx" is misleading.

Go Up

Please enter a valid email to subscribe