CMUcam3 & Altitude Sensor

29 views
Skip to first unread message

Patrick

unread,
Apr 6, 2010, 2:45:10 AM4/6/10
to uavdevboard
Hi All,

I would like a UAV to drop a package on a target (as part of a
competition)

To do this, I am hoping to use the CMUcam3 (http://www.cmucam.org/) to
visually detect the target and steer the plane accordingly. Is this
possible using the UAV Dev Board?
The CMUcam3 requires a two serial data lines, which I assume I can
interface to the spare USART on board.

I have some programming experience with 18F's, but when examining the
source code of the UAV dev Board, It was really complicated, and I was
unable to figure out how it works.

How would I be able to receive serial data from the CMUcam3, parse it,
and make it influence the planes direction?
If that is not possible, could I connect the servo out from this
module to one of the radio In's, and pretend it is the radio rudder
control?
Is it possible to turn the plane in waypoint mode, or does the mode
need to be changed?

Another question:
To drop the package accurately, you need to know your altitude, so
that you know how far away the target is when you see it on the camera
(taking into account the angle of the camera)
How accurate are the GPSs in terms of altitude (in Australia)?
(from experience with a few GPSs, they seemed to drift a lot in
altitude)

Assuming it is inaccurate:
Is it possible to connect / interface an altitude sensor (http://
www.sparkfun.com/commerce/product_info.php?products_id=8161) to the
UAV dev board?

How would I configure the software to read that sensor instead of the
GPS data?

I looked at the dsPIC30F4011 chip's datasheet, If I make connections
on the programming header and one of the switches, I have the required
IO for SPI, which is what is required to communicate with the
altimeter. Is this feasible?


Another Question:
Can I interface a CMUcam3 (http://www.cmucam.org/) to the UAV
development Board?
Better put: Can I receive serial data, and make it influence the
planes direction?
Where would I program this (which files, where therin)?

Thanks in advance.

Peter Hollands

unread,
Apr 6, 2010, 5:33:10 AM4/6/10
to uavde...@googlegroups.com
Patrick,

The way that I approached understanding the source code was:-
  • I I made a table of every major interrupt routine name, it's purpose, and it's priority
  • I also made a note of how every interrupt routine is called:-
Once I had done that, I had a much much better understanding of how this code works.

It is totally interrupt driven. And most of the interrupts are working off timers.

So the architecture is in layers. Each layer is being executed independently and at
different call rates. 40 times / second, 4 times / second, 1 time / second etc.

So I recommend printing out the code once, and making the table as described above, as
a very good way to get a picture of the architecture.

To receive data and parse it, you will need to copy the methodology used by the gps routines.
They receive data serially from the gps device,  and parse to create  lat  and lon variables.

I will leave it to others to answer some of your other questions.

Pete





--
To unsubscribe, reply using "remove me" as the subject.

Patrick

unread,
Apr 6, 2010, 5:51:18 AM4/6/10
to uavdevboard
Thank you very much.

-Patrick

On Apr 6, 7:33 pm, Peter Hollands <peter.holla...@gmail.com> wrote:
> Patrick,
>
> The way that I approached understanding the source code was:-
>
>    - I I made a table of every major interrupt routine name, it's purpose,
>    and it's priority

>    - I also made a note of how every interrupt routine is called:-


>       - Is is called by a timer ? - if so, then how often ?

>       - Is it called by a routine  (for example the T3 Interrupt routine in
>       gpsparsecommon.c,<http://code.google.com/p/gentlenav/source/browse/trunk/MatrixPilot/gp...>


>       which then calls estYawDrift.c, navigate.c, and waypoints.c)
>
> Once I had done that, I had a much much better understanding of how this
> code works.
>
> It is totally interrupt driven. And most of the interrupts are working off
> timers.
>
> So the architecture is in layers. Each layer is being executed independently
> and at
> different call rates. 40 times / second, 4 times / second, 1 time / second
> etc.
>
> So I recommend printing out the code once, and making the table as described
> above, as
> a very good way to get a picture of the architecture.
>
> To receive data and parse it, you will need to copy the methodology used by

> the gps routines<http://code.google.com/p/gentlenav/source/browse/trunk/MatrixPilot/gp...>


> .
> They receive data serially from the gps device,  and parse to create  lat
> and lon variables.
>
> I will leave it to others to answer some of your other questions.
>
> Pete
>

William Premerlani

unread,
Apr 6, 2010, 9:09:06 PM4/6/10
to uavde...@googlegroups.com
Patrick,
 
Regarding interfacing other sensors to the UAV DevBoard, I recommend the I2C interface. The 4 pins that you need (SCL, SDA, power and ground) are in the programming connector.
 
I have interfaced a magnetometer that way, and I am going to try a pressure sensor next.
 
Bill

 

Patrick

unread,
Apr 7, 2010, 4:53:14 PM4/7/10
to uavdevboard
Bill,

Which pressure sensor are you using (I2C) ?

Patrick

On Apr 7, 11:09 am, William Premerlani <wpremerl...@gmail.com> wrote:
> Patrick,
>
> Regarding interfacing other sensors to the UAV DevBoard, I recommend the I2C
> interface. The 4 pins that you need (SCL, SDA, power and ground) are in the
> programming connector.
>
> I have interfaced a magnetometer that way, and I am going to try a pressure
> sensor next.
>
> Bill
>

William Premerlani

unread,
Apr 7, 2010, 5:36:55 PM4/7/10
to uavde...@googlegroups.com
Patrick,
 
I bought this pressure sensor, and I am going to give it a try.
 
Bill

 

JERRY CHAPMAN

unread,
Apr 7, 2010, 6:06:03 PM4/7/10
to uavde...@googlegroups.com
Bill,
 
I've been playing with that sensor.  I can save you some time and give you some psuedo code.  I'm reading and converting the temp.  Just getting ready to read the pressure.  Had to take a break and run some test flights running the gyrotest software in the helicopter.  The data is looking good.
 
Jerry
 

Date: Wed, 7 Apr 2010 17:36:55 -0400
Subject: Re: CMUcam3 & Altitude Sensor
From: wprem...@gmail.com
To: uavde...@googlegroups.com

The New Busy is not the old busy. Search, chat and e-mail from your inbox. Get started.

William Premerlani

unread,
Apr 7, 2010, 6:59:41 PM4/7/10
to uavde...@googlegroups.com
Hi Jerry,
 
Thanks, that would be a big help.
 
I've been working on the magnetometer code today, specifically the implementation of automatic offset cancellation.
 
It works. So, now there is only one more step left for me to do, which is the self calibration, but that should be easy. Then, I will have to clean the code up before I let Peter Hollands look at it. ;-)
 
So, it is looking like all anyone will have to do to use Jordi's magnetometer breakout board with MatrixPilot, or "HeliPilot" will be to connect it to the ICSP connector on the UDB, install some firmware, and go flying. You will not have to do anything about manually offsetting or calibrating the magnetometer.
 
It will calibrate itself during initialization, and cancel any offsets during the first few seconds on flight.
 
Of course, as a bonus, the DCM algorithm will be achieving yaw lock during initialization, so you will be able to go immediately into waypoint mode during takeoff. So, we will be able to do autonomous take offs.
 
Best regards,
Bill

 

tshado

unread,
Apr 7, 2010, 7:17:31 PM4/7/10
to uavdevboard
Hello Bill,

Yves Gohy, on the DIYDrones website is using the same "Pressure
Sensor SCP1000-D11 Board".
He is using it with ArduImu V2+ trough I2C bus.
(He is also using the "HMC5843 - Triple Axis Magnetometer" )
Here is his blog link :

http://diydrones.com/profiles/blogs/arduimu-with-magnetometer

He is using ,for the Pressure Sensor, the code from Christopher
Barnes. Source code est available from:
http://ardunxt.googlecode.com/files/SCP1000_D11_release_1.zip

Best regards,
Jean-Claude

On 8 avr, 00:59, William Premerlani <wpremerl...@gmail.com> wrote:
> Hi Jerry,
>
> Thanks, that would be a big help.
>
> I've been working on the magnetometer code today, specifically the
> implementation of automatic offset cancellation.
>
> It works. So, now there is only one more step left for me to do, which is
> the self calibration, but that should be easy. Then, I will have to clean
> the code up before I let Peter Hollands look at it. ;-)
>
> So, it is looking like all anyone will have to do to use Jordi's
> magnetometer breakout board with MatrixPilot, or "HeliPilot" will be to
> connect it to the ICSP connector on the UDB, install some firmware, and go
> flying. You will not have to do anything about manually offsetting or
> calibrating the magnetometer.
>
> It will calibrate itself during initialization, and cancel any offsets
> during the first few seconds on flight.
>
> Of course, as a bonus, the DCM algorithm will be achieving yaw lock during
> initialization, so you will be able to go immediately into waypoint mode
> during takeoff. So, we will be able to do autonomous take offs.
>
> Best regards,
> Bill
>

