SMALL - espritmodel.com SMALL - Telemetry SMALL - Radio
Reply
Thread Tools
This thread is privately moderated by billpa, who may elect to delete unwanted replies.
Old Feb 17, 2011, 01:40 AM
billpa's Avatar
Joined Nov 2003
4,936 Posts
TM, third party mode is the actual airspeed (in either MPH or KPH, depending on the sensor settings). ET mode is a raw pressure value that the ET software converts to speed internally.
billpa is offline Find More Posts by billpa
Site Sponsor
Reply With Quote
Sign up now
to remove ads between posts
Old Feb 26, 2011, 03:27 PM
Registered User
Suomi, Pirkanmaa, Tampere
Joined Feb 2011
2 Posts
Quote:
Originally Posted by turnale View Post

I interfaced the altimeter sensor with an Arduino board, using the wire.h library.

Here is the code, as it might be of interest for someone, who knows:
....


I was stuck for a long while until I read in this thread that the address might be coded on 7bits sometimes, and that is case here. Once I used 0x74, instead of 0xE8, I started to have readings (with a few tears of joy I admit).

Now, these readings are far from steady... The device is set in m, and it would vary easily by +/-5 units. If I force the pressure to change on the sensor (just using silicon tube that I pinch with my finger on the pressure sensor), I can see the reading changing - that tells me that I am looking the right address.

Could that be that I am not looking at the right number of bits (2 here, but I tried with 1, it was showing something as well...)?
Hello turnale,

based on your code example (thanks for sharing!!) I was able to get out 16-bit value for pressure from my new airspeed sensor V3. My sensor is working in normal mode (no third party) and it gives about 1570 value ±5. I tested it by blowing to high pressure side and I got about 13800 value max, which corresponds 7-segment reading 530km/h.

To get 16-bit data (two 8-bit words added) you have to add this:

Wire.requestFrom(ALT_ADDRESS,2);
if (Wire.available()) {
data = Wire.receive();
}
if (Wire.available()) {
data |=Wire.receive() << 8;
}

to your code. This method I found from I2C coding example:
http://www.neufeld.newton.ks.us/electronics/?p=241

I think it's possible to do calculation of actual air speed/altitude straight from raw data also.
nakki5 is offline Find More Posts by nakki5
Reply With Quote
Old Mar 03, 2011, 08:30 PM
Registered User
Joined Mar 2011
1 Posts
Interfacing Airspeed Microsensor with e-Logger V4

I am using the Airspeed Microsensor V3 sensor in a UAV data collection system in which the data is being read over the i2C port. The connection to the data collection circuit board is through direct soldering of the eLogger wires after removal of the 4 pin connector.

I would like to verify operation and programming by connecting the sensor to my e-Logger V4 but this will require unsoldering the wires from my board and reattaching a connector each time. Is there an easier way (i.e. can I interface the sensor to the e-Logger V4 through the 4 pins exiting the sensor)? If so, can the system remain connected to my board and are there requirements on whether it is in a powered up or down mode?

Thanks,
Wayne
WayneEP is offline Find More Posts by WayneEP
Reply With Quote
Old Mar 19, 2011, 06:30 AM
Registered User
Joined Oct 2010
3 Posts
I try to read aitimeter without success...

//包含所需头文件
#include <ioM16v.h>
#include <macros.h>
#include <delay.C>
#include <avr_bit.h>

/*------宏定义------*/
#define uchar unsigned char
#define uint unsigned int

//端口初始化
void port_init(void)
{
PORTA = 0x00;
DDRA = 0x00;
PORTB = 0x00;
DDRB = 0x00;
PORTC = 0x00;
DDRC = 0x00;
PORTD = 0x00;
DDRD = 0x00;
}



#define SENSOR_ADDRESS 0xe8


#define SCL DDRC_0
#define SDA DDRC_1
#define SCL_Input PINC_0
#define SDA_Input PINC_1
#define SCL_Output PORTC_0
#define SDA_Output PORTC_1

