TWOG = Tiny With Out the Gps .... Date 29/06.2009
Well this weekend I Worked on the Hardware. It really amazed me how small these Paparazzi unit really are .. THEY SMALL ... Anyway , I placed all the componets on a stick to make sure I do not short things out ....
Plugging the cables in is really a no brainer , I used this .....
The page is here http://paparazzi.enac.fr/wiki/Twog_v1
Ahhh you say , that all good and well , mmm , My first question was , where do you power it up ? Well there is two pins on the TWOG , can't miss them , Check the back of the board , on it there is a + and - , I suggest you make sure you always put that in correctly , not sure if TWOG has protection for reverse polarity ...?
What Voltage , Currently I'm using a old flight pack , I think I read somewhere it can go up to 15V and 2,5A , but don't take my word on it , remember , read you must ! See + and - in picture !
As I power the TWOG up I got some lights flashing at me !! oohhh is that bad ? , well after some more reading I realize and I think CheBuzz supplied the unit loaded with the Demo Program that light up all lights ... It's ALIVE .... !
Then I Pluged the USB cable in and promptly got confused ! ? ! ?
Okay now what ? , well all the reading say you must be able to see the USB device loading in DMESG and actually getting some feed back as its pluged in ...NOT !!! I did a dmesg | tail -f (do this in terminal/konsole in Ubuntu) and saw nothing when I pluged unit in ... IT IS NOT WORKING grrrr ! .......(in hind sight , I should probably look at /var/log/messages also , so tail -f /var/log/messages)
Lets try this ....I plugged USB in first then powered up TWOG, no lights ! oh heck .....nope , no wories ...nothing smelled bad , nothing burned ....
And took a change , I did , I opened the GCS and went through the motions to upload a funjet , must be this one , it is for the Tiny version 2 , acording to reading this one will work on the TWOG as well ... the code I got back after upload ...
Found USB device
BootROM code: 2.12
Part ID: 0x0402FF25 (LPC2148, 512k Flash, 32k+8k RAM)
BootLoader version: 1.3
Want to Learn more about Linux --- Check out SCLUG --- South Coast Linux User Group
HEY IT WORKED ! I now only have one red light flashing ... !
Check out this page http://paparazzi.enac.fr/wiki/Compiling, be carefull
though , do not just follow blindy , If your TWOG and GPS is preloaded with
Firmware you do not need to follow all the steps.
Okay , here is a beter step for step ( I think )
If you want to program the TWOG with new Airframe,Radio,Flight Plan etc you need to :
Power off TWOG.
Plug in USB PC side , then into USB connector on TWOG (Not FTDI) .
Power Up TWOG , NO LIGHTS WILL FLASH , you are in Programming mode , Check tail -f /var/log/messages , you should see some USB messages.
In GCS Select Aircraft you want to Upload , Clean , Build , Upload , Make sure you have selected your session to be Flight USB 9600 ...
If all goes well after a while the red light on TWOG should start to work, in Paparazzi Center you should somewhere see the code looking like this:
Starting software at 0x00004000
Disconnect the usb cable, powercylce the unit - Red LED should flash again .
There , That's it you uploaded your Airframe , flightpalns etc ....
Now I wanted to see the unit actually doing something in the GCS ...For this I need the Serial cable to FTDI(USB) ... ahh but how do I wire this up .....
TWOG = GND to FTDI = GND(BLK)
TWOG = 3.3V to FTDI = 3,3V
TWOG = RX to FTDI = TX
TWOG = TX to FTDI = RX
Above the WRONG wire connection. I was supplied with wrong wire connection on Picoblade side.., after a short e-mail with CheBuzz it was recommended I Pulled the wires out of Picoblade and reattach correctly according to Schematic of TWOG ( on top of this page).Well this worked ...
Step by step Connecting USB, FTDI and actually seeing it working in GCS:
Power TWOG down, OFF.
Plug USB > FTDI > Serial cable in.
In my case the Red light starts to go on and off on TWOG , I assume it gets power from USB , I also assume that this is correct . (Someone Correct me )
Then Power on TWOG . With 12V+ Source .
Your GCS should still have been open after last upload .
Now Click the Execute button.
In the GCS look to see if our Sensors are working , move your finger in front of each one , in the PFD section you should see reaction to this ...
REMEMBER , The plane will turn in the direction of the earth (the Brown part) so turning right will bring the brown earth up in the right .....and more blue sky in the left ....
(There is a few descriptions on how to do this , I followed it and basically worked it out ...)
NEXT PROBLEM !! , yeah no one said this was going to be easy !
The GPS is not working ......Well I can tell you it took me three days to figure this one out and eventually in RC GROUPS I came across this. Please remember to each his own , this might not be your problem and then again this might also be your solution .....
IF YOU HAVE TWOG V1 or I think Tiny v2.11 do this ...In your Airframe file you need this replacing old tiny_2_1 If you do not the battery voltage won't be reported correctly:
CONFIG = \"tiny_2_1_1.h\"
Also this need to be added , commenting out old part (Comment out with #):
ap.CFLAGS += -DGPS -DUBX -DUSE_UART0 -DGPS_LINK=Uart0 -DUART0_BAUD=B38400 -DGPS_LED=2
ap.srcs += gps_ubx.c gps.c latlong.c
Note the LED=2 part , I added that so I can actually see the GPS getting a lock , this Green LED will start to flicker on/off ... COOL ! A few things about above , I had conflicts in build with UART 1 , after moving Transparent protocol UART to 1 and GPS UART to 0 all compiled okay. (Thanks to bmw330i David on RCGROUPS for this above solution)
Upload , restart and check !!! YES YES it's working ...... Everything currently is wrong though ...need to CALIBRATE !!!!
TWOG on a Stick , Using Velcro to keep them on , Note Switch to make ON/OFF easier. . From Left > HorzSensor , VertSensor , LEA-5H GPS , TWOG , USB Connector , FTDI Serial USB Conector , Switch and Old 3 Cell LiPo Pack.
These pages helped alot with above
rcm radio control models futaba jr paparazzi uav twog tiny aeroplane south africa margate port shepstone kwa zulu natal rc r/c samaa gliders electric engine scale model aircraft hobbies edge cherokee piper plane chebuzz pprzuav gps club flying slope soaring float fly airshow jet aerobatic pylon aerotech airfix airtronics astroflight atlas axi apc castle creations coverite du-bro dumas dynaflite fma revolectrix flightpower globee cg carl goldberg great planes gms grp gws hitec hobbico balsa jtec kontronik magnum master airscrew multiplex nitro novak o.s os revell robart sanyo sig sullivan super tigre smc tamiya orion teken thunder tiger top flyte traplet trinity venom deans x-acto zap stik