> On 4/7/10, JERRY CHAPMAN <raptor9...@msn.com> wrote:
>
>
>
> > Bill,
>
> > I've been playing with that sensor.  I can save you some time and give
> > you some psuedo code.  I'm reading and converting the temp.  Just getting
> > ready to read the pressure.  Had to take a break and run some test flights
> > running the gyrotest software in the helicopter.  The data is looking good.
>
> > Jerry
>

> > ------------------------------


> > Date: Wed, 7 Apr 2010 17:36:55 -0400
> > Subject: Re: CMUcam3 & Altitude Sensor

> > From: wpremerl...@gmail.com
> > To: uavde...@googlegroups.com
>
> > Patrick,
>
> > I bought this pressure sensor<http://store.diydrones.com/product_p/br-scp1000d11-01.htm>,


> > and I am going to give it a try.
>
> > Bill
>

> > On 4/7/10, *Patrick* <patrick.meir...@gmail.com> wrote:
>
> > Bill,
>
> > Which pressure sensor are you using (I2C) ?
>
> > Patrick
>
> > On Apr 7, 11:09 am, William Premerlani <wpremerl...@gmail.com> wrote:
> > > Patrick,
>
> > > Regarding interfacing other sensors to the UAV DevBoard, I recommend the
> > I2C
> > > interface. The 4 pins that you need (SCL, SDA, power and ground) are in
> > the
> > > programming connector.
>
> > > I have interfaced a magnetometer that way, and I am going to try a
> > pressure
> > > sensor next.
>
> > > Bill
>
> > > On 4/6/10, Patrick <patrick.meir...@gmail.com> wrote:
>