#define SCL_Hight SCL = 0
#define SCL_Low SCL = 1
#define SDA_Hight SDA = 0
#define SDA_Low SDA = 1
#define I2C_Delay delay_nus(1)

void I2C_init(void)
{
SCL_Output = 0;
SDA_Output = 0;
SCL_Low;
SDA_Low;
}

//产生启动信号
unsigned char I2C_start(void)
{
SDA_Hight;
I2C_Delay;
SCL_Hight;
I2C_Delay;
SDA_Low;
I2C_Delay;
SCL_Low;
I2C_Delay;
return 1;
}

//产生停止信号
void I2C_stop(void)
{
SDA_Low;
I2C_Delay;
SCL_Hight;
I2C_Delay;
SDA_Hight;
I2C_Delay;
}

//向总线写一字节,并返回有无应答
unsigned char I2C_write(unsigned char c)
{
unsigned char i,ack = 1;
for(i=0;i<8;i++)
{
if(c&0x80)
SDA_Hight;
else
SDA_Low;
SCL_Hight;
I2C_Delay;
SCL_Low;
c<<=1;
I2C_Delay;
}
SDA_Hight;
I2C_Delay;
SCL_Hight;
I2C_Delay;
if(SDA_Input)
ack=0; //失败
SCL_Low;
I2C_Delay;
return ack;
}

//读一字节 ack: 1时应答,0时不应答
unsigned char I2C_read(unsigned char ack)
{
unsigned char i,ret;
SDA_Hight;
for(i=0;i<8;i++)
{
I2C_Delay;
SCL_Low;
I2C_Delay;
SCL_Hight;
I2C_Delay;
ret<<=1;
if(SDA_Input)
ret++;
}
SCL_Low;
I2C_Delay;
if(ack) //非应答
SDA_Low;
else //应答
SDA_Hight;
I2C_Delay;
SCL_Hight;
I2C_Delay;
SCL_Low;
I2C_Delay;
return(ret);
}



void init_devices(void)
{
CLI(); //禁止所有中断
MCUCR = 0x00;
MCUCSR = 0x80;//禁止JTAG
GICR = 0x00;
port_init();
I2C_init();
SEI();//开全局中断
}
//主函数
void main(void)
{
init_devices();
//在这继续添加你的代码
while(1)
{
char i;
char k;
I2C_start();
I2C_write(SENSOR_ADDRESS | 0X00);
I2C_write(0x07);
I2C_start();
I2C_write(SENSOR_ADDRESS | 0X01);
i=I2C_read(1);
k=I2C_read(0);
I2C_stop();

}
}
zhaofeng is offline Find More Posts by zhaofeng
Last edited by zhaofeng; Mar 19, 2011 at 06:35 AM.
Reply With Quote
Old Mar 19, 2011, 12:43 PM
Registered User
Joined Oct 2010
3 Posts
Seems can now work...

//包含所需头文件
#include <ioM16v.h>
#include <macros.h>
#include <delay.C>
#include <avr_bit.h>

/*------宏定义------*/
#define uchar unsigned char
#define uint unsigned int

//端口初始化
void port_init(void)
{
PORTA = 0xff;
DDRA = 0xff;
PORTB = 0xff;
DDRB = 0xff;
PORTC = 0x00;
DDRC = 0x00;
PORTD = 0x00;
DDRD = 0x00;
}



// TWSR values (not bits)
#define TWPS0 0
#define TWPS1 1
#define TWEN 2
#define TWIE 0
#define TWEA 6
#define TWINT 7
#define TWSTA 5
#define TWSTO 4

