Altitude sensors

4 views
Skip to first unread message

John McClelland

unread,
Jan 23, 2011, 9:46:37 AM1/23/11
to uavhel...@googlegroups.com, John McClelland
Marc
 
I see you are buying parts.  Jerry and I are working on two altitude sensors for heli and quad altitude control in MP-H.
 
Ultrasonic sensor:
You will need to invert the outputs with a 7404 or similar to interface with serial port.
 
Barometric sensor:
This will be interfaced to the I2C bus.
 
John

Adam Barrow

unread,
Jan 23, 2011, 10:10:09 AM1/23/11
to uavhel...@googlegroups.com, John McClelland
John,
 for the Ultrasonic sensor, why did you guys choose to use the serial interface? I have purchased a few of those sensors (in consideration to add flaring to MP for airplanes) and was planning to use the analog output  or the PWM output.

Regards,
Adam Barrow

Marcus Fahlén

unread,
Jan 23, 2011, 10:13:30 AM1/23/11
to uavhel...@googlegroups.com
Thanks John!

Is the problems with the tail holding solved yet?
I understood that you and Bill hit the wall when trying to get the UDB to replace a traditional gyro?

My suggestion was to use the UDB in addition to a traditional gyro (my preferred way to do it). I would like to use my GY-611 as primary tail control, but  have the UDB to provide small corrections to account for the gyro drift. Is this going to happen in the next release?

I'm looking forward to see the new release!
Keep up the good work!

/ Marc

John McClelland

unread,
Jan 23, 2011, 10:26:20 AM1/23/11
to uavhel...@googlegroups.com, John McClelland
Marc
 
No there was no wall.  There were some residual effects that were more of a nuisance...still some twitching of the tail but not bad.  I'm working on fixing it up and integrating this into V3 now.  Final gain setting awaits some better weather up here. 
 
The plan was to eliminate the 401 entirely.
 
John

Marcus Fahlén

unread,
Jan 23, 2011, 10:39:01 AM1/23/11
to uavhel...@googlegroups.com
Do I understand this correctly when assuming two sensors for "round robin" sensor voting or something similar?
(Barometric sensor takes precedence at altitudes over 255 inches, and vice versa?)

Which UART is the ultrasonic sensor going to use on the UDB? (if serial interface is going to be used)

/ Marc

On Sun, Jan 23, 2011 at 3:46 PM, John McClelland <mcclell...@gmail.com> wrote:

Marc-X

unread,
Jan 23, 2011, 10:48:49 AM1/23/11
to UAVHeliBoard
John,

