PDA

View Full Version : AHRS / Navigation / Controller System


tve
Jun 26, 2005, 12:14 PM
Hi all,

I have been working for a while now on a 4-rotor helicopter type of platform. The goal is to make it autonomous. I am getting ready to order some circuit boards soon. I have the design posted here under the files section.

http://hanfordsite.com/

Direct link to design files (eagle files, gerber and drill files, excel bill of materials)
http://hanfordsite.com/files/ahrs_rev3.zip

I will share the firmware in the files section as it is developed.

Any comments or problems with the design that you notice would be appreciated.

Regards,
tve

moreil
Jun 27, 2005, 01:14 AM
Hi all,
I have been working for a while now on a 4-rotor helicopter type of platform. The goal is to make it autonomous. I am getting ready to order some circuit boards soon.

Nice work. :) I've been doing something similar for a plane.

Some general comments:

I used discrete components to do the magnetic compass thing. I used GMR sensors from NVE (AA002-02). These have the advantage of much smaller size.

Given the accuracy I could get from those, I skipped on the gyros. Given that your platform isn't stable in the way I plane is, you might not be able to skip the gyros.

I used a very similar pressure sensor, except that I added a differential one as well to sense airspeed.

I note that you've used many seperate 3 pin connectors for the connection to the radio control receiver? (I presume that's way the connectors are for?)
I found is easier to put in a 3x8 0.1" pin header which makes for a much higher density connection. But you may not be worried about board area?? Either way, if you did that you'd probably be able to move them closer to the MCU and avoid running traces clear the width of the board.

You might also want to look at the tri-axis accelerometer that freescale recently released. A nice compact SMD part.

Lastly, it's clear that the autorouter has not been your friend. :) It might be worth your while cleaning up some of the routing. In particular, the connections from the upper right really should be routed as a single bus. The key is to manually fill in the wide buses and get them right, and then let the autorouter do the rest.

Have fun! :)

tve
Jun 27, 2005, 09:12 AM
moreil,

Thanks for the comments. I will check out the freescale part.

As for the last comment, Did you click on ratsnest? Eagle will not draw the polygon power planes until you do... It will look like a bad layout. I know what you are saying about the excess vias around the 18f6722. It is really hard to layout a 2 layer board with a high density part like that. I guess a 4 or 6 layer board would help..

Thanks again,
tve

tve
Jun 27, 2005, 09:17 AM
Here is an image of the layout...

moreil
Jun 28, 2005, 12:14 AM
moreil,
As for the last comment, Did you click on ratsnest? Eagle will not draw the polygon power planes until you do...


Yes, I know about ratsnest. :) The via count looks very high because the eagle autorouter isn't very good with complex boards. It routes the signals individually. You might consider adding some more optimization stages? (I normally use 8 on the more complex boards).

See http://www.dgmo.org/~michael/images/fp-13-brd.png for a board that I spent some time manually routing. It's a simpler board (only a single MCU) but you can see that the traces generally run straight without bouncing back and forth between different sides of the board.

Most of the hard work is sorting out where to put the components in the first place. That makes the autorouters work much easier. :)

tve
Jun 29, 2005, 08:33 AM
Yes, I know about ratsnest. :) The via count looks very high because the eagle autorouter isn't very good with complex boards. It routes the signals individually. You might consider adding some more optimization stages? (I normally use 8 on the more complex boards).

See http://www.dgmo.org/~michael/images/fp-13-brd.png for a board that I spent some time manually routing. It's a simpler board (only a single MCU) but you can see that the traces generally run straight without bouncing back and forth between different sides of the board.

Most of the hard work is sorting out where to put the components in the first place. That makes the autorouters work much easier. :)

Ok, now I see what you mean by buses. I think of a bus as a data bus or address bus or something similar. I find that eagle does a pretty good job at routing memory and other bus type of devices. It has many options for how the auto-router does its job. It looks like on your example, you have a collection of port pins being routed out to a pin header. This works fine for a simple board where most of the circuitry will be connected via the headers. The problem I see with your technique for a more complex board is the long diagonal traces. This makes it very difficult to route a complex board. In general you want to have traces run vertical on one side and horizontal on the other. I do appreciate you taking time to share your comments and ideas.

