Show Posts
Pages: [1]
1  Using Arduino / Sensors / Re: [HMC5883L Magnetometer] - Wrong Scaled values on: November 05, 2012, 06:45:20 am
Hi,
I've only tried to run the example (just changed the default scale):

Code:
  Serial.println("Setting scale to +/- 0.88 Ga");
  error = compass.SetScale(0.88); // Set the scale of the compass.
  if(error != 0) // If there is an error, print it out.
    Serial.println(compass.GetErrorText(error));

@michinyon:
I don't get 4096 all the time but only when I put the cellphone on the magnetometer (and this is right)
The problem is the scaled values: If I set the scale to 0.88, when I put the cellphone on the mag, should the scaled values be comprised between -800 and 800 or not?

Thanks

Alessandro



Code:
Starting the I2C interface.
Constructing new HMC5883L
Setting scale to +/- 0.88 Ga
Setting measurement mode to continous.
Raw: -458   -393   -31    Scaled: -334.34   -286.89   -22.63    Heading: 3.90 Radians    223.25 Degrees   
Raw: -457   -390   -28    Scaled: -333.61   -284.70   -20.44    Heading: 3.89 Radians    223.10 Degrees   
Raw: -455   -398   -27    Scaled: -332.15   -290.54   -19.71    Heading: 3.91 Radians    223.80 Degrees   
Raw: -457   -396   -28    Scaled: -333.61   -289.08   -20.44    Heading: 3.90 Radians    223.53 Degrees   
Raw: -456   -393   -29    Scaled: -332.88   -286.89   -21.17    Heading: 3.90 Radians    223.37 Degrees   
Raw: -455   -390   -31    Scaled: -332.15   -284.70   -22.63    Heading: 3.90 Radians    223.22 Degrees   
Raw: -461   -396   -31    Scaled: -336.53   -289.08   -22.63    Heading: 3.90 Radians    223.28 Degrees   
Raw: -455   -395   -28    Scaled: -332.15   -286.16   -21.17    Heading: 3.90 Radians    223.36 Degrees   
Raw: -459   -391   -30    Scaled: -335.07   -285.43   -21.90    Heading: 3.89 Radians    223.04 Degrees   
Raw: -458   -393   -31    Scaled: -334.34   -286.89   -22.63    Heading: 3.90 Radians    223.25 Degrees   
Raw: -454   -393   -28    Scaled: -331.42   -286.89   -20.44    Heading: 3.90 Radians    223.50 Degrees   
Raw: -456   -391   -28    Scaled: -332.88   -285.43   -20.44    Heading: 3.90 Radians    223.23 Degrees   
Raw: -459   -392   -31    Scaled: -335.07   -286.16   -22.63    Heading: 3.89 Radians    223.12 Degrees   
Raw: -458   -393   -32    Scaled: -334.34   -286.89   -23.36    Heading: 3.90 Radians    223.25 Degrees   
Raw: -459   -395   -29    Scaled: -335.07   -288.35   -21.17    Heading: 3.90 Radians    223.33 Degrees   
Raw: -452   -393   -29    Scaled: -329.96   -286.89   -21.17    Heading: 3.90 Radians    223.62 Degrees   
Raw: -461   -393   -26    Scaled: -336.53   -286.89   -18.98    Heading: 3.89 Radians    223.07 Degrees   
Raw: -457   -393   -31    Scaled: -333.61   -286.89   -22.63    Heading: 3.90 Radians    223.31 Degrees   
Raw: -457   -392   -31    Scaled: -333.61   -286.16   -22.63    Heading: 3.90 Radians    223.24 Degrees   
Raw: -458   -392   -29    Scaled: -334.34   -286.16   -21.17    Heading: 3.90 Radians    223.18 Degrees   
Raw: -456   -396   -29    Scaled: -332.88   -289.08   -21.17    Heading: 3.90 Radians    223.59 Degrees   
Raw: -457   -396   -31    Scaled: -333.61   -289.08   -22.63    Heading: 3.90 Radians    223.53 Degrees   
Raw: -459   -397   -30    Scaled: -335.07   -289.81   -21.90    Heading: 3.90 Radians    223.48 Degrees   
Raw: -458   -394   -29    Scaled: -334.34   -287.62   -21.17    Heading: 3.90 Radians    223.32 Degrees   
Raw: -458   -396   -31    Scaled: -334.34   -289.08   -22.63    Heading: 3.90 Radians    223.47 Degrees   
Raw: -452   -394   -30    Scaled: -329.96   -287.62   -21.90    Heading: 3.90 Radians    223.70 Degrees   
Raw: -450   -392   -32    Scaled: -328.50   -286.16   -23.36    Heading: 3.90 Radians    223.68 Degrees   
Raw: -441   -389   -33    Scaled: -321.93   -283.97   -24.09    Heading: 3.91 Radians    224.03 Degrees   
Raw: -419   -369   -17    Scaled: -305.87   -269.37   -12.41    Heading: 3.91 Radians    223.99 Degrees   
Raw: -367   -269   107    Scaled: -267.91   -196.37   78.11    Heading: 3.82 Radians    218.86 Degrees   
Raw: -360   -180   248    Scaled: -262.80   -131.40   181.04    Heading: 3.65 Radians    209.18 Degrees   
Raw: -166   193   667    Scaled: -121.18   140.89   486.91    Heading: 2.33 Radians    133.32 Degrees   
Raw: 220   1429   -4096    Scaled: 160.60   1043.17   -2990.08    Heading: 1.46 Radians    83.87 Degrees   
Raw: -332   1127   -4096    Scaled: -242.36   822.71   -2990.08    Heading: 1.90 Radians    109.03 Degrees   
Raw: -1860   85   -4096    Scaled: -1357.80   62.05   -2990.08    Heading: 3.14 Radians    180.00 Degrees