// Master
#define TW_START 0x08
#define TW_REP_START 0x10
// Master Transmitter
#define TW_MT_SLA_ACK 0x18
#define TW_MT_SLA_NACK 0x20
#define TW_MT_DATA_ACK 0x28
#define TW_MT_DATA_NACK 0x30
#define TW_MT_ARB_LOST 0x38
// Master Receiver
#define TW_MR_ARB_LOST 0x38
#define TW_MR_SLA_ACK 0x40
#define TW_MR_SLA_NACK 0x48
#define TW_MR_DATA_ACK 0x50
#define TW_MR_DATA_NACK 0x58


void I2C_init(void)
{
// 2 Wire Bus initialization
// Generate Acknowledge Pulse: On
// 2 Wire Bus Slave Address: 0h
// General Call Recognition: Off
// Bit Rate: 250.000 kHz
TWSR=0x00;
TWBR=0x00;
TWAR=0x00;
TWCR=0x44;
PORTC_0 = 1;
PORTC_1 = 1;
}

//产生启动信号
unsigned char I2C_start(void)
{
TWCR = (1<<TWINT)|(1<<TWSTA)|(1<<TWEN);
while (!(TWCR & (1<<TWINT))){};
return 1;
}

//产生停止信号
void I2C_stop(void)
{
TWCR = (1<<TWINT)|(1<<TWEN)|(1<<TWSTO);
}

//向总线写一字节,并返回有无应答
unsigned char I2C_write(unsigned char c)
{
unsigned char ack=1;
TWDR = c;
TWCR = (1<<TWINT)|(1<<TWEN);
while (!(TWCR & (1<<TWINT))){};
if((TWSR & 0xF8) != TW_MT_SLA_ACK)
ack = 0;
return ack;
}

//读一字节 ack: 1时应答,0时不应答
unsigned char I2C_read(unsigned char ack)
{
if (ack)
TWCR = (1<<TWINT)|(1<<TWEN)|(1<<TWEA);
else
TWCR = (1<<TWINT)|(1<<TWEN);
while (!(TWCR & (1<<TWINT))){};
return(TWDR);
}



void init_devices(void)
{
CLI(); //禁止所有中断
MCUCR = 0x00;
MCUCSR = 0x80;//禁止JTAG
GICR = 0x00;
port_init();
I2C_init();
SEI();//开全局中断
}
//主函数
void main(void)
{
init_devices();
int i;
int k;
//在这继续添加你的代码
while(1)
{

I2C_start();
I2C_write(0xe8);
I2C_write(0x07);

I2C_start();
I2C_write(0xe9);

i=I2C_read(1);
k=I2C_read(0);
I2C_stop();



}
}
zhaofeng is offline Find More Posts by zhaofeng
Reply With Quote
Old Mar 19, 2011, 02:06 PM
Registered User
Joined Oct 2010
3 Posts
The question now is working 1 minutes will stop response... Seems to be froze up. Strange questions

Have resolved

The above procedures to reduce the refresh rate can be normal work after
zhaofeng is offline Find More Posts by zhaofeng
Last edited by zhaofeng; Apr 28, 2011 at 11:14 PM.
Reply With Quote
Old Apr 07, 2011, 11:59 AM
Registered User
Joined Apr 2011
1 Posts
Eagle Tree Airspeed and Altitud Microsensors

Hi,

im working on a project with Eagle tree´s Altitud and airspeed microsensors, i want to access both sensors through one microcontroller (PIC 16f873a), this means im only usin 1 I2C interface to access both sensors. Not really worked so far, can anyone help me put with some code for this or if what im trying to do is posible.

Thank you
EDRO is offline Find More Posts by EDRO
Reply With Quote
Old Apr 08, 2011, 04:23 AM
Registered User
Joined Aug 2008
4 Posts
3th party mode

Hi,

If i start reading the altimeter in 3th party mode, it seems that the max height on the 7 seg display is updating slower.
I read the altitude every 2 secs.
Is this normal behaviour of the sensor even at low readout frquency ?

Regards,

Hans
frotje is offline Find More Posts by frotje
Reply With Quote
Old May 03, 2011, 05:33 AM
Registered User
PizzaHunter's Avatar
Kiev, Ukraine
Joined Jul 2006
152 Posts
Datasheet?

