[SOLVED] Selecting an ultrasonic sensor and interface

Firmware/software/electronics/mechanics
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: [SOLVED] Selecting an ultrasonic sensor and interface

Post by tobias »

I found a better solution - https://www.pololu.com/product/2474
The infrared sensor looks promising. I guess the drawback with infrared is it wont work well in sunlight.

Watched your video. Nice rig you have built!

PS. I would balance the propellers again though as it sounds a lot, will improve the stability. DS
Fucitol
Beginner
Posts: 19
Joined: Wed May 08, 2013 7:49 am

Re: [SOLVED] Selecting an ultrasonic sensor and interface

Post by Fucitol »

almaz_1c wrote:I tried maxsonar sensor . I did not like it. Firstly it is heavy (5 grams), and secondly a large dead zone (in fact 35 cm), third - too slow updating the data. I found a better solution - https://www.pololu.com/product/2474
Weighs only 2.5 grams, dead zone - 10 cm and more rapidly data refresh. But the range of only 1.5 meters.
Here is video: https://cloud.mail.ru/public/b9c3f426a4 ... 011800.mp4
Thats exactly the solution I was looking towards and this indeed looks very promising.

If you have 'finalised' this setup are you willing to share how you connected it and adapted the software? By the way, they also offer the same sensor with a voltage ranging from 2.7 - 3.6v instead of the 5v max in the one you linked, which saves some weight it seems (product #2476)
almaz_1c
Member
Posts: 43
Joined: Tue Dec 09, 2014 12:58 pm

Re: [SOLVED] Selecting an ultrasonic sensor and interface

Post by almaz_1c »

Fucitol wrote: Thats exactly the solution I was looking towards and this indeed looks very promising.

If you have 'finalised' this setup are you willing to share how you connected it and adapted the software? By the way, they also offer the same sensor with a voltage ranging from 2.7 - 3.6v instead of the 5v max in the one you linked, which saves some weight it seems (product #2476)
The sensor described by link can be supplied by from 3.0 V ( VCC pin of expansion board ) - for this you need desolder one resistor ( it is explained by link).
So connection is quite simple:
Crazyflie ----> Sensor
VCC ---> VCC
GND ----> GND
E_MISO (PA6) ----> OUT ( this pin i configure as ADC input )

My firmware is not based on Crazyflie's original firmware ( there is master's project at the University i study ) and i load it using crazyflie debug adapter kit and stm32 discovery board as programmator. After finishing it ( I plan to add also one or two IR sensor to navigate in X and Y axis ) and some cleaning i put it on github.
But if you do not want to wait and you have some coding skills i can explain you how to implement altitude control algorithm and put pieces of code.
almaz_1c
Member
Posts: 43
Joined: Tue Dec 09, 2014 12:58 pm

Re: [SOLVED] Selecting an ultrasonic sensor and interface

Post by almaz_1c »

tobias wrote:
Watched your video. Nice rig you have built!

PS. I would balance the propellers again though as it sounds a lot, will improve the stability. DS
Thanks) How to balance the propellers?
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: [SOLVED] Selecting an ultrasonic sensor and interface

Post by tobias »

How to balance the propellers?
Balancing propellers.
The sensor described by link can be supplied by from 3.0 V ( VCC pin of expansion board )
Have you already tried this? I read in the datasheet the sensors consumes 300mA for short periods of time (when led is on) and I'm not sure how the CF2 3.0V regulator will manage that. It might be possible connecting the LED to VCOM instead but then one would have to hack the sensor board.
My firmware is not based on Crazyflie's original firmware ( there is master's project at the University i study )
Sounds really interesting. Will be exiting to follow what you are up to!
almaz_1c
Member
Posts: 43
Joined: Tue Dec 09, 2014 12:58 pm

Re: [SOLVED] Selecting an ultrasonic sensor and interface

Post by almaz_1c »

tobias wrote: Have you already tried this?
Yes, it work without any trobles.
tobias wrote:Will be exiting to follow what you are up to!
As will be logically completed firmware ( also 2 sensor ) - i will put in on github.
dbrgn
Member
Posts: 51
Joined: Tue Dec 16, 2014 9:42 pm

Re: [SOLVED] Selecting an ultrasonic sensor and interface

Post by dbrgn »

I also finished my attempts with the HC-SR04. I etched my own PCB (for the first time) to be able to use the SOT23 voltage converters.

Etching the PCB with sodium persulfate:

Image

Partially assembled (I'm no SMD soldering master yet):

Image

Fully assembled:

Image
Image

The voltage conversion works! (Usually between 4.95V and 5.05V, the sensor needs ~5V)

Image

Next up: Adjusting the firmware for this sensor.

The parts list, schematics and PCB layout (KiCAD sources) can be found on Github: https://github.com/dbrgn/crazyflie2-hcsr04/
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: [SOLVED] Selecting an ultrasonic sensor and interface

Post by tobias »

Nice work dbrgn! That is really nice and being your first time as well. Looking forward to read more!
chad
Expert
Posts: 555
Joined: Sun Sep 28, 2014 12:54 am
Location: New York, USA
Contact:

Re: [SOLVED] Selecting an ultrasonic sensor and interface

Post by chad »

Wow dbrgn. This is cool. The best part is seeing dead mosquitoes in the sodium persulfate solution. Be they didn't know what hit 'em... ;)
Crazyflier - my CF journal...
4x Crazyflie Nano (1.0) 10-DOF + NeoPixel Ring mod.
3x Crazyflie 2.0 + Qi Charger and LED Decks.
Raspberry Pi Ground Control.
Mac OS X Dev Environment.
Walkera Devo7e, ESky ET6I, PS3 and iOS Controllers.
dbrgn
Member
Posts: 51
Joined: Tue Dec 16, 2014 9:42 pm

Re: [SOLVED] Selecting an ultrasonic sensor and interface

Post by dbrgn »

chad wrote:Wow dbrgn. This is cool. The best part is seeing dead mosquitoes in the sodium persulfate solution. Be they didn't know what hit 'em... ;)
Haha, yeah. I kept the solution in the basement for a day to be re-used. Afterwards all those mosquitoes were in it. Something probably attracted them.
Post Reply