putting the cellphone on the mag:


Code:
 
Raw: -4096   -236   -4096    Scaled: -2990.08   -172.28   -2990.08    Heading: 3.24 Radians    185.92 Degrees
Raw: -4096   -957   -4096    Scaled: -2990.08   -698.61   -2990.08    Heading: 3.42 Radians    195.77 Degrees   
Raw: -4096   -628   -4096    Scaled: -2990.08   -458.44   -2990.08    Heading: 3.34 Radians    191.34 Degrees   
Raw: -4096   -610   -4096    Scaled: -2990.08   -445.30   -2990.08    Heading: 3.34 Radians    191.09 Degrees   
Raw: -4096   -584   -4096    Scaled: -2990.08   -426.32   -2990.08    Heading: 3.33 Radians    190.73 Degrees   
Raw: -4096   -528   -4096    Scaled: -2990.08   -385.44   -2990.08    Heading: 3.32 Radians    189.96 Degrees   
Raw: -4096   -509   -4096    Scaled: -2990.08   -371.57   -2990.08    Heading: 3.31 Radians    189.70 Degrees   
Raw: -4096   -480   -4096    Scaled: -2990.08   -350.40   -2990.08    Heading: 3.30 Radians    189.30 Degrees   
Raw: -4096   -467   -4096    Scaled: -2990.08   -340.91   -2990.08    Heading: 3.30 Radians    189.12 Degrees   
Raw: -4096   -445   -4096    Scaled: -2990.08   -324.85   -2990.08    Heading: 3.30 Radians    188.82 Degrees   
Raw: -4096   -430   -4096    Scaled: -2990.08   -313.90   -2990.08    Heading: 3.29 Radians    188.61 Degrees   
Raw: -4096   -405   -4096    Scaled: -2990.08   -295.65   -2990.08    Heading: 3.29 Radians    188.27 Degrees   
Raw: -4096   -402   -4096    Scaled: -2990.08   -293.46   -2990.08    Heading: 3.29 Radians    188.22 Degrees   
Raw: -4096   -402   -4096    Scaled: -2990.08   -293.46   -2990.08    Heading: 3.29 Radians    188.22 Degrees   
Raw: -4096   -400   -4096    Scaled: -2990.08   -292.00   -2990.08    Heading: 3.28 Radians    188.20 Degrees   
Raw: -4096   -401   -4096    Scaled: -2990.08   -292.73   -2990.08    Heading: 3.28 Radians    188.21 Degrees   
Raw: -4096   -388   -4096    Scaled: -2990.08   -283.24   -2990.08    Heading: 3.28 Radians    188.03 Degrees   
Raw: -4096   -390   -4096    Scaled: -2990.08   -284.70   -2990.08    Heading: 3.28 Radians    188.06 Degrees   
Raw: -4096   -395   -4096    Scaled: -2990.08   -288.35   -2990.08    Heading: 3.28 Radians    188.13 Degrees   
Raw: -4096   -387   -4096    Scaled: -2990.08   -282.51   -2990.08    Heading: 3.28 Radians    188.02 Degrees   
Raw: -4096   -389   -4096    Scaled: -2990.08   -283.97   -2990.08    Heading: 3.28 Radians    188.04 Degrees   
Raw: -4096   -389   -4096    Scaled: -2990.08   -283.97   -2990.08    Heading: 3.28 Radians    188.04 Degrees   
Raw: -4096   -379   -4096    Scaled: -2990.08   -276.67   -2990.08    Heading: 3.28 Radians    187.90 Degrees   
Raw: -4096   -366   -4096    Scaled: -2990.08   -267.18   -2990.08    Heading: 3.28 Radians    187.72 Degrees   
2  Using Arduino / Sensors / [HMC5883L Magnetometer] - Wrong Scaled values on: October 31, 2012, 04:57:05 am
Hi,
I tried to use the library on http://bildr.org/2012/02/hmc5883l_arduino/ for HMC5883L magnetometer and it works fine. I only have a bit question concerning scaled values: If I set the scale range to +/- 0.88 Gauss and I put my cellphone on the sensor, the maximum value for scaled values aren't -800 (mGauss) but something near -3000 (mGauss). It's seems that, despite I set the Scale Range to +/- 0.88 Gauss, it uses another scale range.
Do you have some suggestions?

