Welcome to Multi-Rotor UK. Please login or sign up.

Saturday,April 20, 2024, 03:57:57

Login with username, password and session length

Shoutbox

hoverfly:
17 Apr 2024 17:15:13
 :rolleyes:
Bad Raven:
26 Mar 2024 08:41:05
 :(
Andy7:
25 Mar 2024 14:49:21
An excess of work and rain.  :thumbdown:
Bad Raven:
23 Mar 2024 18:12:38
Almost a personal Blog, it would seem. LOTS of members, but NO posts.  :-/   :shrug:
Gaza07:
06 Mar 2024 16:59:49
Anyone still here  :shrug:
ched:
24 Dec 2023 11:48:48
Hope you all have a Great Christmas and a happy New Year.
Bad Raven:
20 Dec 2023 06:17:47
 ~~   :beer2: 
Gaza07:
19 Dec 2023 22:20:27
Merry Christmas All  :beer2:
Bad Raven:
01 Dec 2023 06:59:57
New Simulator Section started!   :beer2:
Bad Raven:
17 Jun 2023 06:52:23
Yes, smaller, same as lots of things as time passes.
Members
Stats
  • Total Posts: 201,425
  • Total Topics: 20,260
  • Online today: 22
  • Online ever: 530
  • (Tuesday,June 26, 2012, 08:34:46 )
Users Online
Users: 0
Guests: 30
Total: 30

Theme Changer





3d - Printworx

Crius AIOP , MegaPirate NG and Sonar

Started by bunnygirl80, Wednesday,February 06, 2013, 09:24:51

Previous topic - Next topic

bunnygirl80

Hi Guys,

Well! Here is my Crius AIOP (running MegaPirate NG) which arrived last week!  ::) So far, I';ve connected and setup the UBEC (working), Crius CN-06 GPS (working), Telemetry (working) and HC-SR04 Sonar (not sure).

I can';t find any Sonar specific code to uncomment in the config and I can';t find the HC-SR04 sonar in the flight planner?

Can anyone tell me how to configure and how do I know if the sonar is working? Is there a screen which can show me the readings?

Thanks,

Stef
Always smile because you never know who could be falling in love with it. :) Drone Operator in North Wales. [url="//www.aerialworx.co.uk"]www.aerialworx.co.uk[/url]

Jumpy07

Stef,

Its enabled by default in code.. you just need to pick any sonar in the Hardware option in Mission Planner





Although would edit APM_Config.h and change limit from 400 to 200
#define MAX_SONAR_RANGE 400 
The Mission Planner';s terminal screen can be used to test the sonar. After ensuring that your COM port is selected, press the Terminal button. When the prompt appears type "test" and "sonar". Note that the minimum distance displayed by the sonar will be about 20cm.



BNUC-S Pilot with PfCo /PFAW.
UAQ / CAA PfCo Instructor / Flight Assessor

"All that is necessary for the triumph of evil is that good men do nothing"

bunnygirl80

Thanks for that. I just tried it, but no luck the test is coming back with 0cm all the time. I updated the code to 200. I then went into hardware and enabled the sonar. I then went into console and type test -> sonar, but 0. then I did setup -> sonar and it says enabled type 0.
connected the trgger to pin 9 signal and echo to pin 10 signal and + and - as usual to the S0-3 + and -.
not sure what else it could be?
Always smile because you never know who could be falling in love with it. :) Drone Operator in North Wales. [url="//www.aerialworx.co.uk"]www.aerialworx.co.uk[/url]

Jumpy07

Not sure then Stef..

Can you hear the ultrasonic clicking ?

Would double check wiring, but you may have faulty Ultrasonic, do you have another one you can try ?
BNUC-S Pilot with PfCo /PFAW.
UAQ / CAA PfCo Instructor / Flight Assessor

"All that is necessary for the triumph of evil is that good men do nothing"

Gaza07

Hi Stef you can take the power from the 5v / gnd pins in front of pin 9 or 10 and the sonar will be powered from the esc when its powered even if the jumper is removed  ~~
Put you ear to it and see if you can hear any clicking as Craig said, also try reversing the echo and trigger see if it works the other way around, once its working you will deff see it change in terminal  ~~
[url="https://www.youtube.com/channel/UCN6zN99iLCIJea5FCQPKf_g"]YouTube[/url]   [url="https://www.printing-3d.co.uk"]printing-3d[/url]  [url="https://www.thingiverse.com/Gaza07/about"]Thingiverse[/url]  [url="https://www.3d-printworx.co.uk"]3d-printworx[/url]

bunnygirl80

Always smile because you never know who could be falling in love with it. :) Drone Operator in North Wales. [url="//www.aerialworx.co.uk"]www.aerialworx.co.uk[/url]

bunnygirl80