Regards,
tve

VOVAMB
Jul 02, 2005, 06:17 PM
Hi all,

I have been working for a while now on a 4-rotor helicopter type of platform. The goal is to make it autonomous. I am getting ready to order some circuit boards soon. I have the design posted here under the files section.

http://hanfordsite.com/

Direct link to design files (eagle files, gerber and drill files, excel bill of materials)
http://hanfordsite.com/files/ahrs_rev3.zip

I will share the firmware in the files section as it is developed.

Any comments or problems with the design that you notice would be appreciated.

Regards,
tve
Hi tve !

Good work !!!

Have you PCB of NEW version speed controller for sale ?

I need 5 pc.

Thanks.

tve
Jul 03, 2005, 02:44 PM
Have you PCB of NEW version speed controller for sale ?

I need 5 pc.

Thanks.

Hi VOVAMB,

Thanks for the comments. I will be receiving the first boards for this design in a few days. Let me build it and test it first. I will post my results. If it works ok, I will figure out a plan to make boards available for those who are interested.

(for both the ahrs system and the motor controller)

Thanks,
tve

tve
Jul 07, 2005, 09:42 AM
The new boards for the AHRS system arrived. They look good! I built the power supply sections and they work perfect. I'm populating the rest of the board. Should be able to finish it this evening. Glad I bought a flux pen.... soldering that 64 pin TQFP package would be difficult without it!

More later....

VOVAMB
Jul 07, 2005, 04:09 PM
The new boards for the AHRS system arrived. They look good! I built the power supply sections and they work perfect. I'm populating the rest of the board. Should be able to finish it this evening. Glad I bought a flux pen.... soldering that 64 pin TQFP package would be difficult without it!

More later....

Hi!

Good news... i wait final test ...

From my practic best for soldering TQFP :

ERSA

0832AD

http://www.ersa.de/en/produkte/loetwerkzeuge/list-spitzen.php?article=832&title=Soldering%20and%20Desoldering%20Tips%20832%2 0Series

New info from Microchip :

Using the PIC18F2431 for Sensorless BLDC Motor Control AN970

http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1824&appnote=en022169

Sensored BLDC Motor Control Using dsPIC30F2010 AN957

http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1824&appnote=en021551


dsPIC30F3010 - best for Sensorless BLDC Motor Control

Thanks.

tve
Jul 07, 2005, 10:52 PM
Hi VOVAMB,

Thanks for the links. I will check them out.

I have the board built. So far it looks good. It draws about the right amount of current.... So probably no shorts.... I'll post more when I get some firmware going...

You can check out some images of it
main page http://www.hanfordsite.com/

direct link to new images http://www.hanfordsite.com/images/2005-07-07/ahrs.htm

Regards,
tve

tve
Jul 09, 2005, 09:16 PM
I have been trying to patch picp (linux) to program the 18f6722 device today. It seemed like I was getting close. Some things work. After checking on the Microchip forums, the PicstartPlus programmer does not support this device. They have no plans to support it in the future. Looks like I bought the wrong programmer.

Right now I guess I'm going to have to start working on my own programmer.


The pcbs for the motor controller arrived yesterday. Maybe I will work on that this weekend instead.

tve

tve
Jul 10, 2005, 06:37 PM
I've been working on switching to Atmel today...

Could those of you that are familiar with AtMega128 please take a look at my schematic and see if I messed anything up? Particularly on page 2.

http://hanfordsite.com/files/400-000-001-05.pdf

I would appreciate any feedback!

Thanks,
tve

[edit] updated schematic.

tve
Jul 13, 2005, 11:45 PM
Don't know if anybody really cares, but I have the new design based on the Atmel ATMega128 layed out. The eagle design and gerber files are here
http://hanfordsite.com/files/ahrs_tve0713.zip

It is now a 4 layer board. The Atmel part will be much easier for most people to solder than the microchip pic18F6722.

An ISP programmer is available from digikey for $29.00. It beats the Picstart+ by an order of magnitude.

Let me know if you have any comments.

Thanks,
tve

P.S. VOVAMB, I should be getting started on the brushless controllers soon....