> > ------------------------------


> > The New Busy is not the old busy. Search, chat and e-mail from your inbox. Get

> > started.<http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTA...>

Russell Duffy

unread,
Apr 7, 2010, 7:34:32 PM4/7/10
to uavde...@googlegroups.com
FWIW, the manufacturer lists the SCP1000 series sensors as obsolete, though
I'm not sure how many remain on the shelf.
http://www.vti.fi/en/support/obsolete_products/pressure_sensors/

Another option to consider might be the Bosch BMP085, which is being used by
the UAVP/X guys, as well as the OpenPilot folks. This breakout board even
has a regulator so it can be powered by 5V.
http://www.quadroufo.com/product_info.php?cPath=1_4&products_id=61&osCsid=29
67fe69898d8c5cca67ef144e228678

Just something else to consider.

Rusty

Hello Bill,

http://diydrones.com/profiles/blogs/arduimu-with-magnetometer

Best regards,
Jean-Claude

JERRY CHAPMAN

unread,
Apr 7, 2010, 11:21:10 PM4/7/10
to uavde...@googlegroups.com
Bill,
 
I've attached a couple of files.  My mixture of CCS and sort of psuedo code.   I wrote the CCS code just to test the SCP1000 after I install it on my board tomorrow.  The sensor is on the bottom, so you have to make sure it works before soldering on to the UDB.  I also attached the VTI Doc. I got the information from.
 
I would like to add your I2C routines once your finished to the gyrotest software.  It will be interesting what the magnetometer and baro sensor do in flight.  I did buy some rubber covers for the SCP1000 to see if that helps block the air flow from the main rotor.
 
Later,
 
Jerry
 

Date: Wed, 7 Apr 2010 18:59:41 -0400

Hotmail is redefining busy with tools for the New Busy. Get more from your inbox. See how.
COM-09478-scp1000_product_family_specification_rev_0.08.pdf
SCP1000_psuedo_code.txt

JERRY CHAPMAN

unread,
Apr 7, 2010, 11:23:25 PM4/7/10
to uavde...@googlegroups.com
Rusty,
 
Sparkfun also has the Bosch BMP085 on a breakout board.
 
Jerry

Patrick

unread,
Apr 8, 2010, 5:13:18 AM4/8/10
to uavdevboard
Hi,