Regards,

Alessandro

Here is the output:
Code:
Starting the I2C interface.
Constructing new HMC5883L
Setting scale to +/- 0.88 Ga
Setting measurement mode to continous.
Raw: -4096   -1795   -4096   Scaled: -2990.08   -1310.35   -2990.08   Heading: 3.60 Radians   206.28 Degrees  
Raw: -4096   -4096   -4096   Scaled: -2990.08   -2990.08   -2990.08   Heading: 3.97 Radians   227.62 Degrees  
Raw: -4096   -4096   -4096   Scaled: -2990.08   -2990.08   -2990.08   Heading: 3.97 Radians   227.62 Degrees  
Raw: -4096   -4096   -4096   Scaled: -2990.08   -2990.08   -2990.08   Heading: 3.97 Radians   227.62 Degrees  
Raw: -4096   -4096   -4096   Scaled: -2990.08   -2990.08   -2990.08   Heading: 3.97 Radians   227.62 Degrees  
Raw: -4096   -4096   -4096   Scaled: -2990.08   -2990.08   -2990.08   Heading: 3.97 Radians   227.62 Degrees  
Raw: -4096   -4096   -4096   Scaled: -2990.08   -2990.08   -2990.08   Heading: 3.97 Radians   227.62 Degrees  
Raw: -4096   -4096   -4096   Scaled: -2990.08   -2990.08   -2990.08   Heading: 3.97 Radians   227.62 Degrees  
Raw: -4096   -4096   -4096   Scaled: -2990.08   -2990.08   -2990.08   Heading: 3.97 Radians   227.62 Degrees  
Raw: -4096   -4096   -4096   Scaled: -2990.08   -2990.08   -2990.08   Heading: 3.97 Radians   227.62 Degrees  
Raw: -4096   -4096   -4096   Scaled: -2990.08   -2990.08   -2990.08   Heading: 3.97 Radians   227.62 Degrees  
Raw: -4096   -4096   -4096   Scaled: -2990.08   -2990.08   -2990.08   Heading: 3.97 Radians   227.62 Degrees  
Raw: -4096   -4096   -4096   Scaled: -2990.08   -2990.08   -2990.08   Heading: 3.97 Radians   227.62 Degrees  
Raw: -4096   -4096   -4096   Scaled: -2990.08   -2990.08   -2990.08   Heading: 3.97 Radians   227.62 Degrees  
Raw: -4096   -4096   -4096   Scaled: -2990.08   -2990.08   -2990.08   Heading: 3.97 Radians   227.62 Degrees  
Raw: -4096   -4096   -4096   Scaled: -2990.08   -2990.08   -2990.08   Heading: 3.97 Radians   227.62 Degrees  
Raw: -4096   -4096   -4096   Scaled: -2990.08   -2990.08   -2990.08   Heading: 3.97 Radians   227.62 Degrees  
Raw: -4096   -4096   -4096   Scaled: -2990.08   -2990.08   -2990.08   Heading: 3.97 Radians   227.62 Degrees  
Raw: -4096   -4096   -4096   Scaled: -2990.08   -2990.08   -2990.08   Heading: 3.97 Radians   227.62 Degrees  
Raw: -4096   -4096   -4096   Scaled: -2990.08   -2990.08   -2990.08   Heading: 3.97 Radians   227.62 Degrees  
Raw: -4096   -4096   -4096   Scaled: -2990.08   -2990.08   -2990.08   Heading: 3.97 Radians   227.62 Degrees  
Raw: -4096   -4096   -4096   Scaled: -2990.08   -2990.08   -2990.08   Heading: 3.97 Radians   227.62 Degrees  
Raw: -4096   -4096   -4096   Scaled: -2990.08   -2990.08   -2990.08   Heading: 3.97 Radians   227.62 Degrees  
Raw: -4096   -4096   -4096   Scaled: -2990.08   -2990.08   -2990.08   Heading: 3.97 Radians   227.62 Degrees  
Raw: -4096   -4096   -4096   Scaled: -2990.08   -2990.08   -2990.08   Heading: 3.97 Radians   227.62 Degrees  
Raw: -4096   -4096   -4096   Scaled: -2990.08   -2990.08   -2990.08   Heading: 3.97 Radians   227.62 Degrees  
Raw: -4096   -4096   -4096   Scaled: -2990.08   -2990.08   -2990.08   Heading: 3.97 Radians   227.62 Degrees  
3  Topics / Science and Measurement / Integrating Compass into IMU odometry on: July 16, 2012, 02:03:43 pm
Hi guys,
I finally managed the estimation of a mobile robot using an IMU. During some experiments, I found a drift on the yaw angle even if the robot move on a straight direction. Searching on the internet I found the possibility to use a magnetometer for correcting heading estimation, but I'm a bit stuck!
I'm able to estimate position along x and y axes (double integration of accelerometer measurements using gyroscope for projection) but I don't figure how to integrate the compass.
Does someone can help me?

