HobbyKing.com New Products Flash Sale
Reply
Thread Tools
This thread is privately moderated by billpa, who may elect to delete unwanted replies.
Old Oct 06, 2012, 04:46 PM
Registered User
Joined Mar 2007
3 Posts
Help needed!!

Hi,

I've been trying to get the airspeed V3 sensor to work with the Arduino. So far without success. I've changed it to run in third party mode.

Could someone post a working code for this.

Big thanks in advance

/Nivel
NiVeL44 is offline Find More Posts by NiVeL44
Reply With Quote
Sign up now
to remove ads between posts
Old Oct 07, 2012, 03:17 AM
Registered User
schumixmd's Avatar
Moldova
Joined Jun 2010
1,302 Posts
here is my code for altimeter v4, but I'm using it with another library, not standard wire library


#define SENSOR_ADDRESS 0xEC
#include <Wire.h>
#include <I2cMaster.h>
TwiMaster ALTIMETER_SENSOR(true);// Defining sensor object

long altimeter_update(void){
static struct {
union {int16_t val; uint8_t raw[2]; } alt16; // 16-bit altitude from ALT-V4
} altv4;
long alt;

if(ALTIMETER_SENSOR.start(SENSOR_ADDRESS | I2C_WRITE))
{
delay(10);
ALTIMETER_SENSOR.write(0x07);
delay(10);
ALTIMETER_SENSOR.stop();
}

if(ALTIMETER_SENSOR.restart(SENSOR_ADDRESS | I2C_READ))
{
delay(10);
altv4.alt16.raw[0]=ALTIMETER_SENSOR.read(false);
delay(10);
altv4.alt16.raw[1]=ALTIMETER_SENSOR.read(true);
delay(10);
ALTIMETER_SENSOR.stop();
}

alt=altv4.alt16.val;
alt=alt-3000; //Substract 3000decimeters
alt=alt*10; //Convert decimeters to centimeters
return alt; //return altitude in centimeters
}