The Bosch Sensor looks good, and is quite a bit cheaper.
Are you referring to the HMC5843 (Jordi's magnetometer) in your above
post?

Autonomous takeoff sounds good.

I currently don't have the time to examine the source code, but hope
to get some time over the coming weeks.

Patrick.

On Apr 8, 1:23 pm, JERRY CHAPMAN <raptor9...@msn.com> wrote:
> Rusty,
>
> Sparkfun also has the Bosch BMP085 on a breakout board.
>
> Jerry
>
>
>
> > From: ru...@radrotary.com
> > To: uavde...@googlegroups.com
> > Subject: RE: CMUcam3 & Altitude Sensor
> > Date: Wed, 7 Apr 2010 18:34:32 -0500
>
> > FWIW, the manufacturer lists the SCP1000 series sensors as obsolete, though
> > I'm not sure how many remain on the shelf.
> >http://www.vti.fi/en/support/obsolete_products/pressure_sensors/
>
> > Another option to consider might be the Bosch BMP085, which is being used by
> > the UAVP/X guys, as well as the OpenPilot folks. This breakout board even
> > has a regulator so it can be powered by 5V.

> >http://www.quadroufo.com/product_info.php?cPath=1_4&products_id=61&os...

> _________________________________________________________________
> Hotmail is redefining busy with tools for the New Busy. Get more from your inbox.http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTA...

Ufo Man

unread,
Apr 9, 2010, 5:34:52 AM4/9/10
to uavde...@googlegroups.com
Hi Guys. The Bosch sensor is better. The SCP1000 has been discontinued
because the manufacturer had problems with that design. The Bosch sensor
is the one used by several variometer designs.

UFO_MAN

> ------------------------------------------------------------------------


> Hotmail is redefining busy with tools for the New Busy. Get more from
> your inbox. See how.

> <http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2>

tshado

unread,
Apr 9, 2010, 6:46:26 AM4/9/10
to uavdevboard
Hi Ufo-Man,

Thanks for sharing it !
Do you use it on a quadrotor UAV ?

Best regards,
Jean-Claude

On 9 avr, 11:34, "Ufo Man" <ufoma...@gmail.com> wrote:
> Hi Guys. The Bosch sensor is better. The SCP1000 has been discontinued
> because the manufacturer had problems with that design. The Bosch sensor
> is the one used by several variometer designs.
>
> UFO_MAN
>
> JERRY CHAPMAN wrote:
> > Rusty,
>
> > Sparkfun also has the Bosch BMP085 on a breakout board.
>
> > Jerry
>
> > > From: ru...@radrotary.com
> > > To: uavde...@googlegroups.com
> > > Subject: RE: CMUcam3 & Altitude Sensor
> > > Date: Wed, 7 Apr 2010 18:34:32 -0500
>
> > > FWIW, the manufacturer lists the SCP1000 series sensors as obsolete,
> > though
> > > I'm not sure how many remain on the shelf.
> > >http://www.vti.fi/en/support/obsolete_products/pressure_sensors/
>
> > > Another option to consider might be the Bosch BMP085, which is being
> > used by
> > > the UAVP/X guys, as well as the OpenPilot folks. This breakout board
> > even
> > > has a regulator so it can be powered by 5V.
>

> >http://www.quadroufo.com/product_info.php?cPath=1_4&products_id=61&os...

> > <http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTA...>

Ufo Man

unread,
Apr 9, 2010, 7:52:54 AM4/9/10
to uavde...@googlegroups.com
Hi Jean-Claude.

On my quad I use a Freescale pressure sensor, but that isn't
particularly good and is dated!

The SCP1000 has issues. The calibration coefficients in eeprom are easily corrupted. It is not hobbyist friendly for soldering either unless you have a specialized reflow oven. 9samples/second is pretty low.

The Bosch BMP085 (Digikey, approx $8) is more practical - the eeprom does not get corrupted, easier to solder, the sample rate is much higher, and it has decent resolution.

The Intersema MS55xx series is the most noise-free, and has OK sampling rate, and is quite robust. However, the resolution is not as good as the other too and its expensive.

I would say the BMP0805 is a good candidate for the new design. In case you have some info on the new design I could take a quick look at it for some eventual input from my side. I have been very busy at work lately so I haven't been able to keep track of the activity at the list.

UFO_MAN

Adam Barrow

unread,
Apr 10, 2010, 12:46:17 AM4/10/10
to uavde...@googlegroups.com
Guys,
in case some missed it (like me), Doug (I think who is also on this list) just posted this on the DIYDrones blog: http://www.diydrones.com/profiles/blogs/altitude-sensing-ublox-versus?id=705844%3ABlogPost%3A153803&page=1#comments. It's a comparison of the UBlox 5 vs SCP1000 in regards to altitude sensing, and some interesting comments have already been posted. Thank you Doug, for sharing.

Regards,
Adam Barrow

JERRY CHAPMAN

unread,
Apr 10, 2010, 1:03:04 AM4/10/10
to uavde...@googlegroups.com
Great, there down for maintenance.  I'll have to wait to read it.

 
> Subject: Re: CMUcam3 & Altitude Sensor
> From: adam....@gmail.com
> Date: Fri, 9 Apr 2010 23:46:17 -0500
> To: uavde...@googlegroups.com

Peter Hollands

unread,
Apr 10, 2010, 5:04:18 AM4/10/10
to uavde...@googlegroups.com
Yes .... that is worth a read if you are considering using Barometric Pressure for Altitude.
DiyDrones is still down ( 3hours later ).

Interesting graphs of ublox performance against the SCP1000 in the post. (from two independent sources)
Quite a lot of noise in the graphs from Doug for the SCP1000.

Doug believes the pressure sensor can change height measurement by up to 20m when exposed to sunlight.

There is some concern that the onboard EEPROM can lose it's values.

The part has been discontinued.

The Bosch part is being recommended instead. .

Pete

tshado

unread,
Apr 10, 2010, 6:13:57 AM4/10/10
to uavdevboard
Effectively , i went to VTI website to find some informations

1) This SCP1000-D01 is marked as "obsolete*

