PDA

View Full Version : Help! Paparazzi autopilot - Hardware setup


beep684
Aug 19, 2008, 07:21 AM
Hi,

I have been following paparazzi for a while, and have decided to finally go ahead with it and jump in myself.

I have been playing with the software, and so far have installed linux on my laptop, installed paparazzi centre, and begun to configure an airframe.

I ordered the necessary hardware and it arrived a few days ago:
- Tiny v2.11 with LEA-5H GPS
- IR sensors
- USB Program adapter
- Serial adapter cable
- SCP1000 Pressure sensor
- RF Modems for aircraft and ground station: Digi 9XTend 900MHz

Now I have three things left to do regarding setting up the hardware:
- Modify an RC receiver and connect it to the autopilot
- Connect the airborne RF modem to the autopilot
- Connect the pressure sensor

One of the cables that came with the autopilot was a serial adapter cable. The description for this is: "use for comm link in GCS or program GPS". Can I use this cable to connect the RF modem to the autopilot? The connector plugs into the correct slot on the 'Tiny' however it only has three wires - Ground, Tx, Rx (See pic). I was planning on using the 5V supply from the 'Tiny' to power the RF modem. I don't have any extra molex connectors, so it will save a lot of time if it is possible to do this without making another connector which has a fourth wire for +5V. Also, on the wiki it says that for this modem, the pin labelled 'shutdown' should be permanently connected to the +5V bus. Can you tell me what you think I should do?

The second thing was to modify an RC receiver to connect it to the autopilot. According to the wiki I have to: "Tap into the PWM signal running between the RF section and the servo driver of your receiver and route it to the Paparazzi. Let the Paparazzi generate individual servo signals and connect all servos directly to the autopilot. This method requires only 3 wires to the receiver (power and PWM), is compatible with all Paparazzi autopilots, and provides 8 manual R/C channels and the potential for more autonomous channels regardless of the capability of the R/C receiver." http://paparazzi.enac.fr/wiki/index.php/Other_Hardware#R.2FC_Receiver
There are instructions up there showing how to do it for a few receivers, however I do not have any of those types.
I was hoping to use a JR RS770. It is a 7-Channel SPCM FM 36MHz synthesised receiver. I am unsure of whether the receiver used must be PPM, but hopefully it is possible with this receiver.
I have attached some close-up photos showing the top and bottom of the circuit board inside the receiver, so if any of you can tell me where I need to attach the wire for tapping the PWM signal it would be extremely helpful.

The last thing I need help with is to do with the pressure sensor. It is a "Breakout Board for MEMs Barometric Pressure Sensor - SCP1000" from SparkFun. I got it off the same site I bought the autopilot from. Can someone please explain to me how I can connect this to the 'Tiny'?

Thanks very much,
Ben

GoRound360
Aug 20, 2008, 04:01 AM
Hi Ben,

as I got my hardware two weeks ago, perhaps can give you some hints.

-Serial Cable: I used this one for the modem (used XBee Pro.) Added one cable for power (ordered two sets so had one wire left). Be sure Power is sufficient for your modem (should work on 5V, but check).

-Receiver: Normally PCM-receivers are not supported since the do not deliver the needed PPM chain signal. Possibly you can modify it in a way to give you the chain signal anyway. I modified a PPM-Version of your receiver an it works (called R16 scan here). Helpfull: link:http://www.mikrokopter.de/ucwiki/RC-Empf%C3%A4nger
only in german, sorry.
You would have to use your transmitter in PPM-mode, of course.
Other solution would be a servo signal to PPM-converter. Some people are working on that, but not yet finished.

-Pressure sensor: This one has an spi-interface, I think, so should be connected to the corresponding pins on the tiny (you need more piccoblades for that...). For the start I would suggest, you leave the pressure sensor unconnected. As far as I looked at the code, it is not yet implemented in the standard navigation procedure. There are scp1000 files, but they have to be implemented manually (correct me, if I´m wrong).