Just tried swapping the echo and trigger and no difference. I';ve also put my ear to the ground and I can hear about three initial clicks when I plug in the USB to power up, then silence. Is this good?

I don';t have any other sonars to test! :( Sob!
Always smile because you never know who could be falling in love with it. :) Drone Operator in North Wales. [url="//www.aerialworx.co.uk"]www.aerialworx.co.uk[/url]

bunnygirl80

I';ve tried everything I can think of and I can only assume that it is broken!  :-/

Considering that I haven';t use it, that is a bit crap!

Okay, can someone recommend a sonar to use with the AIOP and MPNG?

Thanks.
Always smile because you never know who could be falling in love with it. :) Drone Operator in North Wales. [url="//www.aerialworx.co.uk"]www.aerialworx.co.uk[/url]

Gaza07

This actually happened tome to Stef I bought a new Rabbit flight controller with all the extra bits and as soon as I tried the sonar it worked for a few seconds then died on me brand new to, but far to expensive to send all the way back to china, ebay is a good place for the sonar modules  ~~

Quote from: bunnygirl80 on Wednesday,February 06, 2013, 18:05:37
I';ve tried everything I can think of and I can only assume that it is broken!  :-/

Considering that I haven';t use it, that is a bit crap!

Okay, can someone recommend a sonar to use with the AIOP and MPNG?

Thanks.
[url="https://www.youtube.com/channel/UCN6zN99iLCIJea5FCQPKf_g"]YouTube[/url]   [url="https://www.printing-3d.co.uk"]printing-3d[/url]  [url="https://www.thingiverse.com/Gaza07/about"]Thingiverse[/url]  [url="https://www.3d-printworx.co.uk"]3d-printworx[/url]

bunnygirl80

Always smile because you never know who could be falling in love with it. :) Drone Operator in North Wales. [url="//www.aerialworx.co.uk"]www.aerialworx.co.uk[/url]

Gaza07

Yea thats the one or you can get it a bit cheaper here http://www.ebay.co.uk/itm/130822192972?ssPageName=STRK:MEWAX:IT&_trksid=p3984.m1423.l2649  ~~

ooh nice new avatar do we get a large version of that one to  :rolleyes:
[url="https://www.youtube.com/channel/UCN6zN99iLCIJea5FCQPKf_g"]YouTube[/url]   [url="https://www.printing-3d.co.uk"]printing-3d[/url]  [url="https://www.thingiverse.com/Gaza07/about"]Thingiverse[/url]  [url="https://www.3d-printworx.co.uk"]3d-printworx[/url]

Biffa

Steve

Ross

Seems to me they are all made in China by the same firm or cloned  :rofl:...some you win..some you loose.
So much for Quality Control  Wily people these orientals. :rofl:
Let's be careful out there.
SAFETY is.. NO accident.

Gaza07

The sonar is only used at low altitude and is more accurate than the baro, When flown over a large obstacle it makes the copter rise to the same height over the obstacle as it was from the floor, you don';t have to have the sonar but when it works correctly its pretty good  ~~

Quote from: Biffa on Wednesday,February 06, 2013, 20:53:46
Are these used instead of the baro?
[url="https://www.youtube.com/channel/UCN6zN99iLCIJea5FCQPKf_g"]YouTube[/url]   [url="https://www.printing-3d.co.uk"]printing-3d[/url]  [url="https://www.thingiverse.com/Gaza07/about"]Thingiverse[/url]  [url="https://www.3d-printworx.co.uk"]3d-printworx[/url]

Biffa

Steve

bunnygirl80

Oh! Super! I';ve got my sonar working after only four days of tinkering and 300 lines of code changes! Whippee! This stuff is sooo easy! It dead accurate too with readings from 2.2 meters to about 6 cm. The reading is even appearing in the GUI altitude.

My question, does the sonar readings get ignored after the quad turns to an angle of more than a certain degrees?

Thxx.
Always smile because you never know who could be falling in love with it. :) Drone Operator in North Wales. [url="//www.aerialworx.co.uk"]www.aerialworx.co.uk[/url]

Gaza07

I seem to remember it being a problem if you tilted the copter to far you could upset the sonar reading so there was no code to stop or calculate a correction for this  :rolleyes:
Im not sure if there is anything in the code now but that';s how it was  :shrug:
[url="https://www.youtube.com/channel/UCN6zN99iLCIJea5FCQPKf_g"]YouTube[/url]   [url="https://www.printing-3d.co.uk"]printing-3d[/url]  [url="https://www.thingiverse.com/Gaza07/about"]Thingiverse[/url]  [url="https://www.3d-printworx.co.uk"]3d-printworx[/url]

bunnygirl80

Ah! Super! I';ll have a look at the code then!  ;) and then report back with my findings!
Always smile because you never know who could be falling in love with it. :) Drone Operator in North Wales. [url="//www.aerialworx.co.uk"]www.aerialworx.co.uk[/url]

