Tilt sensor (Part 2)

Part 123456789

Prior to writting any code, we must care about the interface to the Arduino Board. The output from the ADXL335 accelerometer depends on the strength of the acceleration force and may vary in a linear way between 0 and VSS. The mid point (VSS/2) corresponds to a “no force” condition. By default, Arduino analog to digital converters (adc) will convert signals ranging from 0 to 5 V in 1024 steps. If we keep this option, we will never use the 3 to 5 Volt range, which is sad. The idea now is to adjust the level of the output to make it compatible with the 0 to 1.1 V measuring range from the adc when they are set in INTERNAL mode. Looking carefully at the diagram one will notice that the output is buffered and sent out of the chip through a 32 KOhms resistor.

Simply adding a 15 KOhm resistor between the output and ground will create a divider bridge so that the output voltage is now compatible with the 0 to 1.1 V range!

Warning !The ADXL335 must be fed with VSS

Most of the hardwork is done, next step will describe the minimal code for reading adc values and converting them in usable information.

Next post on same subject

3 Comments

  1. Jim says:

    Why not feed the ADXL335 VCC 3.6V to AREF?

  2. Didier says:

    I am not with you Jim. AREF is an input pin as far as analogReference() is concerned.

  3. Jim says:

    Feed the ADXL and AREF by the same 3.6V. Code analogReference(EXTERNAL), then no need to divide the ADXL output. Or does it not work that way?

Leave a Reply

You must be logged in to post a comment.