On your first picture, there is a cable connected in the wrong direction: IRH. Pay attention to the cable, it is not symmetrically! (And check all others, I spent 5 hours before recognizing :( )
http://paparazzi.enac.fr/wiki/index.php/Tiny_v2

Hope you get it running soon!
But remember it is a mostly research project, you will have to do many things in trial and error. The documantation is not that big.
But if you have mastered that, you get a powerful system!
And after a while you realize the thousands of hours the team has invested...
(I did my third flight on saturday, 20 minutes fully automatic flight!!)

Regards

Marc

beep684
Aug 20, 2008, 04:39 AM
Hi Ben,

as I got my hardware two weeks ago, perhaps can give you some hints.

-Serial Cable: I used this one for the modem (used XBee Pro.) Added one cable for power (ordered two sets so had one wire left). Be sure Power is sufficient for your modem (should work on 5V, but check).

-Receiver: Normally PCM-receivers are not supported since the do not deliver the needed PPM chain signal. Possibly you can modify it in a way to give you the chain signal anyway. I modified a PPM-Version of your receiver an it works (called R16 scan here). Helpfull: link:http://www.mikrokopter.de/ucwiki/RC-Empf%C3%A4nger
only in german, sorry.
You would have to use your transmitter in PPM-mode, of course.
Other solution would be a servo signal to PPM-converter. Some people are working on that, but not yet finished.

-Pressure sensor: This one has an spi-interface, I think, so should be connected to the corresponding pins on the tiny (you need more piccoblades for that...). For the start I would suggest, you leave the pressure sensor unconnected. As far as I looked at the code, it is not yet implemented in the standard navigation procedure. There are scp1000 files, but they have to be implemented manually (correct me, if I´m wrong).

On your first picture, there is a cable connected in the wrong direction: IRH. Pay attention to the cable, it is not symmetrically! (And check all others, I spent 5 hours before recognizing :( )
http://paparazzi.enac.fr/wiki/index.php/Tiny_v2

Hope you get it running soon!
But remember it is a mostly research project, you will have to do many things in trial and error. The documantation is not that big.
But if you have mastered that, you get a powerful system!
And after a while you realize the thousands of hours the team has invested...
(I did my third flight on saturday, 20 minutes fully automatic flight!!)

Regards

Marc

Wow nice spot finding the reversed connector, thanks.

I didn't realise that a ppm receiver was the simplest way to go. I have a JR R700 PPM FM 36MHZ 7-Channel Receiver that I can use. I have attached a few pics of it. If you could tell me where to tap the signal that would be very helpful.
It is possible for me to access a scope. If so, how complicated is it to locate the right pin using this method?

The only reason I changed to using SPCM was because my old R700 (PPM) was glitching quite a lot, however I have a new one which I haven't flown with before, so it will probably be okay. Otherwise I could try changing frequencies.

Thanks a lot,
Ben

GoRound360
Aug 20, 2008, 07:58 AM
Hi Ben,

The Solution can be found on the link I attached before.

For the R700:
http://www.mikrokopter.de/ucwiki/R700
Translation of "Widerstand entfernen" is "remove resistor"

For your PCM-Receiver this could work:
http://www.mikrokopter.de/ucwiki/R16
From the inside the receivers look similar (even if one is pcm, perhaps just another program in the microcontroller). The signal to be seen on the scope is on that page too. I rebuilt a R16 scan in this way and it works.

Wish you luck!

Marc

harima
Jan 07, 2009, 04:47 PM
The last thing I need help with is to do with the pressure sensor. It is a "Breakout Board for MEMs Barometric Pressure Sensor - SCP1000" from SparkFun. I got it off the same site I bought the autopilot from. Can someone please explain to me how I can connect this to the 'Tiny'?

Thanks very much,
Ben


Hello,

excuse my english, I'm a french student.... :o

I have the same problem that you,
have you solve how to connect the SPC1000 on the Tiny Board..?

thank you for your reply

bmw330i
Jan 07, 2009, 06:45 PM
Hello,

My next task on my own project will be to start connecting sensors...including the scp1000 board from sparkfun.

Since I'm learning as well I can only help you to search with me for the code to implement it and get it wired. The wiring will be the easiest. There is an SPI interface on the tiny so just use this pinout from the Wiki (Tiny2.11/TWOG):

For sample code and info on the board itself SparkFun is awesome at providing that info:
http://www.sparkfun.com/commerce/product_info.php?products_id=8161

For using it with your airframe file...well...it's a work in progress. It seems the "booz" project is using it ... I mean starting to test/use it from the code...
Here's a hint: If you want to check for a certain string...say "scp1000" in many files use "egrep" (a UNIX/Linux utility that searches). The command would be:
egrep -R -i "scp1000" ~/paparazzi3/*
In English the above says do a "Recursive" case "insensitive" search starting in my home directory in the subdirectory named paparazz3 for "scp1000" ... drill into all directories looking inside all files (including binary files). Show all the results to the screen.

Some of the output:

conf/autopilot/conf_booz.makefile:flt.srcs += scp1000.c $(SRC_ARCH)/scp1000_hw.c
conf/autopilot/conf_booz.makefile:sim.srcs += scp1000.c $(SRC_ARCH)/scp1000_hw.c
conf/autopilot/conf_booz.makefile:test_gyros.srcs += scp1000.c $(SRC_ARCH)/scp1000_hw.c
conf/autopilot/conf_booz.makefile:test_scp.srcs += scp1000.c $(SRC_ARCH)/scp1000_hw.c
conf/autopilot/conf_booz.makefile:test_imu.srcs += scp1000.c $(SRC_ARCH)/scp1000_hw.c
conf/autopilot/conf_booz.makefile:test_sd.srcs += scp1000.c $(SRC_ARCH)/scp1000_hw.c
conf/autopilot/conf_booz.makefile:test_vf.srcs += scp1000.c $(SRC_ARCH)/scp1000_hw.c
Binary file hw/lbr/paparazzi.lbr matches
Binary file hw/in_progress/tiny4l_18_1_99.brd matches
Binary file hw/in_progress/tiny4l_18_1_99.sch matches
sw/simulator/main_booz_sim.c: scp1000_hw_feed_value(bsm.baro);
sw/airborne/scp1000.c:#include "scp1000.h"
sw/airborne/scp1000.c:volatile uint32_t scp1000_pressure;
sw/airborne/scp1000.c:volatile uint8_t scp1000_status;
sw/airborne/scp1000.c:void scp1000_init(void) {
.
.
.

Now in good Paparazzi Project fashion start digging...look at the files and see what's going on.

HINT: If someone is using one of those boards they must have a "conf/airframes/<aircraft>.xml file that has references to it...I see that:
funjetgfi4.xml:ap.srcs += baro_scp.c
funjetgfi4.xml:ap.CFLAGS += -DUSE_BARO_SCP
Now check the baro_scp.c code...
find ./ -name baro_scp.c -print
./sw/airborne/baro_scp.c
I use the "cat" command that just dumps the contents of the file to the screen output:
cat sw/airborne/baro_scp.c
...I'll stop there but you see people are using it it seems with the funjet aircraft. It also seems the "booz" is also using it but not publishing their airframe file with that code...because no conf/airframes/booz.xml file exists with the reference to the scp code...

Anyhow...again in Paparazzi fashion it's time to:
1. create a 7-pin molex to bare wire cable per the Wiki pinout
2. solder the proper wires to the proper connectors on the sparkfun scp1000 board
3. connect the scp1000 board to the SPI connector (using the cable just made)
4. using the code from the funjet airframe file add that to your airframe file
5. clean, build and upload it...see what happens.

Likely when you power the tiny and get GCS going use the "messages" tool and see if you see the SCP messages...

I haven't done any of this yet so I'm simply saying this is what I will try...maybe you can try with me?

-BMW

harima
Jan 08, 2009, 05:11 PM
Anyhow...again in Paparazzi fashion it's time to:
1. create a 7-pin molex to bare wire cable per the Wiki pinout
2. solder the proper wires to the proper connectors on the sparkfun scp1000 board
3. connect the scp1000 board to the SPI connector (using the cable just made)

-BMW

ok thank you very much for your help...!

In first I was looking to connect to the I2C bus, but I think it's too difficult.
Also I was "unclear" because I see :
on the autopilot, the sequence MOSI MISO DRDY SCK
on the sensor , the sequence DRDY CSB MISO MOSI SCK
But of course, only that need to be careful for solder ..

...and I dont find on line this molex 7 pins :mad: !!!

so, I suppose it's the same thing to connect the modem Xbee on the serial port : just I need a molex 8 pins is'nt it ?

hum, and for the code I begin to study the question (in fact it's to do do a "cansat" !!)!!!!


thank you to inform me of your progress ...