Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

Congratulations !
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> AR7212
View previous topic :: View next topic  
Author Message
Matrixx

Bascom Member



Joined: 30 Nov 2005
Posts: 158

mexico.gif
PostPosted: Sat May 21, 2011 6:16 am    Post subject: Reply with quote

This is the translated data. Sensors were mounted with gray tape to the dev board (they are not encapsulated, just the pcb). Sensed data comes from top of dashboard.

I feel is not god at all because I ran as coopilot gripping the dev board with my hands, keeping it fixed to the dashboard of the vehicle. Accel data looks good but gyro maybe not.



Uploaded with ImageShack.us

Monday I will improve mounting and will separate sensors from dev board, to get it behind seats to represent better the gravity center.

this is a capture of the data chart, this thing does not want to attach my .zip tomorrow I give a try.

Adrian, of course I will contact you : )



Last edited by Matrixx on Tue May 24, 2011 8:08 pm; edited 2 times in total
Back to top
View user's profile
Kiedro

Bascom Member



Joined: 08 Mar 2006
Posts: 81

germany.gif
PostPosted: Sat May 21, 2011 6:59 am    Post subject: Reply with quote

I agree with Adrian. Here is a recepy to combine GPS with accelerometers - based on the DCM:
http://nujournal.net/accDoppler.pdf
This (older) poster shows that the estimation of speed and distance does depend on the sampling rate: http://gpsports.com/gpsports_website/GPS_5_Hz_Poster_SMA_2010.pdf
Some years ago I also used the EB85 (old software), now LEA5H with helical antenna - it is recommendable.
Natalius
Back to top
View user's profile
Matrixx

Bascom Member



Joined: 30 Nov 2005
Posts: 158

mexico.gif
PostPosted: Sat May 21, 2011 7:51 pm    Post subject: Reply with quote

I have somewhere a gps engine with an helical antenna (i think is sarantel), I get it from a dismanteled golfing gadget. I remember the engine is 1 hz, but the helical always get my interest if it will improve my application as sarantel ponderates the reception in hand-held devices.

As the EB-85A has the patch I never connected it. I was tempted to use the whole assembly for test. This monday maybe I give a try. unfortunately is 1 hz.
Back to top
View user's profile
Matrixx

Bascom Member



Joined: 30 Nov 2005
Posts: 158

mexico.gif
PostPosted: Sun May 22, 2011 7:42 pm    Post subject: Reply with quote

forgot to tell that all my turns are +/- 0.5G
Back to top
View user's profile
AdrianJ

Bascom Expert



Joined: 16 Jan 2006
Posts: 2472
Location: Queensland

australia.gif
PostPosted: Sun May 22, 2011 11:58 pm    Post subject: Reply with quote

I figured you were in a road vehicle, so yes indeed its very difficult to get more than about 0.5 G in a turn, unlike aircraft. But you can get very high turn rates because of the low speeds and short distances involved, and its the tracking around the different directions that suffers. Whether using a GPS set to high dynamics improves that is another question.

AFAIK most GPS units use adaptive filters heavily in the signal processing, so you may get quite different effects even in different cases like doing circles ( continuous turns ) and doing single turns from otherwise straight courses.

Commercial GPS was never designed to handle this sort of situation really well, and you may be pushing the limits of what you can achieve. Most high-dynamics cases where tracking is a real issue are things like missiles and fighters, where they have tactical grade gyros and accelerometers to play with. Even the military use these, and they have military grade GPS as well, with 10Hz solutions as normal, and even 50Hz is possible.

_________________
Adrian Jansen
Computer language is a framework for creativity
Back to top
View user's profile Visit poster's website
Matrixx

Bascom Member



Joined: 30 Nov 2005
Posts: 158

mexico.gif
PostPosted: Tue May 24, 2011 10:57 pm    Post subject: Reply with quote

Hello Adrian, did you got mail ?
Back to top
View user's profile
AdrianJ

Bascom Expert



Joined: 16 Jan 2006
Posts: 2472
Location: Queensland

australia.gif
PostPosted: Wed May 25, 2011 12:47 am    Post subject: Reply with quote

Hi Matixx. Yes I did. Just have to resurrect some cost numbers, and I will get back to you.
_________________
Adrian Jansen
Computer language is a framework for creativity
Back to top
View user's profile Visit poster's website
Kiedro

Bascom Member



Joined: 08 Mar 2006
Posts: 81

germany.gif
PostPosted: Wed May 25, 2011 9:01 am    Post subject: Reply with quote

Thanks Adrian! What you do is very nice and helpful.
Back to top
View user's profile
Matrixx