2) There are 2 versions of this ASIC :
Version B , the oldest
Version C which is fixing some issues(The version can be read in
Register REVID 0x00)
Interesting point : in Rev C, they did changes in the logic about
the low noise configuration during Start-UP sequence.
As a result low noise configuration during startup sequence can be
removed from the code.

3)they also provide a "code example" pdf , which shows thet they check
for the EEPROM "checksum error" after the startup sequence
"Read DATARD8 register and check that LSB (bit0) is one, if not EEPROM
checksum error is detected --> SCP1000 will not give reliable pressure
data"

Here is the link url to all the documents (faq, source code, SCP1000
series diff )
http://www.vti.fi/en/support/obsolete_products/pressure_sensors/
then select "SCP1000 series"

Jean-Claude


On 10 avr, 11:04, Peter Hollands <peter.holla...@gmail.com> wrote:
> Yes .... that is worth a read if you are considering using Barometric
> Pressure for Altitude.
> DiyDrones is still down ( 3hours later ).
>
> Interesting graphs of ublox performance against the SCP1000 in the post.
> (from two independent sources)
> Quite a lot of noise in the graphs from Doug for the SCP1000.
>
> Doug believes the pressure sensor can change height measurement by up to 20m
> when exposed to sunlight.
>
> There is some concern that the onboard EEPROM can lose it's values.
>
> The part has been discontinued.
>
> The Bosch part is being

> recommended<http://www.sparkfun.com/commerce/product_info.php?products_id=9694>instead.
> .
>
> Pete


>
> On Sat, Apr 10, 2010 at 6:03 AM, JERRY CHAPMAN <raptor9...@msn.com> wrote:
> >  Great, there down for maintenance.  I'll have to wait to read it.
>
> > > Subject: Re: CMUcam3 & Altitude Sensor

> > > From: adam.bar...@gmail.com


> > > Date: Fri, 9 Apr 2010 23:46:17 -0500
> > > To: uavde...@googlegroups.com
>
> > > Guys,
> > > in case some missed it (like me), Doug (I think who is also on this list)
> > just posted this on the DIYDrones blog:

> >http://www.diydrones.com/profiles/blogs/altitude-sensing-ublox-versus....

> > ------------------------------


> > Hotmail is redefining busy with tools for the New Busy. Get more from your

> > inbox. See how.<http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTA...>

tshado

unread,
Apr 10, 2010, 6:44:17 AM4/10/10
to uavdevboard
I also found that a specific "seal gasket" is highly recommended by
the Manufacturer to improve measurement reliability when exposure to
humidity and sun !!
http://www.vti.fi/midcom-serveattachmentguid-63da650c40290b49e107c28aabcd003b/tn57_mounting_and_sealing_of_the_scp1000_pressure_sensor_rev._0.04.pdf

Jean-Claude

On 10 avr, 12:13, tshado <kanume...@gmail.com> wrote:
> Effectively , i went to VTI website to find some informations
>
> 1) This SCP1000-D01 is marked as "obsolete*
>
> 2) There are 2 versions of this ASIC :
> Version B , the oldest
> Version C which is fixing some issues(The version can be read in
> Register REVID 0x00)
> Interesting point : in Rev C, they did changes  in the logic about
> the low noise configuration during Start-UP sequence.
> As a result low noise configuration during startup sequence can be
> removed from the code.
>
> 3)they also provide a "code example" pdf , which shows thet they check
> for the EEPROM "checksum error" after the startup sequence
> "Read DATARD8 register and check that LSB (bit0) is one, if not EEPROM
> checksum error is detected --> SCP1000 will not give reliable pressure
> data"
>
> Here is the link url to all the documents (faq, source code, SCP1000

> series diff )http://www.vti.fi/en/support/obsolete_products/pressure_sensors/

Reply all
Reply to author
Forward
0 new messages