I am new to DIY electronics and arduino. This looks like a neat forum.
I'm interested in doing inertial measurement while simultaneously measuring strain. I'd like this data to be transmitted via bluetooth (or wifi) to an android device running amarino. (http://www.amarino-toolkit.net/). Once there, I'd like to log the data and plot it.
I've started to pieced together a system on sparkfun.
Function
Item
Note and sparkfun part #
Data Transmission
Bluetooth Mate Gold
WRL-09358
1 Inertial Measurement Unit
9 DOF - Razor IMU (AHRS compatible)
SEN-10736 Should work with arduino IDE and Amarino (Program as Arduino Pro)
2-4 strain gauges
Off the shelf
A wheatstone bridge for each gauge
?
Built in excitation and amplification
?
Built in signal conditioning
?
(Nice but only necessary if <1kHz throughput)
12bit+ A/D converter for each gauge
?
COM-08636 on sparkfun is 10bit
All this in a package no bigger than it has to be. My questions are:
It appears the sparkfun IMU works well with the bluetooth transmitter and interfaces with the Arduino IDE... can I send the strain gauge data through the same transmitter and board? How? If not, I assume I need another Arduino board.
What overall sampling rate can I send (2 gauges, 4 gauges... how much can bluetooth handle. I don't need all 9 DOF on the IMU)?
Are there off-the-shelf parts which will do excitation, amplification, signal conditioning, and AD conversion for gauges or must these be built. (Looking for an all-in-one package like the IMU).
..it seems the atmega328p (razor IMU module) connects the imu stuff via i2c only, so you may use SPI for a few 12-16bit ADCs to measure the strain (you may use few free analog inputs on the 328p as well, 10bits resolution). When you rewrite the sw then you can send everything via a BT connected. So provided
a) you will get 16bit values from all your sensors,
b) the amount of data to be sent is 3x16+3x16+3x16+4x16=208bits, plus some overhead
c) you will go with 57kbit/sec (probably the maximum with the 8MHz razor clock)
d) then ~200 measurements per second to get via BT is doable (no math inside the atmega328's razor module)..
p.
Thanks pito. That is helpful information... especially wrt the SPI. I'll go ahead and buy the IMU and start playing around on a breadboard for the other things.
The strain gauges certainly don't provide 16 bit accuracy in my application and some strain gauges are less important than others (hence between 2 and 4 gauges). I'll put the two less important gauges on the 10bit analogs and they'll do the job.
I have the razor IMU. I have the FTDI breakout and am able to "see" the preinstalled firmware on the IMU using the arduino development gui. I also bought the bluetooth gold and can see and connect to that using amarino from my phone.
I can't figure out how to actual run through the IMU firmwares menu to test the device... when I "monitor" the serial connection using the arduino gui, it presents a menu. I type and "send" a number and nothing happens. Thus...
First question: the sparkfun site says connect with a terminal... but I'm not sure exactly what is meant by a terminal. I run a bash shell in konsole on a gentoo machine... that's my terminal. Is there a specific type of terminal that connects to the serial port? How does one do that? Telnet? I'm confident at the linux command line but this stuff is beyond my normal usage. I looked into minicom... is that the right direction?
Second related question: I'm trying to compile the example firmware sketch for the IMU. Opening it in the arduino gui and pushing the verify button I get this:
razor.cpp:88:24: error: expected primary-expression before '.' token
I'm already in trouble... I'm not a c programmer (some fortran experience)... went to lines 88 and 24 and didn't find a ".". ie nothing obvious to me. Hints?
Tried a different route by using the Makefile outside of the arduino development gui. That lead to this set of messages:
-------- begin --------
avr-gcc (Gentoo 4.5.3-r1 p1.0, pie-0.4.5) 4.5.3
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Size before:
avr-size: unrecognized option '--mcu=atmega328p'
Usage: avr-size [option(s)] [file(s)]
Displays the sizes of sections inside binary files
If no input file(s) are specified, a.out is assumed
The options are:
-A|-B --format={sysv|berkeley} Select output style (default is berkeley)
-o|-d|-x --radix={8|10|16} Display numbers in octal, decimal or hex
-t --totals Display the total sizes (Berkeley only)
--common Display total size for *COM* syms
--target=<bfdname> Set the binary file format
@<file> Read options from <file>
-h --help Display this information
-v --version Display the program's version
avr-size: supported targets: elf32-avr elf32-little elf32-big plugin srec symbolsrec verilog tekhex binary ihex
Size after:
avr-size: unrecognized option '--mcu=atmega328p'
Usage: avr-size [option(s)] [file(s)]
Displays the sizes of sections inside binary files
If no input file(s) are specified, a.out is assumed
The options are:
-A|-B --format={sysv|berkeley} Select output style (default is berkeley)
-o|-d|-x --radix={8|10|16} Display numbers in octal, decimal or hex
-t --totals Display the total sizes (Berkeley only)
--common Display total size for *COM* syms
--target=<bfdname> Set the binary file format
@<file> Read options from <file>
-h --help Display this information
-v --version Display the program's version
avr-size: supported targets: elf32-avr elf32-little elf32-big plugin srec symbolsrec verilog tekhex binary ihex
-------- end --------
On the bright side... to learn I also bought an arduino uno (actually the sparkfun inventor's kit) and was able to make the tutorials work. Flashing LEDs, plots of pot resistance using processing... much progress has been made.
I am working on a 2-4 thermocouple sensor network via arduino uno/pro and SparkFun BlueSmirf Silver, or perhaps WiFly Shield. Do you need help with the BT connection and terminal? I might be able to help. And, I too hope to receive and graph the data. So, we might be able to workout something together if you are interested.
Regarding finding your serial port in terminal, try:
ls /dev/tty.* //this gives you a listing of available ports.
Then, try:
screen /dev/tty.myport 9600 //this starts a session at 9600--you should check the datasheet for the initial baud rate, since it took me a long time to get the BlueSmirf running without proper baud rate...
Also, try:
script mylog.txt //this will log your session to the file mylog.txt
Hi Sam,
Thanks for the reply and sorry it took a month delay for me to respond it. (It was that time of year.)
I was able to figure several things out. I'm compiling and transferring just fine and am able to monitor the serial port. I was even able to graph an integer count over bluetooth to amarino. The next challenge for me is getting more than one signal across bluetooth. (I assume this is figuring out how to parse the data stream.) After that, how to interface the AD over SPI...