Hello!
Does anybody know, what transducers are used in altitude and airspeed microsensors? I would like to read more about sensors and errors from datasheets. When I try entering what is written on differential pressure sensor (ETS - U170) in Google, I find nothing.
Help me please!
PizzaHunter is offline Find More Posts by PizzaHunter
Reply With Quote
Old May 12, 2011, 09:32 AM
WXF
Registered User
Joined May 2011
1 Posts
3rd party mode

Hello!
I've got problem when I tried to make my altimeter work in 3rd party mode. I got the data as follows:
FF FF FF
I don't know what's wrong with it. Any help is appreciated.
WXF is offline Find More Posts by WXF
Reply With Quote
Old Jun 05, 2011, 04:59 PM
Registered User
Joined Jun 2011
1 Posts
3rd mode without elogger, anything yet?

Hi,
are there chance to put the device in 3d party mode without elogger yet?
I've a device bought in Italy, and I've no use to buy an elogger (at the while).
I've heard there is a blob to put through i2c, this blob is hard to reproduce yet?
editorx is offline Find More Posts by editorx
Reply With Quote
Old Jul 29, 2011, 12:28 AM
Registered User
Joined Dec 2010
5 Posts
Altimeter v4 i2c

Hi Bill, I recently bought an Altimeter v3 and was able to read the data off of it via i2c interface with an Arduino board using the code posted by turnale and nakki5...it was not in 3rd party mode, but I was able to figure out the scaling parameters to convert the raw data to height in feet.

I have since upgraded to the altimeter v4, and now the same code does not seem to work (no bytes are available to be read from the sensor). Any idea why it would work with the v3 but not the v4? (I requested the v4 be put in 3rd party mode when I ordered it, but it's not clear from the documentation whether that's even an option on the v4).

Thanks for any help...
dhertzog is offline Find More Posts by dhertzog
Reply With Quote
Old Jul 29, 2011, 06:15 PM
billpa's Avatar
Joined Nov 2003
4,936 Posts
Hi, please note that the I2C ID for the Altimeter V4 is different than the Altimeter V3, and that the V4 is always in "third party mode" (returning actual altitude).

http://www.eagletreesystems.com/supp...sensor-i2c.pdf
billpa is offline Find More Posts by billpa
Site Sponsor
Reply With Quote
Old Jul 29, 2011, 08:53 PM
Registered User
Joined Dec 2010
5 Posts
Altimeter v4 i2c address

Thanks Bill, sorry if it's in there and I've missed it, but I didn't see in the documentation where the v4 address is specified...I see the V3 is 0xe8. Can you tell me the v4 address?
dhertzog is offline Find More Posts by dhertzog
Reply With Quote
Old Aug 01, 2011, 07:21 AM
Jack
USA, ME, Ellsworth
Joined May 2008
17,012 Posts
I've read this thread and searched the forum, it this is in there somewhere I can't seem to find it.

Question: Can the V3 Altimeter be tested by applying some amount of pressure on what appears to be the port (the small nozzle or tube)?

And if so, will blowing on it gently be enough to induce a change?

Or does it risk any damage?

I'll brush my teeth first if that is important!

Jack
jackerbes is offline Find More Posts by jackerbes
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 12:02 PM
Discussion NOW SHIPPING: Airspeed, Altitude and lots more new sensors for the MicroPower billpa Eagle Tree Systems 41 Jul 31, 2007 02:02 PM
Discussion Eagle Tree announces Airspeed, Altitude and lots more new sensors for the MicroPower billpa Batteries and Chargers 14 May 28, 2007 07:28 PM
Discussion Eagle Tree announces Airspeed, Altitude and lots more new sensors for the MicroPower billpa Product Announcements 4 May 27, 2007 09:56 PM
Alert Caution - Web Page with your info not secure RCTyp HobbyKing 5 Mar 22, 2007 03:25 PM