firey1

Quote from: bunnygirl80 on Wednesday,February 06, 2013, 22:48:09
Oh! Super! I';ve got my sonar working after only four days of tinkering and 300 lines of code changes! Whippee! This stuff is sooo easy! It dead accurate too with readings from 2.2 meters to about 6 cm. The reading is even appearing in the GUI altitude.

My question, does the sonar readings get ignored after the quad turns to an angle of more than a certain degrees?

Thxx.

Can i ask how you got it to work i am having the same issue you did and have tried 2 different sonars still getting the same 0 results on test
Mike
MIKE

550 RC Spider quad for FPV
550 Alien quad (my sons now)
F450 quad
450 size bell 212, MD500,Augusta 109
600 size Huey running apm 2.5  3 planes  Taranis and 9xr  radios Skyzone FPV goggles

bunnygirl80

Hi Mike,

In the end my problems were down to wiring and power source. I originally took the power from the S1-S3 output but this was also shared between the GPS and telemetry. So, in the end I took the power directly from the UBEC and also had to swap the Trig/Echo cables over. How did you wire everything? which pins have you used?

Stef
Always smile because you never know who could be falling in love with it. :) Drone Operator in North Wales. [url="//www.aerialworx.co.uk"]www.aerialworx.co.uk[/url]

bunnygirl80

Quote from: bunnygirl80 on Friday,March 01, 2013, 09:37:55
Hi Mike,

In the end my problems were down to wiring and power source. I originally took the power from the S1-S3 output but this was also shared between the GPS and telemetry. So, in the end I took the power directly from the UBEC and also had to swap the Trig/Echo cables over. How did you wire everything? which pins have you used?

Stef

Also, don';t forget to look at Gaza';s guide. It';s invaluable for doing the job!
Always smile because you never know who could be falling in love with it. :) Drone Operator in North Wales. [url="//www.aerialworx.co.uk"]www.aerialworx.co.uk[/url]

firey1

Quote from: bunnygirl80 on Friday,March 01, 2013, 12:46:39
Also, don';t forget to look at Gaza';s guide. It';s invaluable for doing the job!

Thanks for that I was trying to follow other suggestions of powering off the pin 7  vcc and neg as described by some people will have a go at powering straight from the ubec today also i did try swapping the echo and trigg but made no difference

Im still at the stage of putting it all together got the gps/minim osd/bluetooth all working and now sorting out pid tuning
many thanks for you reply to my question
Mike
MIKE

550 RC Spider quad for FPV
550 Alien quad (my sons now)
F450 quad
450 size bell 212, MD500,Augusta 109
600 size Huey running apm 2.5  3 planes  Taranis and 9xr  radios Skyzone FPV goggles

Phil1970

Late post I know//

I read in another thread in the forum that you may not take power from the aiop board to fire up the SR04  sonar.
Solder the vcc and negative wire directly to a separate UBEC or use a ESC to provide 5V. That should do the trick.

Haven';t tested it though, I am currently working on external leds.

kogashuko

Will installing one of these keep my megapirate crius V2 quads from falling out of the sky when I select AUTO or RTL???
Friends dont let friends use NTMs.

cgcrute

Quote from: Jumpy07 on Wednesday,February 06, 2013, 09:32:32
Although would edit APM_Config.h and change limit from 400 to 200
#define MAX_SONAR_RANGE 400 
The Mission Planner';s terminal screen can be used to test the sonar. After ensuring that your COM port is selected, press the Terminal button. When the prompt appears type "test" and "sonar". Note that the minimum distance displayed by the sonar will be about 20cm.

I';ve just installed one, why is limiting the range a good idea?
ZMR250
Naze32
Micro Titan Motors
SN02a ESCs
Mobius
Runcam Sky (with servo adjustable tilt)

Cheerson CX-10 ;-)

Taranis Transmitter

kilby

In led to believe that the sonar is only accurate over a short range, beyond that the barometer is more useful
Not much kit, but what I have I like
Armattan Tilt 2, Morphite 180, Quark 150, Decapitated NanoQX
Taranis+

cgcrute

Thanks, I';ll do that then. As a Newbie I';ve only really installed the firmware once, I presume putting it on again wipes all my settings, if so is there a way to save them?
ZMR250
Naze32
Micro Titan Motors
SN02a ESCs
Mobius
Runcam Sky (with servo adjustable tilt)

Cheerson CX-10 ;-)

Taranis Transmitter

cgcrute

Also, which model of Sonar should I select in Mission Planner, this specific one isn';t listed?

ZMR250
Naze32
Micro Titan Motors
SN02a ESCs
Mobius
Runcam Sky (with servo adjustable tilt)

Cheerson CX-10 ;-)

Taranis Transmitter