PDA

View Full Version : Discussion Paparazzi, the RTF Autopilot?


Pages : [1] 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22

bmw330i
Apr 19, 2008, 01:14 AM
Well, I'm starting a build log here. I'm building a small UAV based on Paparazzi Project autopilot.

My Background (i.e. suggested skills):
Reasonably intelligent
Some RC Experience
Some Programming Experience
Ability to read and follow directions

Goal:
To build an autonomous flying small model aircraft (Foam FunJet) capable of following set GPS coordinates for fun.

Obsticals to overcome:
1. There were no companies I could buy assembled Tiny Autopilots. I would have to have my own PCB fabricated and autopilot assembled from the plans off the Paparazzi Wiki site: http://paparazzi.enac.fr/
2. I needed to convert the BOM into part numbers I could order from a company like DigiKey or Mouser
3. Often a part is out of stock or no longer stocked I had to find equivalent parts without having any electronic experience. So you must learn to convert the "jargon" of a BOM into something you can order from an electronics supplier

Ok, so lets get to building...

bmw330i
Apr 19, 2008, 01:14 AM
DISCLAIMER: This build thread is intended only to detail my build experience with the Paparazzi autopilot. It is not intended for anything but helping others to do the same in a lawful way. You are responsible for your actions and knowing the laws where you live and following them.

Round 1) Build my own by hand:
Well, my first Tiny1.3 autopilot was hand soldered by an EE friend. I had now two Tiny1.3 autopilots. Now what? Time to read the wiki.

Things that must be done:
1. The LPC processor needs to be loaded with the code so that the autopilot can be programmed via USB.
2. A program called the "tunnel" must be loaded so via the serial connector you can directly communicate with the GPS module.
3. The GPS module must be programmed.
4. The LPC must be programmed so the autopilot can fly the aircraft. This is done with the tools provided. The paparazzi software.

REQUIRES:
- adapter to allow your Windows PC to connect to the Tiny as a TTY serial device. These exist on Sparkfun and elsewhere as boards or cables.
http://www.sparkfun.com/commerce/product_info.php?products_id=718
http://www.sparkfun.com/commerce/product_info.php?products_id=8772
This will be used to load the boot code, allow you to program the GPS and to allow you to connect directly to the autopilot with the paparazzi software without using RF modems for bench testing.
- PC with I suggest Windows XP installed. Download from the u-blox.com website their u-center installer and install it. Download the latest firmware for your GPS module (LEA-5H or LEA-4P) from the same site and install it in the same directory. Install the FTDI drivers for your cable/board (usually given from the same place you buy it as a link).
- An 8-pin molex cable to connect your cable/board to the Tiny autopilot. Make it per the wiring pinout given with your cable/board and the Paparazzi Wiki (see URL above). Remember Tx on one end goes to Rx on the other. Power must be 3.3v.
- A USB to 8-pin molex adapter to allow you to connect a USB cable to the "USB" port on the autopilot
- A 7-pin adapter to connect the FTDI to serial TTY adapter cable/board to the "download" connector.
- molex connectors to connect your ESC, Servos and Rx to the autopilot. Or desolder the molex connectors and simply solder a female adapter wire to the autopilot so you can connect them using their native connector. I chose to buy the 200.00 crimper and make my own molex connectors for everything.
- Laptop running a Debian Linux (I suggest Ubuntu 8.04). This will be the ground station.

For an overview of all you need and theory see this page on the Wiki. I would even suggest this is required before you buy anything or even start to understand these pages well.
http://paparazzi.enac.fr/wiki/index.php/Overview
and
http://paparazzi.enac.fr/wiki/index.php/FAQ
STEPS for Boot Code loading:
http://paparazzi.enac.fr/wiki/index.php/USB_Boot_Loader

STEPS for loading the "tunnel" program:
http://paparazzi.enac.fr/wiki/index.php/Tunnel

STEPS for GPS programming:
http://paparazzi.enac.fr/wiki/index.php/GPS_CONFIG
or
http://paparazzi.enac.fr/wiki/index.php/GPS#GPS_configuration_using_U-Center

At this point you are ready to configure and load the program for your aircraft into the autopilot....

bmw330i
Apr 19, 2008, 01:15 AM
There are many reasons things might not work as expected. I like most everyone checked things and then concluded it must be faulty hardware. Over time I can say it's usually not the hardware. Just experience has shown this autopilot to survive many of my own attempts to kill it (crossed wires usually). In the end I find it's simply wiring or a configuration on the computer not the autopilot that must be corrected. So, patience is key here. It will help you to assume the autopilot is just fine and you are simply not doing something right or the PC/Laptop is not configured or working properly.

USEFUL INFO:
1. The term "holding a pin low" means to ground it to a common ground. So in programming "holding pin P0.14 low" means connect it to a common ground. I use the ground on the adapter board/cable.

2. P0.14 must be held low from power up to the end of the boot program process. Until you see Sector1 and Sector2 programmed successfully in (6 or 7) seconds hold it low (for the boot code loading step).
3. The USB programming requires the processor (herby simply called LPC) to have a signal wire fed 3.3v (5v tolerant) at power on. At that time the LPC will load the USB boot code and wait for programming over the USB port on the LPC (accessed via the USB connector on the autopilot). Failure in any way to send this voltage to the LPC at power on will fail to send it into this USB programming mode.
4. Even if #3 above is satisfied your PC/Laptop must also now recognize and load the proper driver to now communicate with the autopilot over USB. So if the Tx and Rx pins on your cable are crossed the autopilot will still go into USB program mode but you will not be able to communicate with it.
5. Your program must be configured properly or the software on the autopilot won't work properly. There is no blue screen it just won't work. All you can need to know at this point to properly edit/configure is found here:
http://paparazzi.enac.fr/wiki/index.php/Airframe_Configuration
Trust me it's there. This is not RTF you have to read and understand this stuff.

MORE GTK THINGS:
Here is what you should see on the screen during a successful boot programming:
1. I open a terminal and type: tail -f /var/log/messages to watch system messages during this. Why? Because I need to know when the FTDI serial adapter cable is recognized and when the Tiny is in USB boot mode that the computer recognizes it as a USB device (i.e. ready for the USB programming).

So, first during boot loading. When I plug in the FTDI cable you should see this in the log (or 'dmesg' command output):
Apr 19 09:52:47 ppzuav-desktop kernel: [ 2001.949231] usb 3-2: new full speed USB device using uhci_hcd and address 6
Apr 19 09:52:47 ppzuav-desktop kernel: [ 2002.149803] usb 3-2: configuration #1 chosen from 1 choice
Apr 19 09:52:47 ppzuav-desktop kernel: [ 2002.152867] ftdi_sio 3-2:1.0: FTDI USB Serial Device converter detected
Apr 19 09:52:47 ppzuav-desktop kernel: [ 2002.152903] /build/buildd/linux-source-2.6.22-2.6.22/drivers/usb/serial/ftdi_sio.c: Detected FT232RL
Apr 19 09:52:47 ppzuav-desktop kernel: [ 2002.153167] usb 3-2: FTDI USB Serial Device converter now attached to ttyUSB0

That tells me it is seen as /dev/ttyUSB0 If it is not unplug your other USB devices and try again (i.e. unplug and re-plug in the FTDI cable) until it is seen as /dev/ttyUSB0. If it just won't you can edit the Makefile but PM me I will give you those details offline.

2. Plug in the adapter and then into the Tiny2.11 "download" connector. Ground should be the very outmost wire and the Yellow wire (Rx) from the FTDI cable eventually makes it to the 2nd most inward pin and the orange from the FTDI (Tx) makes it to the very inward pin (Rx on the download connector).