VOVAMB
Jul 14, 2005, 10:49 AM
Don't know if anybody really cares, but I have the new design based on the Atmel ATMega128 layed out. The eagle design and gerber files are here
http://hanfordsite.com/files/ahrs_tve0713.zip

It is now a 4 layer board. The Atmel part will be much easier for most people to solder than the microchip pic18F6722.

An ISP programmer is available from digikey for $29.00. It beats the Picstart+ by an order of magnitude.

Let me know if you have any comments.

Thanks,
tve

P.S. VOVAMB, I should be getting started on the brushless controllers soon....


Hi !

Atmel Mega128 - good chip

I have Flash file system (FAT compatible) and RTOS (uCosII) for this MC.

Last IAR C availible too ...

If you need any ... jast mail my ...

Programmer for AVR - very simple device on atmel 90s2313 mc - connect on com port.

I have all info for make this programmer (and work pcb - i use this).


Sensored BLDC Motor Control Using dsPIC30F2010 AN957

good source for make BLDC Motor Controller ( good use dsPIC30F4012 - $8 USD) ...

I have HI-TECH dsPICC V9.5 compiler ...

Programmer for dsPIC is not problem - simple board on 1 pic mc (for com port).

If you need i can send all info ...

I think good idea use dsPIC30F6012 - $16usd for computer nav board

16bit DSP and MC command set - good for RTOS (VERY FAST CPU)

SRAM Bytes 8192
Program (FLASH) KBytes 144
EE Bytes 4096
I/O Ports 52
UART 2
SPI 2
CAN 2
Contains 1 codec interface peripheral
ADC 12-Bit 100 KSPS 16
CPU Speed 30MHz
Vdd Range +2.5 to +5.5
Pin Count 64 (tqfp)


Thanks.

VOVAMB
Jul 16, 2005, 09:15 AM
Hi!

Good programming tool for AVR

Algoritm Builder

The Graphics Integrated Development Environment
for AVR microcontrollers
(Graphic assembler)


http://home.tula.net/algrom/english.html (http://)

Visual algoritm project technology - good for optimized and error free programming .

Algoritm Builder - limited free tool for start work.

Thank all.

tve
Jul 17, 2005, 11:01 AM
HI All,

I changed everything again. I think these are significant good changes though...

I found some new gryo / accelerometer sensor combos that aren't too expensive and have the same advantages over standard piezo type sensors. 2g full scale accelerometer and 300 deg/sec gyro fed into a 16 bit a/d. Selectable low-pass and high pass filters for the accelerometers, temperature reference on the sensors, voltage reference on the sensors, board size is now 4.3 x 5.7.

attaching the eagle files...

Regards,
tve

You can find the new sensors here
http://www.sparkfun.com
click on accelerometers and look at the IMU Combo V2

VOVAMB
Jul 25, 2005, 05:25 PM
Hi !

Development boards and Tools

http://www.olimex.com/dev/

Real price !!!

Thanks.

tve
Aug 10, 2005, 07:55 AM
Hi !

Development boards and Tools

http://www.olimex.com/dev/

Real price !!!

Thanks.

Hi VOVAMB,

I ordered a couple of OLIMEX boards from sparkfun.com. Good stuff.

Well, I some more changes to the board here http://hanfordsite.com/files/ahrs0809.zip

I tried to improve the layout with others suggestions.

I actually ordered these. Should be here mid next week.

One of the changes is an added SD flash memory socket. This will allow for up to 1GB of storage for flight recorder, gps maps, topo maps or whatever....

More later...

tve
Aug 28, 2005, 07:56 PM
Have been making a lot of progress. I will post the revisions to the board soon. In the mean time here is a demonstration of the angle calculation that will feed the proportional term of the PID loop.

http://hanfordsite.com/files/gyro_angle.asf

tve
Sep 03, 2005, 12:58 PM
8.5Mb

The lighting is much better than the previous one. This one uses raytraced imagery. Let me know what you think :)

http://hanfordsite.com/files/gyro_raytrace.asf

note: The frame resolution on the video is 4 degrees. This is due to the memory requirements... The ahrs system actually has much higher resolution.

william541
Sep 04, 2005, 01:52 PM
I've been working on switching to Atmel today...

Could those of you that are familiar with AtMega128 please take a look at my schematic and see if I messed anything up? Particularly on page 2.

http://hanfordsite.com/files/400-000-001-05.pdf

I would appreciate any feedback!

Thanks,
tve

[edit] updated schematic.

I think you may have some issues with your SPI and port E UART tied together like that. Your MISO and MOSI signals are bidirectional. In program mode, the uP is slave, but during run time the uP would need to be master to talk to your SPI devices. IC16C will not allow MOSI to be driven by the uP. Maybe you have already changed this on one of your revisions. I don't use Eagle for capture and layout, so I can only read the pdf version.

Just a thought, keep up the good work. -Bill-

One last edit, on sheet 4, you have a ferrite bead on the A-D supply with no filter capacitance on the A-D side of the bead. Also the rest of the analog circuits (Op-amp, muxes etc.) do not have a filtered supply different from your main VCC, you may have problems with digital switching noise. Since it looks like you are using a common ground for both analog and digital, your layout will be critical to keep the ground currents separated.

Just my 2 cents... Good luck on your project!

tve
Sep 04, 2005, 11:28 PM
Just my 2 cents... Good luck on your project!

Hi Bill,

Thanks for taking the time to give me some input. I really appreciate it. I have built a prototype and it seems to be working pretty well, but I did make a few mistakes. The biggest one being that I overlooked the max sample rate for the 16 bit converter. Only 128sps... ouch. Luckily, I was able to use the 10 bit converter on the uP with good luck so far. I will need a 16 bit for the pressure sensor on the next design. Once I know everything I want to change, I will be making another one. I will use your input when I get to that point again.

For those who are interested here is my last 'simulation' videos for a while. Next video should be an actual flight.


Some stats:
sensor sample rate is ~1 khz
model update rate ~150Hz
Filtering: none (removed filters from gyros)
raytrace is 2-axis with 1 degree resolution (3600+ images)

http://hanfordsite.com/videos/hires_raytrace.avi Video of hires raytrace movement (about 18megs)
http://hanfordsite.com/videos/hires_inputdata.avi Video showing actual physical input to create above video
http://hanfordsite.com/videos/hires_data.txt raw data from sensors ~150Hz rate. (only the first 2 columns were used to create the video. they are corrected angle)

http://hanfordsite.com/files/hires_dataplot.png Plot of the hires_data.txt...
Zoom in on this image and scroll through it. The two smooth lines are the "corrected" integrated gyro outputs. The two noisy lines are the accelerometers.
This should give you a pretty quick overview of what I'm doing.


Note that the hires_raytrace video is encoded at 30 fps, but it would have to be played at 150 fps to see it real-time.

More later...

william541
Sep 05, 2005, 01:39 AM
That is excellent that you are making headway. Hit a bump, fix it and move on, that's what prototyping is all about.

In reference to your pressure sensor, LukeZ and I were discussing ways to use a lower resolution A-D with a pressure sensor for altitude. Maybe you could give it a try and let us know if it works well enough.

http://www.rcgroups.com/forums/showthread.php?t=372869&page=2

Also if you are running out of A-D ports, have a look at the ATMega2560/2561, more code space too and up to 4 UARTS. These UARTs can also be set to be master SPI ports too if one is not enough.

Best of luck, we all enjoy seeing your progress! -Bill-

tve
Oct 21, 2005, 07:58 PM
I posted a new video with description on the front page of http://hanfordsite.com/
called boomerang using the design I posted. Let me know what you think!

tve

dj2u
Oct 21, 2005, 09:35 PM
Hi TVE

where did you get the pusher props for your vtol?

diego

tve
Oct 22, 2005, 02:34 AM
Hi TVE

where did you get the pusher props for your vtol?

diego

Hi diego,
Here :
http://www.toddsmodels.com/Props/propsother.htm
EPP1045

dj2u
Oct 22, 2005, 07:41 PM
Hi diego,
Here :
http://www.toddsmodels.com/Props/propsother.htm
EPP1045

Hi tve
thanks very much this is exactly what I've been looking for.
I hope I can pay the shipping fee ;)
We want to build something similar to what you did (the uav not the electronics) for the CrazyCar Race (http://crazycar.fhbb.ch) it's a race round the corridor of our university (so we don't have gps :eek: )