in main loop you just call altimeter_update() function. (altitude = altimeter_update()
schumixmd is offline Find More Posts by schumixmd
RCG Plus Member
Latest blog entry: Setting up session
Reply With Quote
Old Oct 08, 2012, 02:30 PM
Registered User
Joined Mar 2007
3 Posts
Hi schumixmd and thank you

I downloaded the library, tried your code and got this:

Blink:3: error: 'TwiMaster' does not name a type
Blink.cpp: In function 'long int altimeter_update()':
Blink:15: error: 'ALTIMETER_SENSOR' was not declared in this scope
Blink:23: error: 'ALTIMETER_SENSOR' was not declared in this scope



Here is the code I tried:


#define SENSOR_ADDRESS 0xEA
#include <Wire.h>
#include <i2cmaster.h>
TwiMaster ALTIMETER_SENSOR(true);// Defining sensor object

void setup()
{
}

long altimeter_update(void){
static struct {
union {int16_t val; uint8_t raw[2]; } alt16; // 16-bit altitude from ALT-V4
} altv4;
long alt;

if(ALTIMETER_SENSOR.start(SENSOR_ADDRESS | I2C_WRITE))
{
delay(10);
ALTIMETER_SENSOR.write(0x07);
delay(10);
ALTIMETER_SENSOR.stop();
}

if(ALTIMETER_SENSOR.restart(SENSOR_ADDRESS | I2C_READ))
{
delay(10);
altv4.alt16.raw[0]=ALTIMETER_SENSOR.read(false);
delay(10);
altv4.alt16.raw[1]=ALTIMETER_SENSOR.read(true);
delay(10);
ALTIMETER_SENSOR.stop();
}

alt=altv4.alt16.val;
return alt; //return altitude in centimeters
}

void loop()
{
int altitude = altimeter_update();
}



Can you help me further?
How necessary is the additional library?
How does the code look like without it?

Yes, I'm a beginner in Arduino
NiVeL44 is offline Find More Posts by NiVeL44
Reply With Quote
Old Oct 09, 2012, 12:53 PM
Registered User
schumixmd's Avatar
Moldova
Joined Jun 2010
1,302 Posts
here's the library that works fine with arduino 1.0 or higher

I2cMaster
schumixmd is offline Find More Posts by schumixmd
RCG Plus Member
Latest blog entry: Setting up session
Reply With Quote
Old Oct 09, 2012, 04:26 PM
Registered User
Joined Mar 2007
3 Posts
Thank you!!

Now I'm getting something out from the airspeed sensor!

Here is the code I used:


#define SENSOR_ADDRESS 0xEA
#include <Wire.h>
#include <I2cMaster.h>
TwiMaster AIRSPEED_SENSOR(true);


void setup()
{
Serial.begin(9600);
}


long airspeed_update(void)
{
static struct {
union {int16_t val; uint8_t raw[2]; } airspeed16;
} airspeedv3;

long airsp;
if(AIRSPEED_SENSOR.start(SENSOR_ADDRESS | I2C_WRITE))
{
delay(10);
AIRSPEED_SENSOR.write(0x07);
delay(10);
AIRSPEED_SENSOR.stop();
}
if(AIRSPEED_SENSOR.restart(SENSOR_ADDRESS | I2C_READ))
{
delay(10);
airspeedv3.airspeed16.raw[0]=AIRSPEED_SENSOR.read(false);
delay(10);
airspeedv3.airspeed16.raw[1]=AIRSPEED_SENSOR.read(true);
delay(10);
AIRSPEED_SENSOR.stop();
}
airsp=airspeedv3.airspeed16.val;
return airsp;
}

void loop()
{
int airspeed = airspeed_update();
Serial.println(airspeed);
delay(50);
}
NiVeL44 is offline Find More Posts by NiVeL44
Reply With Quote
Old Oct 20, 2012, 03:36 PM
Registered User
u2builder's Avatar
USA, NH, Alstead
Joined Oct 2007
4,977 Posts
I have a new Eagle Tree V4 Datalogger, OSD Pro, GPS and Baro Altimeter. I hooked it all up as per instructions. Everything worked except the Altimeter was kind of erratic. When I first booted it up it had a zero in its display. I read near zero altitude in feet when I took off but did not return to near zero and was several feet off even though I probably only went 25 feet high. At some point it started blinking a numerical three digit code that did not clear when I rebooted it. Then it changed to the following code: 5L2 and that has remained for several flights. I have unplugged the altimeter and plugged it in again and rebooted many times. The altimeter continues to behave erratically. I thought maybe it was due to air speed or propwash so I sheilded it in a little razor blade box. This did not help. Please tell me what could be the problem. Thanks.

Edit: humm, now it says 58L. What does this mean?

OK, I was reading the display upside down? It was 572 and 587! I assume that is some type of altitude reading from sea level. My actual altitude is more like 700 feet so I assume it must be corrected to standard barometric pressure or something.

Anyway, I decided that maybe propwash on the multirotor was causing the erratic behavior so I wrapped the sensor in foam. It is much better now, withing a couple feet takeoff and landing.

So what is the story on the numbers on the LCD?
u2builder is offline Find More Posts by u2builder
Last edited by u2builder; Oct 20, 2012 at 06:23 PM.
Reply With Quote
Old Oct 22, 2012, 04:07 AM
Registered User
schumixmd's Avatar
Moldova
Joined Jun 2010
1,302 Posts
Hi u2builder.
This is not the right thread for your question, it is for HOW TO USE altimeter with 3rd parties devices.
Anyway, your question is answered very well in the manual. What are the numbers and how it works.

The altimeter will never show your current altitude, but the maximum altitude reached in last flight, even you restart the sensor it will show max altitude reached from last flight, and will start reading new max altitude only if the altitude where altimeter was restarted and current altitude of altimeter is greater that 18feet.

The altimeter altitude reading can drift depending on many factors, so it is normal that you see 587 instead of 700 you claimed. (check some posts backs where I had the same question).
schumixmd is offline Find More Posts by schumixmd
RCG Plus Member
Latest blog entry: Setting up session
Reply With Quote
Old Dec 06, 2012, 09:33 AM
Registered User
Joined Dec 2012
1 Posts
hello
I'm newbie. I want to use these sensors (airspeed V3) in my application in third party mode, but I need connect more than one. Can anyone tell me if there is a possibility to change the address of SENSOR
mirolek2 is offline Find More Posts by mirolek2
Reply With Quote
Old Dec 10, 2012, 10:15 PM
Registered User
Australia, NSW, Sydney
Joined Aug 2005
23 Posts
Hi guys, are there any plans to incorporate an input on the ET Guardian stabilizer for the ET Airspeed Sensor, so that the gain can be automatically controlled relative to airspeed? That is, the gain would be reduced for higher airspeeds?

Thanks,

James.
jymster is offline Find More Posts by jymster
Reply With Quote
Old Dec 12, 2012, 03:15 PM
billpa's Avatar
Joined Nov 2003
4,936 Posts
HI James,

That is on our list of potential additions to the Guardian! The Guardian has a connection already for that, so it should "just" be a firmware addition.
billpa is offline Find More Posts by billpa
Site Sponsor
Reply With Quote
Old Dec 17, 2012, 12:37 AM
Registered User
Joined Feb 2010
59 Posts
Quote:
Originally Posted by billpa View Post
HI James,

That is on our list of potential additions to the Guardian! The Guardian has a connection already for that, so it should "just" be a firmware addition.
Ah, the infamous "should" Seen far too many of those.

Good luck!
Teej is offline Find More Posts by Teej
Reply With Quote
Old Dec 17, 2012, 11:35 AM
Your customer
Silverexpress's Avatar
Berkley, MI
Joined Dec 2009
1,408 Posts
Quote:
Originally Posted by billpa View Post
HI James,

That is on our list of potential additions to the Guardian! The Guardian has a connection already for that, so it should "just" be a firmware addition.
Wooohooo!
Silverexpress is offline Find More Posts by Silverexpress
Reply With Quote
Old Feb 22, 2013, 01:55 AM
Registered User
Joined Jan 2012
2 Posts
Has anyone got the altimeter or airspeed indicator to work with a Netduino?

UPDATE: It took a bit of trial and error, but I got them both to work with a Netduino 2 Plus. Let me know if you get stuck and I can send you my code.
greghgradwell is offline Find More Posts by greghgradwell
Last edited by greghgradwell; Feb 26, 2013 at 05:38 PM. Reason: Update
Reply With Quote
Old May 12, 2013, 11:47 AM
Registered User
Joined Apr 2007
5 Posts
Would like to understand

Hi All!
I notice that when measuring airspeed that a pitot tube is used with both inlet pressure and static pressure. Why both? Would not just the air pressure in a tube be all you need? If you are using both inlet pressure and static pressure are you then having to add or subtract the two pressures?

Thanks in advance.

Ed
edcannady is offline Find More Posts by edcannady
Reply With Quote
Old May 12, 2013, 06:55 PM
Registered User
schumixmd's Avatar
Moldova
Joined Jun 2010
1,302 Posts
for airspeed sensor you don't need do any math as eagletree is providing speed directly. am I wrong?!
Any airspeed indicator need Static and dynamic pressure to measure fluid flow velocity.
In conventional aircraft they both are needed because pressure inside cockpit is different from outside.
in our applications, static pressure is not so critical in my opinion, because our planes are not hermetically closed. The tube can be mounted just for dynamical pressure, but the static port should not be put into airflow directly.
schumixmd is offline Find More Posts by schumixmd
RCG Plus Member
Latest blog entry: Setting up session
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Wanted WTB Eagletree Altitude and Airspeed micro sensors hcopter Aircraft - General - Miscellaneous (FS/W) 0 Oct 20, 2007 01:02 PM
Discussion NOW SHIPPING: Airspeed, Altitude and lots more new sensors for the MicroPower billpa Eagle Tree Systems 41 Jul 31, 2007 03:02 PM
Discussion Eagle Tree announces Airspeed, Altitude and lots more new sensors for the MicroPower billpa Batteries and Chargers 14 May 28, 2007 08:28 PM
Discussion Eagle Tree announces Airspeed, Altitude and lots more new sensors for the MicroPower billpa Product Announcements 4 May 27, 2007 10:56 PM
Alert Caution - Web Page with your info not secure RCTyp HobbyKing 5 Mar 22, 2007 04:25 PM