3. Now connect (via jumper wire the negative pole on the PCB input (yes where you plug in the power) and the other end to the 3rd inmost pin (next to the yellow wire from the FTDI on the Tx on the "download" connector. This is directly routed to pin 61 on the CPU inside the PCB. So, in effect you are setting that pin on the CPU to the ground shared by everything on the Tiny2.11.

4. Power on (i.e. I use a 100.00 from Fry's 1A limiting power supply with jumper to the + and - on the PCB at this stage). Your power supply if it has a meter showing power draw should show 0.04A, then after and after resetting the power on the TIny (without the jumper) it should read 0.06A for a Tiny2.11 with a GPS module and Antenna and only the USB boot code.

5. The command to send the USB boot code into the Tiny2.11:
ppzuav@ppzuav-desktop:~/paparazzi3$ make upload_bl PROC=GENERIC
6. The output:
cd sw/airborne/arm7/test/bootloader; make clean; make
rm -f usbstack.a usbhw_lpc.o usbcontrol.o usbstdreq.o usbinit.o usbdescrip.o
rm -f bl.hex bl.elf crt.o startup.o printf.o console.o bootloader.o *.lst bl.dmp bl.map
rm -f bl_ram.hex bl_ram.elf bl_ram.dmp bl_ram.map
.
.
<snip> <--yes I cut out a bunch of stuff that scrolls past
.
.
...copying
arm-elf-objcopy -O ihex bl_ram.elf bl_ram.hex
arm-elf-objdump -x --syms bl_ram.elf > bl_ram.dmp
lpc21isp -control sw/airborne/arm7/test/bootloader/bl.hex /dev/ttyUSB0 38400 12000
lpc21isp version 1.27
File sw/airborne/arm7/test/bootloader/bl.hex:
loaded...
converted to binary format...
image size : 7304
<snip again>
.
.
Read bootcode version: 2.12.0
Read part ID: LPC2148, 512 kiB ROM / 40 kiB SRAM (67305253)
Sector 0: .................................................. .............................................
Sector 1: .................................................. .........................
Download Finished... taking 6 seconds
Now launching the brand new code
ioctl get failed
ioctl set ok, status = 2
ioctl get failed
ioctl get failed
ioctl set ok, status = 186A0
ioctl get failed

Result is from above it did program then reset. This is why you see the "failed" at the end is the code is uploaded but the CPU resets so you see the ioctl getting those last messages as the CPU is not responding during this time (just a guess correct me if I am wrong someone).

Maybe it's me but the above seems to imply a momentary grounding. Anyhow, cool, bootloader loaded. Now if you read the programming page on the Wiki they tell you how you likely don't even need to do that. However, remember, no one (at that time, they do now) sells these assembled. So how many people reading that Wiki will have had someone else do that for them? Yep, sort of wish the would re-order that Wiki in the real order someone really programs these. The true order is this:
1. load the boot loader code
2. use the USB programming cable (custom made) to load the "Tunnel"
a. Plug in the USB cable w/adapter into the "usb" connector (with Tiny powered off). Now power on the Tiny 2.11.
b. the output of the system messages file should show (or dmesg command):
Apr 19 10:44:34 ppzuav-desktop kernel: [ 5101.453832] usb 3-2: new full speed USB device using uhci_hcd and address 7
Apr 19 10:44:34 ppzuav-desktop kernel: [ 5101.621497] usb 3-2: configuration #1 chosen from 1 choice
That above says my system (Linux) detected the Tiny2.11 as a new USB device
c. Now send this command to load the "tunnel":
make AIRCRAFT=PPZ1 tunnel.upload
d. The output:
cd sw/lib/ocaml; make PAPARAZZI_SRC=/home/ppzuav/paparazzi3 PAPARAZZI_HOME=/home/ppzuav/paparazzi3
make[1]: Nothing to be done for `all'.
cd sw/supervision; make
make[1]: Nothing to be done for `all'.
cd /home/ppzuav/paparazzi3/sw/tools; make
make[1]: Nothing to be done for `all'.
<snip>
cd sw/airborne; make PAPARAZZI_SRC=/home/ppzuav/paparazzi3 PAPARAZZI_HOME=/home/ppzuav/paparazzi3 TARGET=tunnel upload
/home/ppzuav/paparazzi3/sw/ground_segment/lpc21iap/lpc21iap /home/ppzuav/paparazzi3/var/PPZ1/tunnel/tunnel.elf
.
Found USB device
BootROM code: 2.12
Part ID: 0x0402FF25 (LPC2148, 512k Flash, 32k+8k RAM)
BootLoader version: 1.3
#
Starting software at 0x00004000
Cool, now the "tunnel" is loaded. This "tunnel" connects the GPS module to the serial1 port/connector on the Tiny2.11
NOTE: when in USB bootloader mode my Tiny2.11 is drawing 0.09A of current.
3. Using the cable used to load the boot loader, with a new custom adapter you have to make (8pin not 7pin), to a different port (this time really serial1) you program the GPS module to communicate with the paparazzi software correctly. This is called u-center and I downloaded it from the u-blox website and installed it on my Linux system (Yes, you can run "Windows" apps under Linux). So, now using u-center and that cable on serial1 you upload a configuration file from the Paparazzi Wiki (under GPS and configuring GPS).
*Now with the GPS configured we are ready to program the Tiny for aour aircraft. Power off and power on the Tiny2.11 and you should see it is using 0.07A or 0.08A of current with the "tunnel" loaded and running.
4. Using the USB programming cable you now (either with GUI or command line commands) compile and upload an "airframe" file into the Tiny2.11 autopilot. Templates are given but each file is unique to your aircraft. Now if you build one exactly like one someone uses already you may find a template that requires only slight modification.

So, ok, I have the bootloader loaded, I loaded the "tunnel" and programmed the GPS...I truly now believe I have a valid working ready to go Tiny2.11...ok, well someone else does. I used a brand-new fresh from the Assembly company Tiny2.11 for that. Next person who buys a Tiny2.11 from the Web Store (PPZUAV) gets this one that is ready to go (i.e. putting it back in the anti-static bag ready to sell) see image below the GPS is up and running and configured. I will reload the funjet1.xml aircraft file into it.
Oh, FWIW that looks like this:
Found USB device
BootROM code: 2.12
Part ID: 0x0402FF25 (LPC2148, 512k Flash, 32k+8k RAM)
BootLoader version: 1.3
########################
Starting software at 0x00004000

SUCCESS!!!

bmw330i
Apr 19, 2008, 01:16 AM
What I know now...moving forward...

So, at this point you should have a programmed autopilot with your groundstation and be ready to fly.

So, what do you do now to fly? I suggest:
1. Fly your aircraft as an RC aircraft first. Just verify it will fly (seems obvious but hey gotta say it).
2. Take the time to fly it. Make notes of trims required for stable flight. Then land and adjust the linkages to compensate. Repeat until with near zero trim it's flying steady and smooth.
3. On the ground with the motor disconnected power everything up and flip the mode switch (3-pos switch on the Tx) to AUTO1 and now standing in an open area orientate the aircraft nose up/down roll right/left and verify the control surfaces compensate to correct that motion. If not you need to correct it in software in the airframe configuration file. Then re-program the new program into the autopilot and repeat this test. Verify again the IR sensors are orientated correctly. Until you get this right the autopilot will not be able to fly the aircraft so this is a show stopper until corrected.
Verify the same thing in AUTO2.
4. Create a simple flight plan to simply circle your location at say 100m (300' ish). Launch and while in straight and level flight at approx 100m flip into AUTO1 and observe the aircraft behavior. It should not do anything drastic and simply stabilize the aircraft and start to fly the programmed route at the programmed altitude. If all is going well flip to AUTO2. It should now be circling overhead at 100m altitude in no time.

Now the above is edited after my experience to save someone new to this thread from having to read many many many pages to get to the meat of what this is about. Feel free to browse this thread and read what all went into the above but it's not required. The URL and info above should get you flying. If not dig in and see if you had any of the same issues I did or others who joined in. :)
References:
Paparazzi Wiki: http://paparazzi.enac.fr/wiki/index.php/Get_Hardware

dmgoedde
Apr 19, 2008, 01:23 AM
I hope your dedication and effort make it so that other people don't have the same hurdles!

bmw330i
Apr 19, 2008, 01:55 AM
Me too. Really. If I could have bought all this RTF I would have done so. But, I suppose like most things in life worth doing, I now wouldn't have wished it any other way. I'm enjoying the challenge.

It's nice now to have the light-bulb in my head getting brighter. I really felt like a complete idiot when I first started this project. I'm feeling a lot more in control now. While it is fresh in my head I just figure I'll post what I've done here.

Oh, Photos, ok, I do have photos. I'll put them either on my blog here or somewhere. I don't see any way to attach them to this post yet...

zlite
Apr 19, 2008, 10:11 AM
Did you try the prebuilt ones here?

http://www.onefastdaddy.com/catalog/

bmw330i
Apr 19, 2008, 11:12 AM
Here is a photo. Fortunately for me the Paparazzi does have very good documentation of where things are. Just not in a true follow these exact steps, in the order to do them, way...yet.

So, attached is also a picture with labels from the documentation.

The USB boot loader code has been loaded using the "download" connector (see the other image with labeled connectors). Now all programming is done using this cable. What you do is (High Level):
1. put Tiny2.11 in USB programming mode (i.e. power on with the USB cable connected)
2. send the aircraft file to the Tiny with either the GUI (paparazzi) or command line:
make AIRCRAFT=ppzuav1 clean_ac ap.upload
Last few lines should (output) look like:
.
Found USB device
BootROM code: 2.12
Part ID: 0x0402FF25 (LPC2148, 512k Flash, 32k+8k RAM)
BootLoader version: 1.3
########################
Starting software at 0x00004000

That's it. Ready to fly :) well, that is if everything is configured properly...

Lower Level step by step:
1. Run the GUI '~/paparazzi3/paparazzi'
2. In the GUI select the funjet1.xml aircraft file.
3. there is a button to EDIT the file. In my case I bought the same things as the person who created the funjet1.xml (except the chemical sensor) to make it easy on myself.
4. Once edited there is a compile button
5. Once compiled you are ready to send the program to the Tiny2.11 power on the Tiny2.11 with the USB cables connected. The Tiny2.11 will sense the 5v power coming from the USB and go into programming mode and wait for the program.
6. Now click the UPLOAD button. The code will be sent to the Tiny2.11 and it will automatically reset itself.

Now that is simplistic and best case. At this time all peripherals (RF Modem, Gyro, ESC, servos, Receiver, IR sensors) can be connected to the Tiny and checked.

The reality is that you can do this likely your equipment will need to be "tuned" for your aircraft. There is thankfully a page of documentation (documentation=Wiki) For URL see my above posts where I give the URL to the Wiki...ok, here's the page: http://paparazzi.enac.fr/wiki/index.php/Airframe_Configuration

All configuration of your aircraft is done via edits to XML files. What is interesting to me about this is that at work I work with programmers who are Java/C++ programmers and they do this same thing. All configurations for everything (and I'm talking about Video over cell phones system here...very complex and millions of dollars in software and equipment) are done the same exact way. Using an editor to configure XML and that in turn generates configuration files and code. Just interesting that half way around the world the Paparazzi Team is doing the same thing. That is nice. If you would rather edit hard-coded values in your code that's fine. But XML is easy to learn and if you learn it you learn a skill useful in not just Paparazzi but other places as well.

bmw330i
Apr 19, 2008, 11:47 AM
I'm learning myself all the XML variables (sure would be nice to have a table somewhere with all the codes and values...hint hint to anyone in Paparazzi team who knows them). Since my FunJet is using the same RF Modems (MaxStreamPro 2.4ghz) it should be easy. For me it is not.

Today I focus on configuring my RF Modems. I have chosen to start with API mode enabled. A little about what I have learned about these modems. They all communicate with each other and form a "Mesh" network. Paparazzi can take advantage of this. You can easily fly multiple aircraft at the same time controlled by the one ground station using Paparazzi. A use I see is this: You could fly a blimp with a module above you, since this module is seen by your aircraft (could be far away) your "mesh" network is complete. Your ground stations is relayed the communication by the remote aircraft and your aircraft now has a longer range possible. Or you could have an aircraft circle overhead doing the same thing.

It appears this "mesh" networking was created for applications like: Utility companies. Imagine all if every utility hookup in every home had one? This would create a mesh network so that every house was connected to every other house (just the network not the power). The utility company can now read all those meters wirelessly by simply having a router on that network to their network or a server on that network checking meters.

It seems that there are few places and a few steps here where order and values matter. This is the confusing part for me because again the Wiki does not do a good enough job (for me) to know exactly the XML code in exactly the order. So I am doing trial and error today. I will post my results and the specific order and XML required. What setup I want:
1. I want my base station USB modem to be 38400BPS
2. I want my Module to be 38400BPS
3. I want both using API mode

To verify I will run the GCS (Ground Control Station GUI) to see the data link between them is sending data from the Tiny to the GCS application.

Steps so far:
1. Using the Maxstream utility deliverd on the CD ROM (and Windows <ugghhh working on a Linux way to do this BTW>) I programmed the ground control station USB modem for 38400BPS and API mode
2. I am reading the Wiki under airframe configuration to determine the commands for my module and the order and syntax

...more to come as I do my trial/error...

bmw330i
Apr 19, 2008, 06:20 PM
FWIW:
A note about Windows/Linux. The paparazzi software runs on Linux. The instructions and setup are all for a "debian" version of Linux. Not an issue in my opinion. My favorite version Ubuntu is debian based. I have helped a few people now with installing Paparazzi on Ubuntu Linux.
pat
My advice for Paparazzi is to get a decent laptop. There are many now under 1,000.00 and even some under 500.00 ones that will run Ubuntu (and therefore Paparazzi) just fine. You can even do like I did with my latest Sony VAIO laptop and just install Ubuntu alongside the Vista that came with it. The Ubuntu installer resized for me the vista partition and I ended up with a laptop that allows me to choose which to boot from at startup.

AntonK
Apr 19, 2008, 07:53 PM
Ive actually gone to booting Ubuntu from a 4gb pendrive. Every once and awhile it hangs for a few seconds, but for the most part its pretty seemless. Im not sure I recommend this option as Im not sure what would happen if the pendrive came out of the computer while Ubuntu was running. Its great for a home solution though.

Anton

zlite
Apr 19, 2008, 08:17 PM
See ROUND 2 above. :)

I'm confused. Are you in fact the onefastdaddy supplier yourself?

-chris

zik
Apr 19, 2008, 08:28 PM
Sounds like you've had quite a journey! Good luck with getting it all working well. I'm following your story with interest - since I'm using some of the paparazzi code myself I'll be keen to see how well it works out for you.

bmw330i
Apr 19, 2008, 08:43 PM
Ive actually gone to booting Ubuntu from a 4gb pendrive. Every once and awhile it hangs for a few seconds, but for the most part its pretty seemless. Im not sure I recommend this option as Im not sure what would happen if the pendrive came out of the computer while Ubuntu was running. Its great for a home solution though.

Anton

Hi Anton,

I missed something..."pen drive"? Sounds cool but that's not something I mentioned.

-David

bmw330i
Apr 19, 2008, 08:45 PM
I was so frustrated no one provided pre-made anything, not even PCB that I decided to have them made myself.

bmw330i
Apr 19, 2008, 08:51 PM
Sounds like you've had quite a journey! Good luck with getting it all working well. I'm following your story with interest - since I'm using some of the paparazzi code myself I'll be keen to see how well it works out for you.

Ya, it has been a mind expanding thing and a lot of fun. I have a long ways to go though. Good luck with yours as well...I will be following that thread as well and it sounds like it is going very well. Good work.

bmw330i
Apr 19, 2008, 08:57 PM
Well, I had one Tiny2.11 assembled with an LEA-5H just to see what happens...what happens is I can load the bootloader, I can load the tunnel, I can connect with u-center...but then it freezes. Recycle the power to the Tiny and it comes back...then freezes after about 20seconds.

Very odd. But I have noticed this:
- changing any setting with u-center and issuing "send" freezes u-center and or the GPS and I have to power off/on the Tiny2.11 to get it back.
- THe 5H with "supersense" is SUPER FAST. Wow, inside in the garage in 1 to 2 seconds it has 4 or 5 satellites and a 3D fix...it's just incredible to see how fast it goes from power on to a 3D fix.
- The thing will if left along just freeze after the same period of time. I didn't time it (I will) but it appears to be around 20-30 seconds.
- It is on 9600BPS (default) and like the first thing trying to change that results in immediate freeze forcing a reboot of the Tiny/GPS

Bummer, it seems incredibly fast but I thought I would post this because I know people are buying LEA-5H for their Tiny2.11 projects. Just be aware it may take some debugging. I'm sure a fix can be had and the LEA-5H seems already way better than the LEA-4P for locking in satellites but right now I am having issues.

So, putting that aside I'm going to continue with my LEA-4P based Tiny2.11 now...

AntonK
Apr 20, 2008, 01:07 AM
David,
You were talking about installing Ubuntu on a laptop and the formatting and blah blah blah. I thought I would chime in with what I have been using, as a potential option. A bit of a tangent, but Im known for those.

Anton

bmw330i
Apr 20, 2008, 02:50 AM
David,
You were talking about installing Ubuntu on a laptop and the formatting and blah blah blah. I thought I would chime in with what I have been using, as a potential option. A bit of a tangent, but Im known for those.

Anton

Anton, your comments always welcome...even ones I don't understand.

I took a break from the Tiny2.11 today and took some time to do the Rx Mod on my Berg 4L receiver. I quickly found although I easily found the pin on the IC to solder the wire to for the PPM I was lost when it came to where to wire up the (-) and (+). Then I found a good image on RCGroups in another forum showing where to solder the + / - wires...nice. Went pretty smoothly. Something like:
1. removed outer case (shrink wrap really)
2. found the pin on the corder just like the photo on the Wiki and soldered a wire to it.
3. Then removed the pins as like the directions say you won't need them with Paparazzi.
4. Tinned and soldered the + and - wires to the right pads.
5. soldered the XTal pins in the holes so the XTal can't come loose (Per the Wiki)
6. added a 5-pin Molex Picoblade connecter per the pinout given for Tiny2.11

Always tomorrow...supposed to go Moto-X riding in the AM (wife insists we get out and ride...I agree) We are lucky in SoCal to have a few Moto-X tracks within an hours drive. I hope to get some time in the afternoon to get the RF Modems working per my plans this weekend.

bmw330i
Apr 21, 2008, 03:14 PM
Well, nothing too much to update. I worked on following things yesterday:
1. The LEA-5H based Tiny2.11
2. The LEA-4P based Tiny2.11 getting the RF modems talking
3. The Berg 4L Rx Mod to grab the PPM signal (aka the wiring of it)

1. It freezes, oddly exactly 30 seconds after power on. Did it at least 10 and timed it to be sure it was exactly 30 sec each time. Odd. I will load the latest firmware and see if that still happens.
2. Well, I installed the LEA-4P on a Tiny that didn't have a GPS module. So after tracking down and fixing an issue with the module not correctly soldered I was soon talking to it in u-center and verifying all was working. After I tried many times to get the RF Modems talking. I'm using MaxStream 2.4ghz XBee. USB version for the ground station and OEM module for the Tiny side. Very very odd. I mean according to the Wiki all is setup right. This is very very much an area with almost no documentation on what to do if it's not working. I am searching the Development Archives and trying new things. I tried to fallback to using just the "Transparent" serial communications...then to 9600bps, then back to verifying 38400 was setup for both...non-API mode...nothing. THere are no lights on the module but the ground station has them and at times they seem to be connected based on the activity of the LED on the USB modem. BUt in ALL cases nothing in GCS (The GUI ground station window/app)...

Well, as promised when I sort it out I'll update this thread...

3. That was pretty easy. I de-soldered all the pins (not needed all servos are driven from the Tiny autopilot not the Rx. Found the pin from a picture with PPM signal. Then easily (photos on RCGroups) found the (-) and (+) and soldered wires there. Now I have a Berg 4L ready to go.

dmgoedde
Apr 21, 2008, 05:38 PM
Have any idea of the # of channels the PPM output of the Berg4 gives? I assume it is more than the basic 4 Ail/Elev/Thrott/Rudd. I "hacked" a Berg Stamp 4 channel Rx by desoldering the servo pins, and soldering the crystal permanently on.

Dean

air
Apr 21, 2008, 07:34 PM
8 according to the wiki

AntonK
Apr 21, 2008, 08:39 PM
yes, like almost all RC receivers all 8 channels are on the RF side of the receiver, its just that only 4 are actually driven to servos. Bypassing the servo driver allows for all 8 channels.

bmw330i
Apr 22, 2008, 02:38 AM
UPDATE:

Well, got the XBee-Pro Modems up tonight. I'm still confused by it though. I had to set everything to 9600bps. Once I did that it worked. I had them set to 38400. At that speed I could see when I launched the ground station the lites on the ground station modem blink, then a rx light blink...then all but the power light go off. Very weird.

But like I said, setting all to 9600bps and it all worked. I then quickly found out that using "google fill" option triggers google to block your IP for a while. This leaves me with the problem of how to get the cool background now. If Google can't be used then what can be?

Tomorrow after work I will connect the Receiver and the IR sensors and get those working.

I will upload a screen shot of my GCS showing the GPS is working and telemetry is up and working.

AntonK
Apr 22, 2008, 09:23 AM
Google typically lets you fill in quite a bit of area before you get banned. In fact Ive never been banned. Make sure you are centered around your house/flying area before you start downloading tiles, and also make sure you are not zoomed out crazy far. You will get unbanned soon.

Anton

bmw330i
Apr 22, 2008, 11:48 AM
Ah, ok, it seemed to be around 5min. Ya, I had zoomed out. The GPS had me a very long ways away from where I actually was. Is that normal? The LEA-5H said quickly I was at: -116.9 x 33.01 .. the Tiny I was using last night with the LEA-4P said 117.x / 34.x ... and google showed a terrain I imagine is quite far away.

I will try outside with the laptop this AM. I really hope to get the LEA-5H Tiny to stop freezing. Can you think of anything in the programming that tries to update the GPS every 30 seconds? That's the magic timing. 30 seconds after power on...freeze. Anytime I try with u-center to "send" to the GPS ... freeze. The LEA-4P and LEA-5H are virtually pin for pin identical just the LEA-5H has higher tolerance for input voltage (slightly) so I am hopeful I will/can get it working.

Prashanth
Apr 22, 2008, 01:08 PM
Thanx david
A thread like this was what I was hoping someone would start,
buffs like me can learn and follow and prevent the magic smoke especially when parts are hard and rare to find from this part of the world....
Subscribed and will be following

Prashanth

bakketti
Apr 22, 2008, 02:17 PM
Great thread! I am planning on buying a ppz board from you towards the end of the year. Your "lessons learned" will definitely help. Thanks again for supporting the community.

Mr_westie
Apr 23, 2008, 02:59 PM
Excellent work :)
Saving my pennies now.

bmw330i
Apr 25, 2008, 05:45 PM
Hey all,

Thanks for the comments. Remember, when it seems totally a blur I have been there. I guess for some this is all routine but for the rest hopefully what I post will be simple enough for us.

Latest update. Not a lot new to report. I had to build a few kits for people. Very time consuming...So, it's a tedious task and the cost of these kits are truly for my own time to make them.

So, that said (reason why not much progress lately) I did find I need to do some more homework to get past the next stage. I have the following ready to hook up:
1. Receiver (Berg 4L)
2. XBee-Pro OEM Module (2.4ghz)
3. Two Hitech HS65 (elevons)
4. Tiny2.11
5. Generic ESC (25A)
6. 300 Motor
7. 3 cell Lipo
8. FunJet
9. Dual-IR sensor
The cabling is slowing me own. It's the Dual-IR sensor. I'm having a hard time sorting out the pin1 on the board connector (on the Sensor). The Tiny2.11 has a good pinout on the Wiki but not the Sensor. Often the pinout is viewed from the bottom of the board not the top. Well when you plug it in your plugging it in from the top. The info on the Wiki is not clear...so, as soon as I get that wire made I'll be ready to plug it all together.

NExt Steps (after wiring up the Dual-IR sensor):
1. Calibrate all the above. This requires setting zeros for them, then their max values. Then set min, max and neutrals...going to have to study the Wiki more and the List (Paparazzi Development List) for info.

I have found that going to the Wiki is good first. Then go to the List and do a search on terms like "GPS", "IR", or errors if you get them. Usually someone else has had the same issue and you can find your answer there without bugging the members. I have found if you do your homework and ask a good question that shows you did some homework they are quick to respond to your requests.

Also as always feel free to ask me...

Oh, I'm at a Tibco Conference next week...not going to get anything new done next week...just a head's up.

FAKHREALAM
Apr 29, 2008, 03:41 PM
Hey all,

Thanks for the comments. Remember, when it seems totally a blur I have been there. I guess for some this is all routine but for the rest hopefully what I post will be simple enough for us.

Oh, I'm at a Tibco Conference next week...not going to get anything new done next week...just a head's up.

How this board is measuring the RC pulses coming from receiver.

Fakhre Alam

bmw330i
May 12, 2008, 10:10 PM
Update: Been a while hasn't it? Well, here's what happened. One day about two weeks ago something changed and I could no longer compile the Paparazzi airframe configurations. Seemed something broke in the software. I don't remember exactly if it was my cvs update command, my updating the packages or ? but all of a sudden I was unable to run the commands to make and upload the software to the Tiny Autopilot.

I tried re-installing Ubuntu but I just could not get the dependencies worked out. ivy-ocaml required this and that and the versions were too new...after a week I gave up and installed Debian 4. This caused it's own issues in that Debian detected about nothing and required manual config of everything (practically). I have two laptops and Debian does not by default install the right (if any) Wifi drivers. Add to that you have to add for WPA more stuff...and how do you do that without connecting to a network? Grrr...

So about the time I'm getting Debian working I see someone posted about how Ubuntu was working for them...ok, so I burn a new Ubuntu 8 Install CD, booted up, installed it, then configured the Paparazzi Project repository for Ubuntu (Hardy), then sure enough, it installed without any issues. Back in business with Ubuntu. So, I then went to my 2 laptops, an iMac with Parallels running Linux in a VM, and my Desktop (Dual Core) and all installed perfectly. Ubuntu 8 detected everything perfectly and the Paparazzi Project software installed perfectly.

So, I'm back in business. It would have been nice to get some notification that the packages were fixed other than seeing someone write about their install succeeded but, like I said, it's open source. I don't expect it...just would be nice to know when the software is changed and when it is fixed (i.e. fixed in that my running it on Ubuntu works again).

NOTES/Lessons Learned:
1. Ubuntu is clearly miles ahead in detecting and configuring hardware properly at install time.
2. Don't update from cvs unless you have a good reason. Don't update your packages unless you have good reason. Things just might not work after you do so.
3. You have to be monitoring the email list to truly get updates on what's going on. Don't wait for it to be posted on the Wiki or try and ask about it on IRC.

Time to continue. I hope this week to pick up where I left off...I will update when I do.

Unterhausen
May 12, 2008, 11:32 PM
you've written a lot on this thread.

Good point about CVS. As long as you don't install anything, you should be able to check out a new version from CVS to a new directory. I'm always hesitant unless something is really broken.

AntonK
May 13, 2008, 09:37 AM
In regards to the OS issues. I havent had a problem with 7.10. I know the ENAC guys have been using it for quite some time as well. There could have been a version miss match in the packages if you did an apt-get upgrade? Its hard to say.

Regarding the CVS. You will get an error every time you do a cvs update, especially if you tinker with any file that is in the CVS and do not rename it / replace it. CVS will try to do a merge on the file but will more than likely fail. Pay close attention to the output of CVS, as it will tell you where to go to figure out the broken mergers. When you understand what CVS does its easier to understand why you have to be careful with it. Always make a back up of your code prior to updating as well, again especially if you have edited source filed, or configuration files that are already on the CVS.

That being said. I have long asked for a change document to be written. If you upload something to the CVS there should be a change history doc that is in /paparazzi3/ that tells people WTH you changed. This was never passed by the people who do the CVS updating(ENAC). So again cvs update with caution, or when a mailing list item goes out discussing the change(typically for a bug fix).

Anton

bmw330i
May 13, 2008, 03:22 PM
In regards to the OS issues. I havent had a problem with 7.10. I know the ENAC guys have been using it for quite some time as well. There could have been a version miss match in the packages if you did an apt-get upgrade? Its hard to say.

True, Really, I would have thought it was just me but I have 4 computers. All started giving errors trying to compile. That is when I got worried. Essentially to eliminate me from the equation I:
- did a fresh install Ubuntu 8 and 7.10
- followed Wiki with steps for command line and SPM setup
- at the paparazzi-dev or paparazzi-bin install I got the error about ivy-ocaml.

Then I just tried to drill-down into what specifically was holding up the ivy-ocaml install...When I tried to install just ivy-ocaml it gave the error about unmet dependency. It seems the version of the dependent thing was too new and 3.6 (I believe) was required...forget the exact package but the impression I got was the ivy-ocaml had a hard-coded dependency for an old no longer available package. The fix likely was simply fixing that dependency that it seems someone did recently because after that email was posted to the list I had no issues at all doing the exact same install procedure.


Regarding the CVS. You will get an error every time you do a cvs update, especially if you tinker with any file that is in the CVS and do not rename it / replace it. CVS will try to do a merge on the file but will more than likely fail. Pay close attention to the output of CVS, as it will tell you where to go to figure out the broken mergers. When you understand what CVS does its easier to understand why you have to be careful with it. Always make a back up of your code prior to updating as well, again especially if you have edited source filed, or configuration files that are already on the CVS.

True, but I had not changed anything. In fact I did a "mv paparazzi3 paparazzi3.bu" Then a fresh cvs refresh to get only the files out there...same error. This was one of the first things I tried because of the reasons you say.


That being said. I have long asked for a change document to be written. If you upload something to the CVS there should be a change history doc that is in /paparazzi3/ that tells people WTH you changed. This was never passed by the people who do the CVS updating(ENAC). So again cvs update with caution, or when a mailing list item goes out discussing the change(typically for a bug fix).
Anton

This did teach me a lot. Really. I guess I would not have had such feelings about it if I was not programming all the Tiny2.11 I sell before shipping. So, not being able to get the bootloader, GPS configured and a sample flight program in there was starting to worry me. It all works now but I still have no indication from the Paparazzi Project why magically it works now. I'm open to maybe 4 times on 4 different machines I just did it wrong and then one day did it right but that is hard for me to believe...but it is possible I suppose.

bmw330i
May 13, 2008, 03:35 PM
Well, here's the exact steps that works for getting a working Paparazzi Center onto a freshly installed Ubuntu 8 system:
1. Download and burn an Ubuntu 8 Cd
2. Boot from it and follow prompts to get it installed. Since this is a "fresh" install I used "Guided use whole disk" at the Partitioning step.
3. On Reboot Applied all Updates (the icon for update manager will notify you in the top right corner, just open it and apply all updates, reboot).
4. Open Wiki Page detailing Paparazzi Install: http://paparazzi.enac.fr/wiki/index.php/Installation
5. basically add the Paparazzi "Ubuntu" Repository (Hardy). You can just add this line to the /etc/apt/sources.list file:
# paparazzi project
deb http://paparazzi.enac.fr/ubuntu hardy main
# end paparazzi
NOTE: Must be "hardy" not gutsy branch, also the # are comments just for readablility you can exclude them.
6. refresh the package list either with the refresh button in synaptic package manager or this command: sudo apt-get update
7. install paparazzi-dev, paparazzi-arm7 in SPM or: sudo apt-get install paparazzi-dev paparazzi-arm7
8. Remove brltty: sudo apt-get remove brltty
9. now get the source and compile by:
- cd ~/ && cvs -z3 -d:pserver:anonymous@cvs.savannah.nongnu.org:/sources/paparazzi co paparazzi3
- cd ~/paparazzi3 && make
10. Set permissions: As root copy "10-paparazzi.rules" as root from $PAPARAZZI_HOME/conf/system/udev/rules/ to /etc/udev/rules.d/
this is the command I used:
sudo cp /home/david/paparazzi3/conf/system/udev/rules/10-paparazzi.rules /etc/udev/rules.d/
11. Set env variables in .bashrc
vi ~/.bashrc (don't forget the period in front of bashrc)
- add at the bottom:
# Paparazzi
export PAPARAZZI_HOME=/home/<your login id here>/paparazzi3
export PAPARAZZI_SRC=$PAPARAZZI_HOME
export PATH=$PATH:$PAPARAZZI_HOME
- :wq :wq writes and exits in vi you can use any editor really I just like using vi out of habit
NOTE: <your login id here means whatever you see if you type "whoami" goes there without the <>

Test by running it. Exit the terminal, then open a new terminal. Then type: paparazzi & <---the & means run it in the background.

That's what I did and do now and without any issues/errors.

mecevans
May 15, 2008, 12:11 AM
wow cant wait to get my autopilot!!! i have Ubuntu and paparazzi already installed on my laptop. next step is to get one of your autopilots. the modem you use might mess with my wireless video system so i think ill use the XBee-PRO XSC.

bmw330i
May 15, 2008, 01:25 AM
wow cant wait to get my autopilot!!! i have Ubuntu and paparazzi already installed on my laptop. next step is to get one of your autopilots. the modem you use might mess with my wireless video system so i think ill use the XBee-PRO XSC.

Hello, well they are not "my" autopilots I just have them assembled from the Paparazzi Project design by a fabrication/assembly company. I am so glad the order for 30 Tiny2.11 just showed. Now to test them. I do that by programming the USB bootloader, loading the tunnel, using u-blox u-center to program the GPS then validate the GPS gets a fix. Then put them back in their anti-static bags to ship out. Takes time but at least I can catch any defects before sending them out.

...are you one of the orders I'm working on now? PM me if you are. Pretty much everyone who has bought Paparazzi hardware from me have been really nice people with interesting projects.

hendrix
May 15, 2008, 04:21 AM
Hi.
I am about to try Paparazzi autopilot also which i will get soon from David.
Everything looks good so i hope i will manage to build and operate the autopilot.
10. Set permissions: As root copy "10-paparazzi.rules" as root from $PAPARAZZI_HOME/conf/system/udev/rules/ to /etc/udev/rules.d/
this is the command I used:
Code:
sudo cp /home/david/paparazzi3/conf/system/udev/rules/10-paparazzi.rules /etc/udev/rules.d/
11. Set env variables in .bashrc
Code:
vi ~/.bashrc (don't forget the period in front of bashrc)
- add at the bottom:
Code:
# Paparazzi export PAPARAZZI_HOME=/home/<your login id here>/paparazzi3 export PAPARAZZI_SRC=$PAPARAZZI_HOME export PATH=$PATH:$PAPARAZZI_HOME
-
Code:
:wq
David do you know if the paparazzi bin package also includes the above steps?
I installed the binary package and it looks like it is working but the paparazzi site says to
add my user name in the plugdev group in my Ubuntu 8.04 but there is no such group!
The PAPARAZZI_HOME=/home/<your login id here>/paparazzi3 is registered but as
Paparazzi not Paparazzi3.
I am also thinking of installing vmware on windows and installing linux there.
Do you think that ubuntu 8.04 will install in a virtual machine?
Chris

bmw330i
May 15, 2008, 10:46 AM
Hi.
I am about to try Paparazzi autopilot also which i will get soon from David.
Everything looks good so i hope i will manage to build and operate the autopilot.

David do you know if the paparazzi bin package also includes the above steps?
I installed the binary package and it looks like it is working but the paparazzi site says to
add my user name in the plugdev group in my Ubuntu 8.04 but there is no such group!
The PAPARAZZI_HOME=/home/<your login id here>/paparazzi3 is registered but as
Paparazzi not Paparazzi3.
I am also thinking of installing vmware on windows and installing linux there.
Do you think that ubuntu 8.04 will install in a virtual machine?
Chris
Hello, good questions about the paparazzi-bin install and the above. Let me try and think outloud here...my guess is no. You can check by simply doing ls -l /etc/udev/rules.d/10-paparazzi.rules .. if nothing is returned then no. If it finds this there then "yes". having that file there sets a permissions rule required. Every time I did the command to add my username to the plugdev group it says that the user is already a member. I have never seen it say the group doesn't exist. Can you verify that message you see? Yes, the paparazzi-bin installs a "paparazzi" and the cvs source installs a paparazzi3. In this way both can coexist. I used to install both but nowdays only install the paparazzi-dev and paparazzi-arm7 and not the paparazzi-bin. You miss out on a lot of airframes if you go with the paparazzi-bin that are out there in cvs. Funjet1.xml is one and as I remember the only Tiny2.11 airframe file at the moment. I could be wrong. As for the install VMWare on Windows...that's a thought. I haven't tried that. I have installed Ubuntu on my iMac using Parallels and that worked fine. I would really like to get the paparazzi software running on Mac OS since it should be possible. I'll be honest. I don't like Windows. Primarily two reasons: 1) The Registry is nothing but trouble, bloats fat over time and gets corrupted over time...just a pain and a hassle 2) EVERYTHING costs $$ the OS, every app, even drivers so what do students do? End up trying to use "cracks" and "serialz" to get the stuff for free...I just went to open source and Mac OS. The only Windows I have is VISTA on my SOny VAIO because it was pre-installed, I quickly set it up as dual-boot VIsta and LInux. THe Vista is used to run Realflight G4 Simulator...I hope I answered your questions. Let me know if I didn't...next few days are going to be spent loading the boot code, programming the GPS and then if I get time putting the funjet1 aircraft file into all the new Tiny2.11 that arrived...oh, and building the cables...

BIg Heads up everyone...TinyX.xx autopilots use these PicoBlade Molex connectors. They do work very nice for locking on and having a death grip on the board. But try and remove it and after a few times you're going to pull a wired off. Also building them takes sooo much time. The tool, an absolute MUST to use these connectors is 200.00 from the cheapest place I could find. Get it and now you have to spend hours making these things. Now if you buy pre-crimped wires you still have to solder and cut and put together the Molex ends...wicked wicked things those Molex. My thought is have more larger connectors like you see in most electronics and just have a wiring harness. Open a Cell Phone or PDA and will you see 15 different connections? But heck I am not criticizing I'm just suggesting because overall I am very impressed with Paparazzi. Just as I get more experience I have more lists of things I would like to see improved.

hendrix
May 15, 2008, 11:27 AM
Yes David you helped me a lot, your answer was very informative.
About the connectors i will use the multiplex 6 pole connectors since my jet uses them already and i have plenty of them.
Very good connectors, not small but they are very durable.
About windows i do agree that windows are expensive and the registry is not a good idea. I have been using linux for over 20 years now (not as my basic operating system) and i do like it but if some jobs are to be done windows
are required.
I really hope that vendors will eventually support linux with drivers because that is the main problem i think.
About my tiny 2.11 board can you omit the "Z" sensor molex plug and just include a 4 pin molex pcb side plug?
The pcb uses a 3 pin molex plug but the ribbon cables i have are using the 4 pole molex plug for the Z sensor. Obviously the ribbon cable only uses three wires.
If you have already soldered this molex plug there is no problem i will fix it.
Chris

hendrix
May 15, 2008, 12:13 PM
David i followed your instructions, i completely removed the bin package
and installed the dev package.
Compilation was super smooth and everything is up and running perfectly well.
In fact i am posting from my laptop inside ubuntu hardy heron 8.04 lts.
Funjet was included in the bin package as well.
I even made my pcmcia saa7134 card to work(i was trying to make it run for the past 3 days)
I am on my way i think....... :)
Chris

AntonK
May 15, 2008, 12:57 PM
If its not clear the bin package is a binary package that only allows you to change the configuration files of paparazzi, airframe/radio/flightplan/etc. The dev package is what you need if you want to mess with the source code.

Anton

hendrix
May 15, 2008, 01:55 PM
Hi AntonK.
Yes i know about the difference i just thought that the dev/source package would have more airframes included but actually it has the same airframes included as the bin package.
Does anyone has a link with more tiny 2.11 airframes?
Of course i can make my own but it would be nice to see what other people
have wrote.
There are some minor bugs fixed though when i installed the dev package.
Using the bin package i was getting a few compilation errors about directory not found etc(using the tiny 2.11 airframe files of course).
Chris

AntonK
May 15, 2008, 02:55 PM
There arent a lot of 2.11s flying yet. Most people are just getting them and starting to build there airframes. The only real difference between them is the UART #s and the include file. Otherwise everything should be the same.

Anton

hendrix
May 16, 2008, 01:06 AM
I think that after the tiny 2.11 becomes available many people will try Paparazzi.
and it will evolve more rapidly.
I was looking for an autopilot for about two years now but those prices even made me want to make my own (simpler not like Paparazzi) but i have almost no time available since i have to work at two jobs in order to raise enough money (just got married).
From what i have seen so far paparazzi has the potential to become a very good autopilot
or a safety (return and circle home) device very valuable especially to 4K Euro and up jets.
I also want to thank you all for your valuable information and help
Chris

IAD
May 17, 2008, 02:06 PM
Quick question... I'm sourcing out bits and pieces of a Tiny setup, and I'm stuck... Can I use the Xtend cased USB modem for the groundstation, or do I need to get the serial version, and THEN use an serial-->USB adapter?

I'm guessing I can go straight USB, but...

Thanks!

~Luke

AntonK
May 17, 2008, 06:20 PM
the USB version has an USB to serial adapter in it. I dont think its FTDI I think its another brand. But it essensially does the same thing you would do with a serial modem.

Anton

bmw330i
May 21, 2008, 07:27 PM
I owe this thread an update.

Status:
Have two working Tiny2.11 ready to program for my two aircraft. One is an EasyStar the other a FunJet.

EasyStar: Still in the box

FunJet: Airframe is together, servos in the wing, pushrods installed. Motor Mount on, have the layout I wish for the autopilot, IR sensor (Dual Only), XBee Pro OEM 2.4ghz module, battery...have the Picoblade connectors on the Receiver, servos, IR sensor (Dual) and ESC ... big note here...remove the power wire from the ESC. You don't need it to be powering the Tiny as well. I forgot and the ESC got really hot. I'm suprised I did not burn it up or the Tiny. I think I caught it in time.

Time now to:
- Get everything wired up and to the Tiny2.11 (Gyro, IR, ESC, Rx, Servos, Barometer etc)
- Mount everything so Tiny2.11 can be powered on/off and programmed without removing it or having to do any disassembly (i.e. remove parts from the plane).
- Need to set the neutrals for the IR sensors...basically the stuff on the Wiki about tuning the airframe: http://paparazzi.enac.fr/wiki/index.php/Airframe_Configuration

I am also investigating SunMicrosystems (SunSpots) http://www.sunspotworld.com/ as a possible autopilot. They have built-in wireless, connector for external sensors and best of all run a Java VM on a pretty speedy chip. The NetBeans IDE is free as is much of the source for code that would work for an autopilot. My partner JB is very good with Java so maybe we can get some traction with that and look into that. To be honest I'm concerned about ivy-ocaml and the other bits that seem only to be used in Paparazzi. Now ocaml I have heard of so I'm staying open minded. That's why the SunSpot solution would be parallel not replacing Paparazzi "Tiny" based solutions. Not yet.

Well that's my update. If we go the SunSpot direction I'll start a new thread on that progress to keep this thread on the topic of Paparazzi Project build info.

I can say at this point I really have a good understanding of the Hardware, how to program the boot code, the USB programming and the interaction with the GPS using the tunnel. Next will be getting familiar with the other bits and flying. And learning enough about the XML to add sensors not found in the default aircraft files given as samples in the source.

Cheers,
David

hendrix
May 22, 2008, 02:07 AM
This SunSpots look very promising indeed.
I think it will do the job but some heavy programming is needed.
If you succeed in this i will be the first to buy/try one. :)
Btw i find very difficult to understand the way flight plans are written.
I can understand the statements etc but there is something that my brain hates but i can't pin point it.
It looks to me that there is too much room for errors using the way the xml
is created.
Chris

small_rcer
May 23, 2008, 07:45 AM
Good Day:

I appreciate the possible interest in the Sunspots platform. However I appreciate even more the detail which you have presented in this build log. I have watched and read the Paparazzi web site for some many months and always felt that a lot of the details were left for the individual to discover on their own. You have found this and I thank you for the details you have provided.

It appears that the Sunspots has some challenges for our applications. It is larger than would easily fit in smaller planes. It is not very light. And by crackey it is a bit expensive at $750.00 US for a starter kit. When you add what would be needed to make it a possible airborne platform, you could be spending more than what a dedicated autopilot, readily available, and with a working history and software stack, cost off the shelf. And you still would have the weight and size to deal with.

So if you could continue on with the Paparazzi project to conclusive and satisfactory flight reports, I for one would certainly appreciate it a lot. You seem to be close. I have concerns that a distraction by Sunspots would leave those of us following this with interest, hanging like a season finale, but with no new season to look forward to.

Again thanks for the hard work you have done, and the detail and information you have provided.

Jim H

dafatboy
May 23, 2008, 12:04 PM
Hi,
I am following this thread, and find it very interesting.
I was just wondering if you managed to get the LEA-5H working properly on the tiny?
Thanks
Dan

bmw330i
May 23, 2008, 02:15 PM
Hi,
I am following this thread, and find it very interesting.
I was just wondering if you managed to get the LEA-5H working properly on the tiny?
Thanks
Dan

Hi Dan,

Good question, I thought I mentioned this. Yep. Works great. What happened is that there are two ways to program the GPS Module for Paparazzi. Either manual where you go in and simply set all the values per their suggestions...or you can use a feature of the u-center and import a file with the values. The only file they post is for the LEA_4P...guess what? It doesn't work in the 5H :) ... I found in u-center an option to reset everything to factory default. Doing that got it to stop freezing. Then I proceeded to manually using the menus and the Wiki info set the values. I then saved them. I should post it up to the Wiki...when I get some time.

I have found that the LEA-5H is way superior in sensitivity. Indoors it is picking up satellites and getting a fix where the same spot an LEA-4P based one is still searching for even a single satellite. As soon as the LEA-4P based Tiny2.11 sell out I'm only going to carry the 5H based ones.

As pointed out I agree, I should not be distracted (by SunSpots :) ) and will push on.

bmw330i
May 23, 2008, 02:22 PM
Oh, BTW, there really is no need if you have Linux (I suggest Ubuntu 8.04) installed to have to install u-center on Windows. Just download the app on Linux. Install Wine (sudo apt-get install wine) then run the usetup.exe file you downloaded...it will install and run fine. To get com1 port visible to u-center you create a link:
cd ~/.wine/dosdevices && ln -s /dev/ttyUSB0 com1
That command above in English:
change to your home (~/ ) directory into the .wine / dosdevices directory. If successful (ie no errors) then create a symbolic link (ln -s) to the device (/dev/ttyUSB0) and call it com1
The FTDI USB cable most often maps in Linux to /tty/USB0 device. If not unplug everything else (USB wise) and then plug it in.
Now, u-center will launch, and com1 will be redirected to /dev/ttyUSB0 or your FTDI cable...which is to be connected to "serial1" on the Tiny2.11 autopilot...which has to have the "tunnel" program loaded. The "tunnel" sends UART1 communication direct to the serial1 port from the GPS. ... more on this in the Wiki. The above is just what is missing to do it on Linux. I did edit the Wiki to include some details or at least mentioned it works on Linux.

-BMW

hendrix
May 24, 2008, 01:26 AM
Hi David.
I succeeded in running the paparazzi center within windows using VMware.
Ubuntu 8.04 sees the usb cable but i will not know for sure if it will program the tiny inside VMware until i get the tiny 2.11.
The reason i am using windows as a host is that i also need to record video from the onboard camera which also has the OSD module and so far i am unable to use my saa7134 card (pcmcia) to record video inside linux with acceptable quality.
Btw the Lea 4p can be programmed to output Nmea data from it's serial port?
My onboard sensor module (IAS, altitude etc.) has an input for a NMEA gps.
Chris

bmw330i
May 24, 2008, 12:07 PM
Hello Chris,
That would be great if you get Paparazzi software fully working under VMWare. My experience is it is slow (VMWare). Maybe they have improved it.

You may wish to try and find open source solution to your driver you need Windows for. I know the feeling often is "if it only ran on Windows" but think of it as "if only people learned that Linux is free and you don't need Windows". Making Paparazzi Windows compatible means to me that you are making it tied to a non-free OS. Currently Paparazzi is open source as is the OS it runs on. You only have to pay for the actual hardware. Today, and tomorrow, upgrades=FREE, updates=FREE...I personally like it to stay that way.

If Paparazzi is not more "mainstream" I believe it's the lack of simpler end-to-end step-by-step instructions for getting something flying. My own "wish" list would include a single airframe (EasyStar?) and exact step-by-step from just having only the hardware components to first launch and the process of testing. For sure I see most all of that info exists on the Wiki or in the Archives of the email list but it is not end-to-end and not easy to follow for a "newbie". This build thread will hopefully do something similar. In the end I will edit either my BLOG or the first entry with the exact step-by-step when I'm in the air. I can guarantee it will be:
OS=Ubuntu 8.10
Autopilot=Tiny2.11
Aircraft=FunJet just like the Wiki but minus the Chemical Sensor

My views about Windows are my own. I wish you luck with the VMWare/Windows solution. Hopefully this thread will have useful information for your build or that you give Linux a chance without running alongside or on-top of Windows.

Good luck,

hendrix
May 26, 2008, 04:54 AM
HI David.
I have been following Linux for a long time now and believe me i would be very happy if i could use it for all my needs. I even post this reply from a pure linux box which is perfect for internet and office job.
I have spend endless nights trying to find a good program so i can record video
but i can't find anything.
My tv card works fine in Ubuntu and the video inputs are working fine it is just that i can't record video with sound yet and the video recording is not of good quality.
I tried Xawtv, Mythtv, me-tv, but no luck.
Recording the composite video input with a console command line like i do now is not exactly fun (mencoder).
Mythtv manage to destroy the system twice so i won't be trying this anymore.
The problems arise when i try to use a good pcb program (although i can run my favorite pcb program with wine) or an rc simulator or a video capture application.
Anyway i have installed Ubuntu 8.04 in my laptop and i must say that it found all the hardware and it is working fine so i will be working in a pure linux environment, i just want to experiment with win+vmware+linux.
Ubuntu 8.04 runs very fast inside vmware there is no problem here.
Btw i compiled my first flight plan and run a simulation succesfully!
It looks like everything will work.
Chris

hendrix
May 26, 2008, 02:02 PM
David i just want to say that i got the tiny 2.11 that you sent me just now.
I can only say that your overall work is excellent.
Everything is just as it is supposed to be, perfect.
Tomorrow i will solder the servo and power connectors and start experimenting
Chris

AntonK
May 27, 2008, 12:43 PM
Hey guys, great addition to the build log. As a note on the 4P vs. 5H. The H models are built to have higher sensitivities, but longer start times. The 4H was better than the 4P as far as sensitivity, and the added features of the 5 series should make it all around better.

I ran paparazzi through VMware for over a year on my desktop(developing). It worked alright, however when I reformatted VMware would not run right, and made it impossible to use Debian Etch, with any X I tried. I finally gave up and made an install of Ubuntu 7.10 which I use now.

Anton

hendrix
May 28, 2008, 02:15 AM
Hi AntonK.
I found that the best way that those molex picoblade connectors can retain their wires is by soldering.
After two cables came off the molex connector and it became evident that all the cables are prone to failure at the crimping point (simply not much area for a good crimp)
i decided to remove all pins, re crimp the cables to the molex pins the best i could with pliers and then apply solder to the pin-cable joint.
Of course i used a microscope for the job and thank God my hands are steady as a rock.
Can anyone verify me the connections from the mini usb plug to the molex connector?
I read the wiki but i am still not sure where each pin of the usb jack connects to he tiny 2.11 pcb.
Here is a small how to solder them.

You will need:
1) soldering cream
2) a fine point nose soldering iron
3) VERY THIN solder (i used 1mm thick solder)
4) a microscope or a magnifier with base.
5) a clamp of some sort in order to keep the wire and pin steady.

First use a clamp to hold steady the wire not exactly horizontal
but with a 10 degree up attitude under the microscope.
Apply soldering paste to the naked wire which should be about 2mm long
and insert the pin to the wire.
Carefully with pliers squash the pin metal crimping area with just enough force in order to retain the pin to the cable insulation and slightly bend the metal around the wire naked strands .
Then apply the soldering iron to the pin where the naked wire is and apply A SMALL QUANTITY of solder to the soldering iron tip just to make it look wet, not to the pin!
When The pin and solder start to boil together and the solder gets absorbed by the wire
strands and looks like dissipated inside the pin remove the soldering iron and you are done.
After a few tests my opinion now is that this is a much better way than crimping.

Chris

hendrix
May 28, 2008, 09:08 AM
Hi.
I managed to upload the firmware and everything is going well but i need some help.
First i find it strange that not one led is flashing.
Second i can't make the connection of the tiny 2.11 to the gcs using a direct link with the FTDI cable (no modems)
I didn't connected the receiver or sensors i am just trying to get the gps data
from the tiny and get them dispayed if possible.
I would be glad if someone knows how to make the tiny 2.11 speak to the Paparazzi center using direct connection without modems.
I am reading the wiki but a lot of things are different in the configuration files and i must admit i am a little confused.
Any help welcomed although i am confident that i will find the solution eventually.
Chris

AntonK
May 28, 2008, 10:34 AM
if neither of the LEDs on the autopilot are blinking then there is no program running on it, or the program is for the incorrect AP version. Make sure you are using a Tiny 2.11 airframe(funjet1.xml) is an example in the CVS. Also after you flash the code, if you power cycle the AP you must remove the USB connection, otherwise it will go into boot loading mode.

Anton

hendrix
May 28, 2008, 11:34 AM
Hi AntonK.
It works!!!
Searching through the airframes i noticed that "tiny 2.1" in funjet.xml
and i flashed this program to the tiny after i made some modifications allowing for transparent serial communication at 9600.
It looks like i am on a good track.
I just completed a hour of testing and i noticed that the gps take its time to find the satellites.
Thank you for your help.
Chris

AntonK
May 28, 2008, 01:03 PM
Are you inside? The GPS isnt really designed to work indoors. Definitely try outdoors. You should get a warm fix inside 15 seconds when outside.

Anton

hendrix
May 28, 2008, 02:07 PM
Well it was kind of inside.
It was actually at my balcony but it is not the best spot for a gps.
Later i tried my normal gps and it also had trouble getting the needed satellites.
I also have a sirf III gps that gets a fix inside the house in no time but it is a bluetooth one.
I am sure that it will work fine although here in Greece the gps accuracy is not as good as in USA.
Chris

hendrix
May 29, 2008, 05:28 AM
Today i connected the ir sensors all 6 of them (horizontal and vertical)
performed the calibration procedure and check the signs.
I also ordered some molex pins and sockets and the new Aerocomm 2,4 Ghz zigbee 100mw
modems(although i WILL get the 900 mhz ones but for now the price is unbeatable).
I am very pleased so far and AntonK you were right, today that i tested the gps outdoors it
was up and running within seconds and the gps accuracy was ~6m
Chris

hendrix
May 29, 2008, 06:01 AM
Yet another question for anyone that knows better than me (well almost everyone :D )
The Paparazzi telemetry shows the battery voltage lower than the actual voltage.
The actual battery voltage is 12v and it shows 9,3v.
Does anybody knows where i can fix that?
Chris

AntonK
May 29, 2008, 09:39 AM
hendrix,
Its an issue with the voltage divider on the board. I believe that the wrong values got used during the process of making the Tinys. It wont hurt the board, but that scale values need to be changed in the code. Maybe bw can come by and say what he did because I know he had the same problem.

Anton

hendrix
May 29, 2008, 12:39 PM
AntonK i need to thank you for your help to my questions.
I will try to find where i can fix this issue as i code frequently for
the AVR mcu with gcc and i have experience with wrong ADC values :D
Thank you again for your help and your patience with me.
Chris

bmw330i
May 29, 2008, 02:22 PM
Hi All,

Well, I have an update to share. I have been super busy programming and shipping Tiny2.11. It occurred to me I should take notes so I did. Voltages are a good way to tell the status/health of your Tiny2.11. As things are online they draw current so I made the following observation over repeated Tiny2.11 programming steps. They should help someone tell by voltage their Tin2.11 state (unless I'm missing something important so correct me if assuming too much).

All below was collected from my readings on my Current Limited Power Supply readouts while programming about 10 Tiny2.11 recently:

State Current Draw (A) Desc.
1st Power up .06 Just powering up a Fresh Tiny2.11
with P0.14 held low .04 Programming Bootloader
with USB boot code .06 Nothing attached just new boot code
with USB cable attached .09 Ready to program via USB
with tunnel loaded .08 GPS programming with tunnel
with GPS FIX in u-center .07/.08 fluctuates between this
with funjet1.xml loaded .08 nothing connected running funjet1 code

So, it seems before programming the bootloader .06 is normal. With P0.14 held low .04...with boot code .06...after programming GPS .08. So all Tiny2.11 shipped by me should power up and draw .08 or maybe .07 if you have a GPS fix.

Regards,
BMW

hendrix
May 29, 2008, 02:44 PM
Hi David.
I am very glad that your project goes well as it seems :)
and believe me i am dying to hear and learn any additional information you might gather along the way.
Chris

AntonK
May 29, 2008, 04:28 PM
hendrix,
the place Ive seen to change it is to define a variable in your airframe called VoltageOfADC() with a coefficient in there. Do a search in some older airframes and you will find it.

Anton

PS. I would look for it but currently Im at work. Ill see what I can do when I get home.

hendrix
May 29, 2008, 05:07 PM
Hi.
I have done it already but it issues a compilation warning that says that VoltageOfADC() is redefined so i will search tomorrow to find where it is defined and how.
I am sure that i will find it eventually.
Chris

bmw330i
May 29, 2008, 05:16 PM
hendrix,
Its an issue with the voltage divider on the board. I believe that the wrong values got used during the process of making the Tinys. It wont hurt the board, but that scale values need to be changed in the code. Maybe bw can come by and say what he did because I know he had the same problem.

Anton

Anton,

I think the issue is what's posted on the Wiki is wrong then. I have checked more than once and the "default" values for the resistors are used. We simply make the "default" Tiny2.11.

Shouldn't someone note this on the Wiki? THis is what the Wiki has:
Note 1 : R13 calculated according attached ADC5 desired input level :
3.3v ⇒ 0
5v ⇒ 1.8k (default)
8v ⇒ 4.7k
13v ⇒ 10k
18v ⇒ 15K
Other ⇒ R13 = (Vin - 3.3) x 1000
Note 2 : R12 calculated according attached ADC6 desired input level :
3.3v ⇒ 0
5v ⇒ 1.8k
8v ⇒ 4.7k
13v ⇒ 10k
18v ⇒ 15K (default)
Other ⇒ R13 = (Vin - 3.3) x 1000

Maybe you could help all reading this and explain the above table values? I myself would appreciate the explanation if the "default" we use should be something else.

-BMW

hendrix
May 30, 2008, 12:50 AM
OK here is the fix of the wrong voltage indication.
Go to the Papparazzi3 directory->conf->autopilot and edit the file tiny_2_1.h
Near the end of the header file you will find the definition of the
VoltageOfAdc(adc) (0.01787.... * adc )
Now change the number in the definition from 0.01787..... to 0.0245 or whatever
gives the right voltage indication.
Use ( V(real) / V(indicated) ) * value found in the definition of VoltageOfAdc(adc).
Thats it.
Usually the adc compares the internal reference voltage, say 3.3v with the input of the adc channel using successive approximation.
For a 3.3 volt internal reference and assuming that the adc has 10 bits then
each count of the adc represent (3.3v / 1024) volts =0.00322265625 ~= 3.2mv
If we add a resistive divider at the input that divides the input voltage so we can have
a max input voltage of 18 volts then the division factor is 5.45454545455
Then each adc count will represent
5.45454545455 * 0.00322265625 = 0.01757812500146484375 which is close to what it
was in the definition of VoltageOf Adc.
I may be wrong because i did this in a hurry but it looks right.
Edited:
I found some more time and i checked the schematic so here are some more calculations:
CORRECTION: For simplicity i used 1024 BUT IT IS ACTUALLY 1023
because the adc can measure up to 1024 different input levels
0 included but the adc counter being 10 bits can count up to 1023 only.
For Vin max = 18V, V(adc_ref)=3.3v, ADC(bits)= 10 R14 = 3.3 Kohm and R12=15Kohm

ADC resolution = (3.3v / 1024) volts =0.00322265625 ~= 3.2mv

The resistor divider division factor is (R12/R14)+1=(15K/3.3K)+1 = 5.545454545454545455 which is close enough to 5.45454545455 but not quite there.
Now if we calculate the output of the voltage divider with an input of 18v by
using the formula Vout=( (Vin*R14)/(R12+R14) ) we get
Vout = (18v*3.3K)/(15K+3.3K) = 59.4/18.3 = 3.245901639344262295v ~=3.3v
(as a verification we can also calculate the division factor as
Vin/Vout=18 / 3.245901639344262295 = 5.545454545454545455)

Then if we apply what we found to the adc then
each adc count will represent a voltage of :
5.545454545454545455 * 0.00322265625v = 0.01787109375v ~= 18mv
which is what was in the VoltageOfAdc(adc) definition exactly.

The ADC count with an input of 18 volts at the resistive divider will be
( Vout / V(adc_ref) )*1024 = (3.245901639344262295v / 3.3v) * 1024 = 1007 .
Finally 1007 * 0.01787109375 = 17.99619140625 volts (almost no error!).

That shows that either R12 or R14 or the internal ADC voltage reference is off or not correctly set if there are many references to choose from like in AVRs.

Chris

bmw330i
May 30, 2008, 10:57 PM
Hi Chris,

Well, this is from the person who designed the Tiny2.11:
"Hello guys,

Please, don't change the resistors : it's useless because you can easily compute the "coefficient" used in "tiny_2_1.h" and
it's dangerous because if you use a wrong value, you can DESTROY the ADC input !!!

In " #define VoltageOfAdc(adc) ( coeff *adc) " let :

* adc = raw value of the ADC input measuring battery voltage. LPC2148 are 10bits ADCs, so the raw value in software always between 0 and 2^10 (=1023)
* Vref = LPC2148 ADCs ref voltage = LPC2148 main power supply = 3.3v
* R1, R2 = resistors made up the bridge of the battery voltage measurement system (see schematic)
o R1 between Vbattery & ADC input
o R2 between ADC input & ground

The general formula to compute the coefficient is :

coeff = ( Vref / ( 2^10 - 1 ) ) x (1 + R1/R2)

coeff = ( 3.3 / ( 1024 - 1 ) ) x (1 + R1/R2)

coeff = 0,0032258 x (1 + R1/R2)

For example :

Tiny 1.1 : R7 = 15k, R15 = 3.3k => coeff = 0,0178885630
Tiny 2.1 : R1 = 15k, R2 = 3.3k => coeff = 0,0178885630
Tiny 2.11 : R1 = 10k, R2 = 1.5k => coeff = 0,0247311828

But, it's an approximate value because of the dispersions of the components :

* resistors values (+/-1% or 5%)
* power supply (not exactly 3.3v)
* etc."

I'm at a loss what is all means specifically but in layman's terms I think it's just related to the volage on the pins on the ADC connectors. So if you have a 3.3v Gyro or sensor you want to be sure you have the correct resistor for R2 (actually none 0k). If you have a 5v Gyro you want the right resistor for that (1.8k)...by using the "default" I can use a 5v Gyro on the ADC without having to do that "resistor bridge" modification described on the Wiki. I kinda like that.

Honestly, I'd like a more simple explanation. No math just what does it mean . That you'll see a lower voltage in the GUI display? It will burst into flames mid-flight? Somewhere in between?

hendrix
May 31, 2008, 03:27 AM
Hi David.
I also computed the coefficient in my previous post and actually your post and my post say the same things.
It is very simple actually.
Since the adc has 10 bits(my mistake on my previous post, i meant 10 bits not 12) then it can count up to 1024 different voltage levels 0 included.
(I intensionally used 1024 not 1023 to avoid confusion)
The adc when it measures the voltage it compares it with its internal reference which is 3.3 volt in our case.
If the input voltage is say 3.3/2= 1.65v the adc will count 511, if it is 3.3v it will count 1023, if it is 3.2mv will count 1 and in other words each count of the adc counter corresponds
to 3.3Volt / 1023 ~= 3.2 mv
The adc input voltage cannot be more than the reference voltage because the adc cannot count more than 1023 and a bigger input voltage will burn the adc input.
That's where the resistor divider come in.
If we don't use a resistor divider we can only measure up to 3.3 volts and a higher voltage not only cannot be counted but it will burn the adc input and probably the whole adc.
With a resistor divider we can measure higher than 3.3 volts but we have to make sure that the voltage at the adc input pin (at the chip) will never exceed 3.3 volts by selecting a division ratio high enough that the output of the voltage divider with the max expected input will never exceed 3.3 volts
For example a 5v gyro will be able to vary its output voltage from 0 to 5 volts
but 5 volts at the adc input pin is not acceptable so we have to use a voltage divider with a division ratio of 5/3.3=1.5151515 or higher thus
1.515515 = R1/R2 +1 => 0,515515= R1/R2 => R1=0.515515*R2
We choose R2 first and then we compute R1 and if the value of R1 is not commercially available we choose the next higher value R1 and recalculate the
division ratio or we choose a different R2 so we can find close enough
commercially available resistor values and recalculate.
The value of R1+R2 should be high enough not to load the source's (Gyro output) internal resistance much which should be given from the Gyro manufacturer's datasheet (usually a R2 between 1 and 10 Kohm is acceptable).
The Gyro datasheet should state something like "max output voltage @ 1Kohm"
or state at which load resistance the output voltage was measured or calibrated. This resistance is the value of R1+R2.
With the use of a voltage divider at the adc input, each adc count will represent
3.2mv * the voltage division ratio which is R1/R2 + 1.
R1 is the resistor of the voltage divide that is connected to the + side and R2 is the resistor that is grounded.

Finally we have that each adc count will represent a voltage at
the resistor divider input of:
3.3v / 1023 multipled by R1/R2 +1 and the result is the adc coefficient.
Chris

bmw330i
May 31, 2008, 10:49 PM
...lol...that's awesome. Really. You did try. But that's still a lot of Math. Not that it's past me. I just am missing the black and white part of this.
My immediate issue is: Does something need to change with the Tiny2.11 to correct using the default resistors or not? If so I wish someone would correct it and post the new values to the Wiki.
When I send the parts to get them assembled I make no modifications. Whatever the Wiki and design states is what gets assembled. So, if the design has a flaw so will the finished assemblies. Our company simply provides the service of taking the design and having it assembled. So, I'm concerned not for just me but everyone.
Please, no Math. Just does the design need to be modified or no? If so please email the list so the designer can modify his design.
-BMW

hendrix
Jun 01, 2008, 12:55 AM
No David don't worry, you don't need to change anything since we can tweak the coefficient in tiny_2_1.h and get the correct result.
It works very well this way so you don't need to change anything.
I am very pleased by the quality of the tiny 2.11 board and i find it very reliable.
At last there is an autopilot that works and it doesn't cost a fortune...
Of course this is my opinion.
Chris

bmw330i
Jun 01, 2008, 02:16 PM
Ok, cool, thanks. I know how to do that edit to the library file. I will post the specific edit for my project when I get around to editing it. Would be interesting if everyone posted their value so we could see the range of values. Maybe there is a "default" value that could be used.
Well, today is Sunday and I vowed to get some building done. I need to take some new photos as well of the FunJet as it is. I'll do that then post up an update.
-BMW

bmw330i
Jun 05, 2008, 08:51 PM
<snip>

bmw330i
Jun 06, 2008, 12:08 AM
I owe this thread an update. I spent the last week simply trying to get the next order for 100 of the Tiny2.11 placed.

The whole reason for my opening a business was to help people get Paparazzi hardware so that takes a priority to my own Hobby/Build of our Funjet. Soon as everyone is taken care of then I get back to the build. Just want to make sure everyone gets treated like I would want to be treated.

Tomorrow AM I promise to take the FunJet out and snap some photos though. I'm also notified that the LEA_5H may not work with the default Paparazzi code so I'm looking into that. The LEA-5H is so sensitive it gets a fix indoors before I even put the antenna on...for comparison an LEA-4P will not get a fix even with an antenna. So, I'd like to only use the LEA-5H if possible...so tracking down that info now. I will update as I learn about this.

bmw330i
Jun 06, 2008, 01:57 AM
Ok,

I did a "grep" for POSLLH in the code...I found only one file with reference to it: gps_ubx.c
I belive this is the code:
void parse_gps_msg( void ) {
if (ubx_class == UBX_NAV_ID) {
if (ubx_id == UBX_NAV_STATUS_ID) {
gps_mode = UBX_NAV_STATUS_GPSfix(ubx_msg_buf);
#ifdef GPS_USE_LATLONG
/* Computes from (lat, long) in the referenced UTM zone */
} else if (ubx_id == UBX_NAV_POSLLH_ID) {
gps_lat = UBX_NAV_POSLLH_LAT(ubx_msg_buf);
gps_lon = UBX_NAV_POSLLH_LON(ubx_msg_buf);
latlong_utm_of(RadOfDeg(gps_lat/1e7), RadOfDeg(gps_lon/1e7), nav_utm_zone0);
gps_utm_east = latlong_utm_x * 100;
gps_utm_north = latlong_utm_y * 100;
gps_alt = UBX_NAV_POSLLH_HMSL(ubx_msg_buf) / 10;
gps_utm_zone = nav_utm_zone0;
#else
} else if (ubx_id == UBX_NAV_POSUTM_ID) {
gps_utm_east = UBX_NAV_POSUTM_EAST(ubx_msg_buf);
gps_utm_north = UBX_NAV_POSUTM_NORTH(ubx_msg_buf);
uint8_t hem = UBX_NAV_POSUTM_HEM(ubx_msg_buf);
if (hem == UTM_HEM_SOUTH)
gps_utm_north -= 1000000000; /* Subtract false northing: -10000km */
gps_alt = UBX_NAV_POSUTM_ALT(ubx_msg_buf);
gps_utm_zone = UBX_NAV_POSUTM_ZONE(ubx_msg_buf);
#endif

Shouldn't be too difficult. I'm hoping Anton or someone from Paparazzi can chime in here. I think since the LEA-4P will EOL (End of Life) at some point why not at least get the LEA-5H working right? I know the LEA-5H module is popular and I have requests for LEA-5H Tiny2.11.

I will try enabling it myself...as always will report what I find.

small_rcer
Jun 06, 2008, 02:26 PM
The code appears to check for the ID string of the GPS data stream. Once you find the version of data stream, and / or set the LEA-5H to a specific data string format permanently, it appears that much of that whole subroutine could be eliminated.

To maintain compatibility across multiple GPS data types this appears to identify the type of data string and then return the results of parsing that string. ( or set the values up in variables that are used elsewhere.) If it was mine I would lock the GPS in a specific mode and delete all the code that references alternate data string types. I am not keen on redundant code that does not get accessed.

Possibly a header file or compile time option could be used to specify the GPS type so only the code for the specific data string parsing would be compiled into the finished code. Doing this throughout the code for various options such as FMA co-pilot Yes or No, and other optional components could make smaller and tighter executable.

Just a consideration.

Jim H

danstah
Jun 06, 2008, 04:45 PM
I believe the LEA-5H works with PPRZ by default you just cannot use the LEA-4P configuration file on the wiki. You need to follow the directions on the wiki and do the settings manually. I distinctly remember reading this in the mailing list

bmw330i
Jun 06, 2008, 05:40 PM
I believe the LEA-5H works with PPRZ by default you just cannot use the LEA-4P configuration file on the wiki. You need to follow the directions on the wiki and do the settings manually. I distinctly remember reading this in the mailing list

Well, yes, true, that is my experience. I did a manual config then saved it so for LEA-5H boards I just upload that LEA-5H file. When I flash in the funjet1.xml file/program and cycle the power the red-led does flash as usual...but that's as far as I have gone.

I suppose I need to just pug in an XBee Module, fire up GPS and see what shows in the display don't I? Ok, I have an LEA-5H Tiny2.11 now in the shop...I have some new v2 (200mW) XBeePro modules I need to test out anyhow...

Now if GCS shows GPS info then can I assume it does work? Is there some other test(s) to run?

-BMW

jszeto
Jun 06, 2008, 06:37 PM
This is my build thread. Please advertise your site in your own thread or the vendor forum.

Explanation: Jeffrey owns that site in that URL so basically his contribution here is trying to make a buck.

Sorry man, No offense! I should not be posting the link then! Also, buck doesn't goes into anyones pocket. Fund are setting up a project learning charity, for everyone, especially youngster! If you care to know.

For Papa Project: the more hardware availability, the better, mature & stronger this development will go, If you agree with me.

I will try to put contribution rather, links ! ok

Nice talking to you! have a rewarding day!

Jeffrey

danstah
Jun 06, 2008, 06:52 PM
Yes if you connect it via the xbee modem and its gets gps and everything is good then it should be fine... Also you could use the ftdi cable to look and see if the gps is good

bmw330i
Jun 06, 2008, 09:04 PM
Yes if you connect it via the xbee modem and its gets gps and everything is good then it should be fine... Also you could use the ftdi cable to look and see if the gps is good
Cool, you mean FTDI to one XBee then plug the other into the Tiny2.11. I have this dongle that lets me plug an XBee into it then I plug that into a free USB port...same thing really. I was going to see about getting more to put on the web store but I doubt anyone would be interested. Surveyor is the source.

danstah
Jun 07, 2008, 12:32 AM
No sorry i mean you can plug the ftdi straight into the board as if you were flashing the gps or the usb tunnel. Then set the proper baud rate (the baud rate you flashed the tiny board with) in the control_panel.xml and finally start the gcs, the link, and the server and it should work like a charm.. Have done this many times and it works great and saves the hassle of have to set up the wireless link...

Here is my code that i use to launch the ground station:
<session name="Ground Control">
<program name="link">
<arg flag="-d" constant="/dev/ttyUSB0"/>
<arg flag="-transport" constant="pprz"/>
<arg flag="-uplink" constant=""/>
<arg flag="-s" constant="38400"/>
</program>
<program name="server"/>
<program name="messages">
<arg flag="-c" constant="telemetry:*"/>
</program>
<program name="gcs">
<arg flag="-speech" constant=""/>
<arg flag="-mercator" constant=""/>
<arg flag="-ref" constant="WGS84 41.821007 -111.986436"/>
<arg flag="-center" constant="WGS84 41.821007 -111.986436"/>
<arg flag="zoom" constant="0.75"/>
</program>
</session>
</section>
</control_panel>

Also when you flash your tiny your gonna want to use this in the airframe config to be able to use the above code:
ap.CFLAGS += -DTELEMETRY_MODE_FBW=1 -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DPPRZ_UART=Uart0 -DDATALINK=PPRZ -DUART0_BAUD=B38400
ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c

bmw330i
Jun 07, 2008, 04:09 PM
Well, using the XBee I see this scrolling across the messages window in Paparazzi Software:
safe_bind (NAV_STATUS): Invalid_argument("utm_sub: 31 59")
safe_bind (NAV_STATUS): Invalid_argument("utm_sub: 31 59")
safe_bind (NAV_STATUS): Invalid_argument("utm_sub: 31 59")
safe_bind (NAV_STATUS): Invalid_argument("utm_sub: 31 59")
safe_bind (NAV_STATUS): Invalid_argument("utm_sub: 31 59")
safe_bind (NAV_STATUS): Invalid_argument("utm_sub: 31 59")
safe_bind (NAV_STATUS): Invalid_argument("utm_sub: 31 59")
safe_bind (NAV_STATUS): Invalid_argument("utm_sub: 31 59")

It just repeats over and over...

Anyone know what that message means?

danstah
Jun 07, 2008, 04:12 PM
I remember seeing it before but i cannot remember why... Maybe you should send that to the mailing list

bmw330i
Jun 07, 2008, 04:23 PM
Well, I can try. Something is messed up with the list and my email. All the emails get bounced as invalid account.

I'll go search the list archives now...

danstah
Jun 07, 2008, 04:53 PM
Do you want me to post on the mailing list for you?

bmw330i
Jun 07, 2008, 06:11 PM
Well, only if my post fails. I tried again.

I also took an LEA-4P based Tiny2.11 and loaded the same code...with the same results...hmm...

I'd still like to know what that message is...

-BMW

bmw330i
Jun 07, 2008, 06:47 PM
Well, I'm at a loss here. Likely totally simple but I'm not seeing an easy answer.

The issue: How do I setup a flight plan so I see my house in the GCS not that demo site that's the "vanilla" flight plan?

I have the GPS working with the LEA-4P board. It seems that message is around until you get a valid GPS fix. It stopped when the GPS finally saw 4 satellites and got a 3D fix.

...ok, sorted that out. The Wiki is pretty good ... even I am surprised as I go there I still find what I'm looking for. Here's what I did.

1. Loaded the "Tunnel" and used u-center to get my exact Lat, Long, Alt values. Wrote them down.
2. Went into the paparazzi software and opened a new flight plan, then used the lat, long, alt values I wrote down to set that as the long0, lat0 and alt values.
3. Then a "Clean", "Build", "Upload" into the Tiny...( the 5H one this time).

Now my problem is something that bugs me. To get the nice maps in the GCS you have to load the images from Google ... who very very quickly these days bans your IP address. I can't get a single image and I"m banned. So I can't verify what I just did worked.
Here is how you can tell you're banned:
safe_bind (NAV_STATUS): Invalid_argument("utm_sub: 31 59")
403 Forbidden
16:20:39 ERROR 403: Forbidden.
That's scrolling across my screen...
Nice. Now if only there was a way to use other images...time to check the Wiki again...
-BMW

danstah
Jun 07, 2008, 06:59 PM
So did you get the message to stop with the lea-5h

Tuner
Jun 07, 2008, 07:07 PM
Ok Ill admitt it I just skimmed this post as I was very happy somone was doing this.
I had intened to do a run of 10 - 100 5 tinny 5 classix or more...

I am still planning this but not for another 6-8 months.

Do you have any Units that I can purchase I would like to buy one or more while I still have money as I start school (U of A) in August and will be broke.

Also if you have time I could really use some advice on preparing the CAD files for the fabricators. it would save me many hours research as I have never worked with PCB cad programs before only mechanical.

Thanks
Scott

bmw330i
Jun 07, 2008, 07:22 PM
PM me...basically ... yes. Just let's take it offline or go check the Wiki under "Getting Hardware" ... I'm PPZUAV.