Thanks

Alek
4  Using Arduino / Sensors / Re: Geiger Counter + Arduino on: November 25, 2011, 01:04:07 pm
Thank you so much,
I'll post the result as soon as possible!

Bye!  smiley-wink
5  Using Arduino / Sensors / Re: Geiger Counter + Arduino on: November 25, 2011, 12:47:26 pm
Hi Magician,
first of all, thank you for your prompt reply!
The chip on the board is a NE555N used probably in this way:
because the geiger counter works around 500V, the 9V battery is transformed from DC to AC with the NE555N and then a small transformer converts 9V AC into 500V AC.
So, in order to work, what values do you suggest for the voltage divider?

Thanks again!
6  Using Arduino / Sensors / Geiger Counter + Arduino on: November 25, 2011, 12:14:07 pm
Hi guys,
I've just received my Geiger Counter (http://www.goldmine-elec-products.com/prodinfo.asp?number=C6999) and I'd like to connect it to my Arduino Uno board.
What I know for the moment is that when a radiation is detected, the geiger counter lights a led and a beep is produced with the buzzer.
So, I'm thinking to use the signal that drives the led in input to the Arduino Uno but, for the moment, I'm a bit confused about hot to realize it.
I'm thinking to use a Schmitt's trigger but I'm not sure that is the best way.
Do you have some suggestions?

Thanks in advance!

Regards,

Alessandro
7  Using Arduino / Installation & Troubleshooting / Re: How to power a sensor from Arduino Mini Pro? on: October 10, 2011, 07:02:33 am
Thank you so much, guys!!  smiley-wink
8  Using Arduino / Installation & Troubleshooting / How to power a sensor from Arduino Mini Pro? on: October 05, 2011, 08:22:19 am
Hi guys,
I tried to power a sensor (MLX90614) from the 5V pin available on Arduino Uno and it worked fine.
Now, I would like to power the same sensor from Arduino Mini Pro but I don't undarstand what pin I have to use.
On Arduino mini pro there are two VCC pin to power the board but it's seem that there aren't pins to power external
hardware.

Can anyone help me?

Thanks in advance

Alessandro
Pages: [1]