Bascom Member



Joined: 30 Nov 2005
Posts: 158

mexico.gif
PostPosted: Sat May 28, 2011 9:02 pm    Post subject: Reply with quote

Natalius,

I have been reading your post on diydrones
http://diydrones.com/forum/topics/kixrazor-dcm-gps-data?commentId=705844%3AComment%3A154573

Is very impressive what Premerlani, you and all others have developed. App notes and explanation are easy to read for a not so involved in sensor fusion like me.

I was checking my posted data for the gyro/accel and found out I used the incorrect gyro sensitivity value. for the LR530 it has 1x and 4x so I used the 1x (0.83mV/deg/s) where I should use 3.33mV/deg/s as I,m using the 4x output. Good is that I logged raw values so recalculation was easily done but I still doubt of gyro values.

I'm trying now to find by calculation what is the value I shuld see from gyro turning the corners 90deg, at 15mph with radius of 35.9ft. arc of traveled distance is 56ft. to compare with read results and have idea if the gyro is performing well.

I have 3 days-off at work, as I have the dev board there, on thursday I will try to implement the DCM with the gyro and acc, let's experiment.

I will order a 3 axis gyro, in fact it maybe it will be good to try the one that Atmel is selling ATAVRSBIN1 (accel/gyro/magnetometer).

Adrian, thanks for having available the LEA4, hope my friend complete the order as soon as possible.

I will let you know the progress. : )
Back to top
View user's profile
Matrixx

Bascom Member



Joined: 30 Nov 2005
Posts: 158

mexico.gif
PostPosted: Sat Jun 04, 2011 7:40 am    Post subject: Reply with quote

Hello,

I have encapsulated the two sensor boards; ADXL335 xyz accel and the LPR530 xy gyro . For accel I used 0.47uF capacitors to set it to 10hz. I purchased the Gyro from sparkfun and removed 2 caps and 2 resistors that apparently caused some drift. Mounted the sensors at middle of vehicle.

have modified the M2560 to datalog at 5hz; accel data looks nice but again I'm not see my turn peaks in gyro data, instead I see a more or less uniform +/- 10deg/sec chart.

Maybe I'm expecting to see something likely to the accelerometers. As the turns are 90deg and the time by turn is around 4 seconds, I should expect a 22.5deg/sec values from gyro and well defined gyro peaks at turns...?


in other hand, Its nice the kiedro implementation of main loop, having adc timing of 20mS with 8mhz xtall and no interrupt and still reading gps, coding kix and doing dcm.

I need to handle ADC's up to 5.68mS while listening for gps 5hz @ 38,400 and saving to SD at 200mS and updating display at 300mS. One of my toughts is to test with kiedro's flow philosophy to check if I can reduce the interrupts and improve the loop times.

As the accel and gyro are now ready and logging, I'm almost ready to test the DCM on M2560.

http://imageshack.us/photo/my-images/854/accelchartxy.jpg/
http://imageshack.us/photo/my-images/803/gyrox.jpg/
http://imageshack.us/photo/my-images/15/gyroy.jpg/
http://imageshack.us/photo/my-images/27/sensor5dof.jpg/[/url]
Back to top
View user's profile
Kiedro

Bascom Member



Joined: 08 Mar 2006
Posts: 81

germany.gif
PostPosted: Sun Jun 05, 2011 6:20 pm    Post subject: Reply with quote

Hello Matrixx,

the gyro raw signals look noisy and appear a bit "digitized" indeed. I wonder how the integrated raw signal will look here. If you do a "manual integration" in Excell - just by plotting the sum of products of measured angular rates and sampling time intervals - how does it look then? If the (absolute) angles are then smaller than expected, it might help if you do differential ADC.

Natalius
Back to top
View user's profile
Matrixx

Bascom Member



Joined: 30 Nov 2005
Posts: 158

mexico.gif
PostPosted: Mon Jun 06, 2011 6:05 am    Post subject: Reply with quote

Hello kiedro, I tried to attach the xls on my previuos post, let's try here again. In the excel file is the raw from Gyro and the converted (scaled) values. Maybe I'm doing some wrong because reading your DCM code I see something different (we are using the same gyros).




I'm calculating the gyros this way:


Vref for M2560 iw 3.3V so 3.3/1023 = 0.003225806 volts / step.

I'm using the 4X output from gyros.

Gyro sensitivity as stated by datasheet is 3.33mV/Deg/sec @ 3V. Because I'm using 3.3V I supossed a simple-3-rule will find the sensitivity @ 3.3V so I did:

