sku: SEN-09814
Description: This is an evaluation board for the ADXL345 three-axis accelerometer. The ADXL345 is an awesome little accelerometer, capable of measuring acceleration of up to ±16g at up to 13-bit resolution. The evaluation board includes everything you'll need to adjust the ADXL345's settings, and monitor and log its outputs. The on-board ATmega328 takes care of all the I2C/SPI communication with the ADXL345, and it will also log the x-, y-, and z-axis acceleration values onto a uSD card.
The board includes a USB interface, which allows you to read/write any of the ADXL345's registers using a terminal emulator. The default baud rate is 57600bps (8-N-1). The UART pins are also broken out allowing a direct TTL interface with the processor. Power can be supplied by 2xAA batteries, or with a 3.0-3.3VDC power supply at the VCC/GND pins.
The ADXL345 evaluation board does not include batteries, uSD card or a USB cable, check the related items section below for these products. The source code provided below is written in C and bundled with hex files ready to load, however we've also made an Arduino sketch available that returns values from the ADXL345 so that you can take advantage of the Bootloader. The Arduino sketch doesn't do anything with the on-board LEDs but it does operate the accelerometer.
Note: Previous boards have been shipped without the Arduino Bootloader pre-installed on the ATmega328. This issue has been fixed; in all orders from now on the microprocessor will have the bootloader loaded.
Dimensions: 2.75x2.70"
Features:
Documents:
BOB-00718
Breakout Board for FT232RL USB to SerialPRT-00335
2500 mAh NiMH Battery - AAPRT-09100
1500 mAh Alkaline Battery - AACOM-08163
Flash Memory - microSD 1GBCAB-00598
USB Mini-B Cable - 6 FootGPS-08755
Package TrackerCOM-09433
microSD USB Reader
Comments 32 comments
The source code doesnot seem to have code for Arduino ( I think its for avrdude). Can you please post the code using Arduino.
The source code provided is all we have, sorry! There is (and never was) specific code written in Arduino, just C.
Damn it. I just programmed using Arduino IDE. Does it mean that the original program was gone?
Yes. You wrote over the original code.
I didn’t see a low-pass, anti-aliasing filter on the schematic or a place on the board to put one in. Did I miss it or is it built in, somehow, to the accelerometer?
The ADXL345 is a digital accelerometer that does not have the option of adding any analog filtering for anti-aliasing. You could add your own digital filtering, the application note AN-1025 describes using the FIFO Buffer to reduce the u-controller poling rate while maintaining the advantages of having a higher sampling rates in the device.
Can you give a brief description on how to use the pocket avr programmer to upload a script on the board. The board doesnot say which end is the first pin of the 6 pin header, can you put some light on it. If possible can you give the command line to be written for avrdude to write the source code (the one provided on this page) to the board. I tried a number of things but it keeps saying initialization failed.
( Sorry if any of the above is too obvious… I am a newbie)
KD, please see my separate comment that answers your questions.
Can you please provide an arduino template for this board?
As it is now I can program the board with arduino but I am having troubles accessing the accelerometer and the sd card.
Thanks
Thanks for the reply. I am just curious. Why didn’t you guys code it in Arduino in the first place?
I suggest you put a caution in the user guide. I just read the user guide, got excited, downloaded Arduino IDE, and erased it right away before I realize how catastrophic that was. Since I don’t have an ISP. I have to figure out how to port the c code into Arduino. Communication with ADXL345 is no big deal but microSD and FAT32 are big problems.
I for one am glad it’s not programmed in arduino.
Anyone coded in Arduino for this board? I appreciate if you can share.
Pin 1 on the ISP header is marked with a little bar. It is closest to the LEDs.
To write the .hex file included in the source code zip, you can use this (assuming your board comes up as /dev/ttyUSB0):
avrdude -carduino -patmega328p -P/dev/ttyUSB0 -b57600 -v -Uflash:w:ADXL345_Eval_v16.hex
Please note that the above avrdude cmdline does the programming over the USB connector, not the ISP connector with an external programmer.
I just pulled my board out and it has no reset button as advertised. Any help?
I jsut plugged mine in and looked at the data. It looks like a combo of hex and decimal output. Any thoughts?
I got data off the board, but it looks like it is hex. I thought the units were voltage. Where am I wrong? Please help, I’m just a dumb mechanical guy
“dumb mechanical guy” is an oxymoron.
The output is the raw 10-bit data from the accelerometer. You’ll want to check out the datasheet for the ADXL345 (follow the link to the related product). You’ll find out that the raw data is output as a 2’s compliment number; basically a number that can represent positive and negative numbers. Depending on the range you’ve selected for the ADXL345, you’ll have to scale this number appropriately to come up with the number of g’s.
I have a problem communicating with the board.
I am working w/ Windows XP. I have loaded numberous Virt com port drivers. I loaded teraterm.
I can’t figure out how to get the board to be recognized
What virtual com port drivers should I use (free hopefully)
Any help is appreciated
Did you download the FTDI drivers?
Does anyone know the clock speed of the atmega328p on this board? I can’t seem to find it in the documentation.
i believe the STK500V1 boot loader is set for 8mhz clock. So, it should be 8mhz.
I have finally started communicating with my board. But, my data coming out many times is in the 65,000 range. I can have 2 axes working fine, and the 3rd is saturated (like FFF4 and other nonsensical numbers). Any thoughts? Am I reducing the data wrong?
Beware that the ADXL345 is interfaced as an SPI device, SPI is bit banged because the hardware SPI is dedicated to the micro-SD care. No idea why they did it this way, but whatever…
I added I2C support by tapping into the traces off the mcu and running two jumper wires over to the .1" port output. Just make sure PORTC bits 1:2 are set to input mode!
Thanks for a great board and especially for sharing the schematics and code. I’d like to share some novice gotchas:
1. Beware of the Pocket Programmer and its ‘Power Target’ switch which will apply 5V to the board. While the ‘328 doesn’t mind, the ADXL345 has an absolute maximum rating of 3.9V. I feel lucky.
2. Beware of the labels on the header socket JP1 – the signals labelled 'PC6’ and ‘PC7’ go to ADC6 and ADC7 on the 328P and not to PORTC. Although there is a PC6, it does not come out on the header (you can’t use it anyway because it’s shared with !RESET) and there’s no such thing as PC7.
nuF
Nice little board.
But how do you use the data>??? OK, it logs to an uSD and there is tons of available data in 2’s compl. form. I need to draw a graph of that… and changing each value at a time is not an option.
Any suggestion on how to create the graphs for each axis?
Thanks a lot!!!
The simplest way I found was to use a spreadsheet program like Excel and use the built-in function hex2dec(). You may need to follow that up with an if() to do the two’s complement adjustment, as my Excel didn’t seem to recognize negatives.
e.g.
When plotting, you may also want to calculate the absolute magnitude of the three channels by squaring the signed decimal value of each channel using =power(), summing all the squared values and then taking the square root using =sqrt().
nuF
Hello. I don’t know where I could ask this question.
I am investigating ADXL346 as I really like the orientation functionality. However, the interface level is 2.75 volt max. Does anyone know why they would design something like that? I have never seen any MCU works at that voltage. My chip works at 3.3V and that makes it really hard to interface.
Thanks in advance.
Lower voltage equals lower power consumption, so VCCs are headed in that direction (many Atmel chips work down to 1.8V). You can use voltage translation circuitry to interface anything to anything else, but given the extra hardware, it might be easier to just change the orientation in software.
I buy the Evaluation Board recently, and i can change the ODR by burning BW_rate of register.I have a trouble that the ODR couldn’t modify over 200Hz, but i need use it to measure mechanical vibration for 3200Hz. Do you have any idea to change the ODR for 3200Hz?
For those wanting some Arduino code for this board based on the breakout board tutorial, check out this.
Hi i am just wondering. Since the board is using USb. How to connect it to arduino board and used the arduino code?May i get the circuit schematic connection between arduino and evalboard from you?thanks
The eval board is an Arduino! :–) It runs the Arduino bootloader and has an onboard USB-Serial connection implemented using an FTDI chip. In addition, it has the accelerometer and all associated circuitry mounted on the board, along with AA battery contacts and a micro SD card slot.
All you have to do is make sure you have the Arduino IDE installed and then plug in the board via USB to your computer. You should then see a new serial port available to upload to in the IDE. Select “Arduino Duemilanove w/ATmega 328” as the target board, paste the code from my pastebin into a new sketch and hit upload. Voila! If you now open a serial monitor window set to 9600 baud using the same serial port you just uploaded to, you should see acceleration values being reported back.