[SOLVED] Selecting an ultrasonic sensor and interface

Firmware/software/electronics/mechanics
alex
Expert
Posts: 137
Joined: Mon Feb 18, 2013 11:36 am
Location: Germany

Re: [Hover] Selecting an ultrasonic sensor and interface

Post by alex »

tobias wrote:We have been insanely busy, sorry for not replying.

We have had the I2C2 bus working with other sensors but we have so many clones of the FW that I don't know which one it is. We will do our best to try and solve this today.
/Tobias
Sounds promising, any news so far?
NguyenVo
Beginner
Posts: 2
Joined: Tue Oct 28, 2014 2:05 pm

Re: [Hover] Selecting an ultrasonic sensor and interface

Post by NguyenVo »

Is this problem solved? I have the same problem with Alex when I connect my RGB sensor ISL29125 into I2C2 port. I doubt that there is something wrong with the I2C in the extension header.
I was able to log the value if I hard-coded it in the firmware but when I tried to read the sensor data, it simply didn't show anything.
Tobias, if you have tested I2C2 port with any devices, please help to verify it.
Thank you.
alex
Expert
Posts: 137
Joined: Mon Feb 18, 2013 11:36 am
Location: Germany

Re: [Hover] Selecting an ultrasonic sensor and interface

Post by alex »

NguyenVo wrote:Is this problem solved? I have the same problem with Alex when I connect my RGB sensor ISL29125 into I2C2 port. I doubt that there is something wrong with the I2C in the extension header.
I was able to log the value if I hard-coded it in the firmware but when I tried to read the sensor data, it simply didn't show anything.
Tobias, if you have tested I2C2 port with any devices, please help to verify it.
Thank you.
No, the issue still exists. Was in contact via PM with Tobias the last few days. They will have a deep look at the I2C2 implementation as soon as possible.
NguyenVo
Beginner
Posts: 2
Joined: Tue Oct 28, 2014 2:05 pm

Re: [Hover] Selecting an ultrasonic sensor and interface

Post by NguyenVo »

alex wrote:
NguyenVo wrote:Is this problem solved? I have the same problem with Alex when I connect my RGB sensor ISL29125 into I2C2 port. I doubt that there is something wrong with the I2C in the extension header.
I was able to log the value if I hard-coded it in the firmware but when I tried to read the sensor data, it simply didn't show anything.
Tobias, if you have tested I2C2 port with any devices, please help to verify it.
Thank you.
No, the issue still exists. Was in contact via PM with Tobias the last few days. They will have a deep look at the I2C2 implementation as soon as possible.
Thank you. Please keep me informed when they have an update.
alex
Expert
Posts: 137
Joined: Mon Feb 18, 2013 11:36 am
Location: Germany

Re: [Hover] Selecting an ultrasonic sensor and interface

Post by alex »

Hey, got some news for you.

I'm successfully running the ultrasonic sensor wired to a RN-Control V1.4 using I2C. The Crazyflie is used as a power supply only in order to achieve as practical conditions as possible. I stepped through every single bit on the I2C bus with a Rigol DS1102CD digital oscilloscope to understand what the code and the sensor does. Learned a lot from doing so.

Picture 1
Picture 2

Of course I tried to get some signal from the Crazyflie with the oscilloscope: no I2C signal from the expansion port at all. This confirms my suspicion that something's wrong with the I2C2 implementation.

Hope to get some help from the guys at Bitcraze soon...
Last edited by alex on Sat Jan 24, 2015 10:05 pm, edited 1 time in total.
alex
Expert
Posts: 137
Joined: Mon Feb 18, 2013 11:36 am
Location: Germany

Re: [Hover] Selecting an ultrasonic sensor and interface

Post by alex »

During Christmas holidays I'm going to connect the MB1242 to the copter's main I2C bus. Therefore I need to find some good soldering points on the PCB. If I rely on the I2C2 interface being fixed this year by the Bitcraze team, I'm gonna be disappointed even more, I think. :(

Managed to print the ultrasonic measurements on a LCD wired to the RN-Control BTW.

I'll keep you up-to-date...
dbrgn
Member
Posts: 51
Joined: Tue Dec 16, 2014 9:42 pm

Re: [Hover] Selecting an ultrasonic sensor and interface

Post by dbrgn »

Did you get it to work?

Today I started putting a low-cost HC-SR04 on my crazyflie 2.0, until I discovered that it runs on 5V without 3V support :(

The sensor is very cheap (~4$) and provides good results. Would there be a way to transform the 3V on the Crazyflie to 5V in order to use this sensor? The ~30-40$ for a MaxBotix sensor are a bit high.

Edit: Would a MCP1703 work? The SR04 draws 15mA working current and <0.2mA while idle.
dbrgn
Member
Posts: 51
Joined: Tue Dec 16, 2014 9:42 pm

Re: [Hover] Selecting an ultrasonic sensor and interface

Post by dbrgn »

I just ordered a LTC1754ES6-5. Let's see how that works out :)
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: [Hover] Selecting an ultrasonic sensor and interface

Post by tobias »

I've just pushed a fix for the I2c2 problems on Crazyflie 1.0. I've tested it with a freeIMU board connected to the i2c2 bus and it all looks good. I'm not sure how well it will work in a concurrent situation tough so it is best to do all i2c2 calls from the same task as i2c1 calls (stabilizer task).
alex
Expert
Posts: 137
Joined: Mon Feb 18, 2013 11:36 am
Location: Germany

Re: [Hover] Selecting an ultrasonic sensor and interface

Post by alex »

dbrgn wrote:I just ordered a LTC1754ES6-5. Let's see how that works out :)
What are you going to power with that thing?

tobias wrote:I've just pushed a fix for the I2c2 problems on Crazyflie 1.0. I've tested it with a freeIMU board connected to the i2c2 bus and it all looks good. I'm not sure how well it will work in a concurrent situation tough so it is best to do all i2c2 calls from the same task as i2c1 calls (stabilizer task).
Nice work, tobias. I'm going to try to get the sensor working the next few days...
Post Reply