Pitot tube i2c to SPI

I just bought this pitot tube with differential pressure sensor, but i noticed that there are only SDA and SCL pins, the ones for i2c protocol. Is there a method to use this sensor with spi protocol?
I'm using arduino but i think that learning and using i2c will overcomplicate my project so i just wanted to use spi.


Welcome to the forum

I would think it highly likely that adding an I2C to SPI converter, be it hardware or software, would be more complicated than just using I2C

Which sensor is it ? Is there a library available for the sensor ?

2 Likes

Assuming that you don't have a library for the sensor (otherwise why the question) it's not more difficult to use I2C than SPI. Do you have a dataset for it?

related

Hi, @tommasobovi
Welcome to the forum.

Have you looked to see if there is a library for your sensor module.
If there is then the I2C protocol will already have been written for you.

Can you please post a link to spec/data of your sensor?

Tom.... :smiley: :+1: :coffee: :australia:

Since you did not specify a processor I am assuming UNO. Actually I2C is much easier then SPI, only two wires and no select lines. You address the unit and then either read or send information. When you have it connected use the I2C scanner and find the address. If it does not show swat the SCL and SDA wires. Those pins are marked on the UNO. This link will help: I2C - SparkFun Learn

1 Like

Thank you.
I have no Idea of how i2c works so i think its better to start learning it.
the datasheet for this module is this: digikey.co.uk/en/htmldatasheets/production/1123821/0/0/1/4525do-ss5ai001gp
at page 9 i found the i2c interface parameters but i still don't know how to use them.

Thank you, I just sent the datasheet. I'm using this pitot tube as a speed sensor for an RC plane, wouldn't the converter slow down communication?

This may be of interest GitHub - bolderflight/ms4525do: Arduino and CMake library for communicating with MS4525DO pressure transducers.

1 Like

Normally you don't need to.  The timing specs are just what the part needs to see to respond correctly and that's handled by the I2C circuitry within the controller.

I looked up pressure differential sensors and wow, they ain't cheap!

When you are doing very basic simple things, the example sketches for the device should give you all the lines you need.

I2C: You send a request and later you get an answer, it’s 2-wire serial. Depending on the request and the device it may be a quick wait or not, I have seen it take over 1/10th of a second to get a humidity read in a greenhouse.

Keep it simple. Do only one thing at a time if you use delay().

I like it. P/N and purchase source?

It's worth googling for an Arduino library. I was just faced with writing an arduino driver for a Novasensor I2C pressure sensor but i found a library that was close and only required some minor changes to work.

Check this out, it will help: Arduino I2C Tutorial | Arduino Wire Library I2C Communication

Hence my earlier post

Hi,
Did you Google:

arduino differential pressure sensor

Before purchasing your sensor so you had a unit that would easily work with Arduino.

The PX4 forum may help.

Tom.... :smiley: :+1: :coffee: :australia:

This is the SPI Port based connection (Fig-1) between Sensor and UNOR3.


Figure-1:

According to the datasheet, the sensor supports SPI at a maximum speed of 800 kHz. The default SPI speed in the Arduino SPI library is 4 MHz. Use the appropriate code in your sketch to set a division factor of 32, resulting in an SCK frequency of 500 kHz.

Not for the model that @tommasobovi has.

Any idea about his (PT) Sensor's Model/Type Number?

Number: I see 4525D 5AI 001D