Will there be an OPTION to use a PRIMARY gyro? (I have a gyro / servo
combo that cost's $$$) This one far out-performs the 401 and I will
not trade it for another solution. Another aspect is that the servo
is a 720uS (BLS251) and could not be used on a standard RC receiver.
This combo is lightning fast and holds the tail rock solid with very
little drift.

I think many existing (high end) helicopter pilots, that's maybe
thinking of trying an UDB is going to back off if they can't use the
UDB together with their existing gyro / servo combo.

There must be a way to provide an option for us boneheads?

Cheers!

/ Marc


On Jan 23, 4:26 pm, "John McClelland" <mcclelland.j...@gmail.com>
wrote:
> Marc
>
> No there was no wall.  There were some residual effects that were more of a nuisance...still some twitching of the tail but not bad.  I'm working on fixing it up and integrating this into V3 now.  Final gain setting awaits some better weather up here.  
>
> The plan was to eliminate the 401 entirely.
>
> John
>
>
>
>
>
>
>
>   ----- Original Message -----
>   From: Marcus Fahlén
>   To: uavhel...@googlegroups.com
>   Sent: Sunday, January 23, 2011 8:13 AM
>   Subject: Re: Altitude sensors
>
>   Thanks John!
>
>   Is the problems with the tail holding solved yet?
>   I understood that you and Bill hit the wall when trying to get the UDB to replace a traditional gyro?
>
>   My suggestion was to use the UDB in addition to a traditional gyro (my preferred way to do it). I would like to use my GY-611 as primary tail control, but  have the UDB to provide small corrections to account for the gyro drift. Is this going to happen in the next release?
>
>   I'm looking forward to see the new release!
>   Keep up the good work!
>
>   / Marc
>

Marc-X

unread,
Jan 23, 2011, 10:54:16 AM1/23/11
to UAVHeliBoard
...Muxing the GPS UART perhaps?


// Marc

On Jan 23, 4:39 pm, Marcus Fahlén <marcus.fah...@gmail.com> wrote:
> Do I understand this correctly when assuming two sensors for "round robin"
> sensor voting or something similar?
> (Barometric sensor takes precedence at altitudes over 255 inches, and vice
> versa?)
>
> Which UART is the ultrasonic sensor going to use on the UDB? (if serial
> interface is going to be used)
>
> / Marc
>
> On Sun, Jan 23, 2011 at 3:46 PM, John McClelland
> <mcclelland.j...@gmail.com>wrote:

Jerry Chapman

unread,
Jan 23, 2011, 11:08:04 AM1/23/11
to uavhel...@googlegroups.com
Hi Adam,
 
When using the extra channels option, you only get one extra PWM input, correct me if I'm wrong.  We already use this input in the heli and quad software.  So the only other choice is to use the RX serial input of UART1 on the UDB.
 
Jerry  
 

Subject: Re: Altitude sensors
From: adam....@gmail.com
Date: Sun, 23 Jan 2011 09:10:09 -0600
CC: mcclell...@gmail.com
To: uavhel...@googlegroups.com

John McClelland

unread,
Jan 23, 2011, 11:39:17 AM1/23/11
to uavhel...@googlegroups.com
Jerry
 
In principle you can add more extra channels.  I think the problem was how the Heading Hold was implimented, prevented the other extra channels from being used.  This could be fixed.  Alternatively we could go for the PPM aproach.
 
John
----- Original Message -----

John McClelland

unread,
Jan 23, 2011, 11:43:00 AM1/23/11
to uavhel...@googlegroups.com, John McClelland
Marc
 
We are just now putting those ideas together.  The actual imlimentattion depends on the tests, but the idea is to have a smooth transition between the two.
 
I will think about an option to either use HH or normal gyro servo.  HH has a digital output option at 240Hz already.
 
I will post how things get implimented as we go along....but am open to suggestions.
 
John
----- Original Message -----
Sent: Sunday, January 23, 2011 8:39 AM
Subject: Re: Altitude sensors

Marcus Fahlén

unread,
Jan 23, 2011, 12:06:49 PM1/23/11
to uavhel...@googlegroups.com
John,

I'll guess that it really isn't an issue after all. The corrections you provide to the tail servo when implementing HH is just mimicking the "stick input" a helicopter pilot would do to hold the tail when flying, gyro or not.
If there is a high end gyro sitting between the UDB and the tail servo, the UDB really doesn't care. The corrections will just be far smaller than if there were no gyro, right?

The only issue I can see id if you are using the proportional "pirouette" speed function. That is the pirouette speed increases with stick input. The gyro I'm talking about (the GY-611) has a lot of such settings. It also has different gains for counter rudder and the way it's applied, to make the tail stop directly when stick is centered. It's like it hits a wall.. This is meant for advanced 3D (stickbanging) or F3C flying. http://www.youtube.com/watch?v=cS6X97--tkA


I really can't see a problem here, can you pint one out for me? (Just to know if we are thinking differently about the whole control concept).

Cheers!

 // Marc

John McClelland

unread,
Jan 23, 2011, 12:11:59 PM1/23/11
to uavhel...@googlegroups.com, John McClelland
Marc
 
Right now the gain is set to a value in options.h.  This is what most people would use since most always run in HH mode anyway.  There is no reason we couldn't mix in a variable gain term that depends on other variables.  But let's not get too far ahead of our headlights.  Right now I just want to get HH working like a 401 in HH mode for those of us that normally fly that way all the time.  Once that works well, we can start including more sophisticated options. 

Adam Barrow

unread,
Jan 23, 2011, 1:16:13 PM1/23/11
to uavhel...@googlegroups.com
Jerry / John,
 In my case, I was considering using the servo input 1 or 2, which are currently wired to the only 2 ADC pins on the dsPIC30F4011 that aren't used for the gyro or accelerometers. I figured that I could move the input over to the 'extra PWM input' that MatrixPilot can enable. The challenge would be that there is a 330 ohm resistor in the circuit that I was hoping I could adjust for (ether with a parallel resistor added, or better in software). At this point, I haven't written any of the code. As I mentioned, the alternative was to use the PWM output from the module, which could reuse the PWM reading code already in Matrix Pilot, although I may have to increase the sensitivity.

My goal was to avoid using the serial port because I want to be able to upload telemetry data (both ground control and from other aircraft) via the serial port.

Hopefully this helps to explain my approach. Even if it doesn't make sense to integrate the two approaches, I think it would behove all of us to share the code we are developing. For my part, I'll post the routines I develop here once I have a chance to write and test them.

Regards,
Adam Barrow

John McClelland

unread,
Jan 23, 2011, 1:37:45 PM1/23/11
to uavhel...@googlegroups.com, John McClelland
Adam
 
That is the problem...available ADC channels.  That is why we went to serial output for testing (easy to do and right now using up all the PWMs for control input).   It is possible to keep the serial solution if you don't need to recieve telemetry data.  Normal telemetry output can coexist with the ultrasonic input to the serial port.  The solution longterm is to go with PPM. 
 
As soon as I have something that looks like it might work, I will share the code.
 
John
----- Original Message -----
Sent: Sunday, January 23, 2011 11:16 AM
Subject: Re: Altitude sensors

Marcus Fahlén

unread,
Jan 23, 2011, 5:16:56 PM1/23/11
to uavhel...@googlegroups.com
John / Adam,

Isn't it *POSSIBLE* to multiplex the GPS UART? The port speed is only 9600 (if that has something to say in the context).
Just trying to learn a little...


/ Marc

John McClelland

unread,
Jan 23, 2011, 5:23:19 PM1/23/11
to uavhel...@googlegroups.com
I'm sure it possible, but I wouldn't do it.  The serial port solution is fine for now in development.  It can coexist with standard telemetry (which I use extensively for debugging writing to OpenLog).  The right solution is PPM in the long term. 

Marcus Fahlén

unread,
Jan 23, 2011, 6:49:27 PM1/23/11
to uavhel...@googlegroups.com
John,

Sounds good to me. I expect it will work together with an existing gyro system just fine since this will do most of the "hard" work. I expect the UDB to adapt to the actual motion and attitude of the helicopter, thereby adding the small corrections needed to keep the nose pointing in one direction over time. Today I have VERY little drift in the tail, but there is some over time.

Looking forward to test it!

/ Marc
Reply all
Reply to author
Forward
0 new messages