((3.3V)(3.33mV)) / 3V = 3.663 mV/deg/sec <------- i'm wrong? Embarassed

So I use these value for Gyro sensitivity: 3.663mV/Deg/sec (0.003663 volts / deg / sec).

I sampled before ran the quiet values for gyros. then will simply substract the 'quiet'values from run values.


Let's put this real example from attached (hope it will attach) data:


Quiet or zero "X" gyro raw value: 374. So (3.3V/1023)(374) = 1.206451613 Volts. this is my "zero" value.
Now, at determinated moment, the X gyro is showing the max raw value of 389.

then, (3.3V/1023)(389) = 1.25483871 Volts.
Substracting the "zero' voltage: 1.25483871 - 1.206451613 = 0.048387097 Volts


As the sensitivity is 3.663mV/deg/sec then I do

0.048387097 Volt / 0.003663 = 13.20969063 deg/sec. this is the max value I get from this attached data for X gyro. I expect to see a higer value, say 25 or 30 deg/s


Embarassed
Back to top
View user's profile
Kiedro

Bascom Member



Joined: 08 Mar 2006
Posts: 81

germany.gif
PostPosted: Mon Jun 06, 2011 5:52 pm    Post subject: Reply with quote

Hello Matrixx,

your calculation looks right to me. I remember a gyro-gain of 0.92. So if you have a difference of 15 ADC units (289-274) this is roughly equivalent to 13.x Deg/sec.

I did the "manual integration" inside Excel, playing with a number close to the average raw data as offset. The data reveal a substantial drift, first increasing then decreasing. As an Atmel engineer once said: Drift = integrated noise. Do the analog gyros accels have their own Vcc or is it shared with the M2560?

It looks to me that for your application +/-300/sec (equiv. to Vref+/-1 V at 3V Vcc) is bit at the high side. On the other hand, one should first fine the more fundamental issue.

Natalius
Back to top
View user's profile
Matrixx

Bascom Member



Joined: 30 Nov 2005
Posts: 158

mexico.gif
PostPosted: Mon Jun 06, 2011 8:10 pm    Post subject: Reply with quote

For the M2560 I have a PT78HT205V-ND (digikey part) to get 5V from the 13.8V from vehicle. Output is filtered with a 1000uF/16V cap.

Then I used a second low drop regulator to go from 5V to 3.3V, with cap of 100uF/16V.

3.3V Regulator is at main board, I run a 5 ft shielded cable to the encapsulated sensors, 3.3V go thru the cable to sensors. Both accel and gyro share the 3.3V wire. I can add a 100uF cap inside the sensor box.

My first impression from the 1st data was maybe 300 deg/seg is a High value for the ground vehicle. When I purchased the gyro (almost 1 and half year ago) I didn't know the usable range for my application, it was just the chance to start playing with gyros. So maybe the 10bit Adc is not resolving well the small gyro changes...


I'd realized I'm already using your concept, let it flow but know the time precisely; but I'm using it only in the gprmc parsing procedure. Every gprmc I measure with 16bit timer, prescaled to 256 (1/14745600)(256) = 17uS.

So it will be a good idea to get a low range Gyros...?
Back to top
View user's profile
Kiedro

Bascom Member



Joined: 08 Mar 2006
Posts: 81

germany.gif
PostPosted: Mon Jun 06, 2011 9:51 pm    Post subject: Reply with quote

Hmm, if you run the M2560 at 5V and "full" speed (>8Mhz), then the calculation changes. Depending on how you have configured the ADC, 10 bit resolution could apply to 5V, viz. about 5 mV per LSB. We would still not see a factor of two but something around 1.5 (5/3.3). 274 * 5 mV looks close to what is presumably the reference voltage (for neutral signals) at 3.3V. If I am right, and if a car will have a turn rate of 45 deg/sec max. one might start experimenting with differential ADC, gain = 10, indeed.

On the other side, the new Atmel A1 Xplained board plus Sensors Xplained Inertial One might be faster and cheaper considering that there is only the need to adapt the SW for the case that no Bosch BMP085 is plugged on.. Even if 2000 deg/sec is an overkill for a a car application, one needs to see that high res internal ADC comes without extra charge, viz. as "free lunch"

Or, going both ways might be also an option. One to arrive at a prototype and the other to arrive at something close to a product. For anybody among us it is hard to beat Atmel boards when it comes to pricing. 54USD for a 9DOF is hard to beat. When I saw this I said to myself: If you can't beat them, join them!

Natalius


Last edited by Kiedro on Tue Jun 07, 2011 11:35 am; edited 2 times in total
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> AR7212 All times are GMT + 1 Hour
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum