PDA

View Full Version : Help! First embedded control project


skyflyer
Feb 05, 2008, 03:30 AM
The goal is to learn enough to eventually make an aircraft be able to hold barometric altitude (likely by trimming the aircraft to a fixed C_L and controlling throttle only). The idea is for it to be an RC pilot assist, allowing switching in/out of "altitude hold" mode. It would be nice to eventually expand the project by adding sensors, starting with differential pressure (airspeed), then perhaps a yaw gyro (approximate turn rate).

I've never programmed in either assembly or C, and I don't have any experience with electronic design, but that's why I'm doing the project - to learn.

The plan is to get a development board and an absolute pressure sensor. I'm looking for some feedback on what hardware I have in mind:

PIC Dev board from CCS:
http://www.ccsinfo.com/product_info.php?cPath=Store_Development-Kits-with-Software&products_id=18F6722kit
or
http://www.ccsinfo.com/product_info.php?cPath=Store_Development-Kits&products_id=18F452kit
I don't really know the difference between these two micros, besides number of I/Os, and I don't know why it is desirable to have RS232 when I have an ICD.

I'll probably also need this programmer/debugger:
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en010046

I can get MPLAB C18 student version for free
A friend who is willing to help me out has a lot of experience with the ICD2 and this development environment.

One of these baro pressure sensors:
http://www.allsensors.com/datasheets/app_specific/baro_amp_mini.pdf
they're about $90 each, but probably worth it, since they're pre-amplified and I won't have to deal with op-amps or getting a digital sensor to talk to my micro.

I'm trying to keep it simple for my first project, and I'm willing to spend a little extra cash to make my life easier. I appreciate any feedback you can give me.

Thanks,
Sky

zik
Feb 05, 2008, 04:06 PM
Hi skyflyer,

I have some experience with PICs (actually I'm a contributer to SDCC, the open source PIC C compiler and work with PICs professionally). Either of those PICs would be fine for what you're doing - although you should keep in mind that PICs are very very small processors with only a couple of hundred bytes of RAM. You have to keep your programs very small and simple. Having said that I've made simple autonomous robots with PICs and they're great fun. I think they'll work well in your application.

If you're planning to do some simple electronics you may want to consider a development board which has some prototyping area. Here's an example:

http://www.olimex.com/dev/pic-p28.html

As far as programmers go I'd recommend the PICkit2 over the ICD2. They're simpler to use and have most of the same features, as well as being a lot cheaper. I personally prefer the PICkit2 as do most of the people on the "piclist" mailing list.

http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en023805

You can get the PICkit2 as a "starter kit" with a prototyping board which may be perfect for you.

Another alternative for you to consider is the Atmel AVR series of microcontrollers. They're similar to PICs in many ways but some people say the AVRs are easier to program.

Good luck with your project!

skyflyer
Feb 05, 2008, 04:46 PM
Thanks for the advice. I was looking at getting a PICkit2 Debug Express kit anyway, just to do some extra learning (comes with some exercises and stuff). I didn't know that the PICkit would work in place of the ICD2. I'll try to order most of the hardware for my project tonight.