Jordi Muñoz's Posts (87)

Sort by
Developer
I been working on this project for about a year, but i never had the time to finish it. Is very difficult go to the field with your bulky laptop all the time, not to mention that you can damage it and the battery life is to short (the sun on the screen don't let you see anything). So i spent some time using Olimex development board with the Atmega128, but i want it to make it simpler, open-source, bigger screen (with back light) and Xbee compatible. So i come to this:

-Atmega328 at 16Mhz with Arduino Bootloader.-XBee Socket and 3.3V powered (I've included some holes near to the antenna so you can hold it with a strap) .-Can be powered with 2 and 3 cell LIPOS (diode protected and regulated).-Huge 4 line screen with backlight, very clear under the sun! (2 pots to control the backlight and contrast).-FTDI port to upload code, also the boards is ready to be programmed with XBee (using this trick).-Six button to navigate and change screen and options.-Very noisy buzzer that can be used to alert you when it has low battery or low altitude.-6 I/O analog pins available, including the I2C port.-2 powered SERVO OUTPUTS (Tilt & Pan) than can be used to control a directional antenna (NICEE!).-Extra 3.3V and 5V volts outputs.-Status LED's.-The software is ArduPilot compatible and Open Source (out of the box).

What you can do:-Portable Telemetry.-Send commands (Ardupilot mega).-Robotics.-Remote control robots, can be used with Wii NunChuck to send commands.-Smart toaster's and dishwashers. (I use it to control my reflow oven).

The cost would be around $57dlls. 17 units will be ready in the next 10 days. Any orders?Has no official name, but for now is ArduStation (Later i will release the ArduToilet, LOL). The pictures only show the first prototype, that have some minor mistakes like the holes to close to the edges, i didn't include the reset button and the 5V power regulator get pretty hot (when 3 cell lipo is attached), so i change it to the big ventilated version. All this is fixed in the release version. I still working on the software.

Read more…
Developer

Wiring up uBlox! (Only for PRO's)

Hello again! I'm not so good making intros, so imagine you just read a long and well redacted introduction of why uBlox (the best GPS ever) is so difficult to find and interface with (Specially the SparkFun version). So let's go to the point. ;-)If you are beginner please don't try to make this.Fallow this pictures in order to make the wiring (hurry!):

And this is an example of how to connect it to ArduShield, but you must configure the unit first! So continue reading for instructions.

You will need to configure uBlox module using U-center, only have to do it once, the settings will remain in the EEPROM forever. Download U-center from here and install it:http://www.ublox.com/en/evaluation-kits/u-center/u-center.htmlMake sure you supply the unit with 3.3V and interface it using the FTDI cable. When you are able to see real time data with U-center, you are ready to proceed. Click here for a u-Center user guide.Now UBX has 8 Message Class, we only use "Class 0x01" called "NAV":

Each class has "Messages ID's", we only need 3 ID's of "Class 0x01", the ones marked with blue:

If you need more information about uBlox protocols please download this uBlox_Protocol_Specification.pdf.Everything else must be disabled. Now that you know what we are trying to do, lets go with a more detailed instructions:Go to Message View by pressing F9 (menu View->messages view):

(I'm using Paparazzi instructions but modified).1. Right Click on the NMEA Text on top of the tree and choose disable child messages2. Choose UBX->CFG->NAV5(Navigation 5) - set it to use Airborne 8 <4G. This tells the Kalman filter to expect significant changes in direction.Note that this setting is only good for faster moving airplanes. For a fixed position hovering heli, 'pedestrian' setting is better3. UBX->CFG->PRT - set USART1 to 57600bps4. Change the baudrate of U-Center to 57600bps if the connection is lost at this point5. UBX->CFG->RATE(Rates) - change the Measurement Period to 250ms This gives a 4 Hz position update since 4 x 250ms is one second.6. UBX->CFG->SBAS : Disable (SBAS appears to cause occasional severe altitude calcuation errors)7. UBX->NAV (not UBX->CFG->NAV): double click on POSLLH, STATUS, VELNED. They should change from grey to black.8. UBX->CFG->CFG : save current config, click "send" in the lower left corner to permanently save these settings to the receiver.You are done!! Now plug the GPS to your ArduPilot and fly like a PRO ;-)[UPDATE:]Another great way to do it:

3689318405?profile=original

3689318329?profile=original

Read more…
Developer

Unofficial ArduPilot 2.2 Release

This version has many additions, including the support for three different GPS protocols (SIRF, NMEA and UBX) and can be added as many are possible.Has the well integration of the pressure sensor and battery level conversion with an offset for the ADC voltage to increase accuracy in the conversions.Has been debugged using the ArduPilot Shield. So it should be 100% compatible.The rest of the code stills the same as 2.1.To change the GPS protocol looks for this definition: “#define GPS_PROTOCOL“. Next to it I have included some commands for Locosys and SIRF GPS. So you can use them as needed (just trying to save you some time).The Ground Station now has the battery level indicator.This code is a just a Beta, demo, preview, not official release , I never air test it (use it at your own risk). The goal is that you can start digging into it and report any bugs before releasing the official version. We are only trying to involve more the community on this. ;-)Be advice is not easy!Other notes:When you power up the ArduPilot try to open the Terminal and see the message at the beginning saying something likes this:"Pressure offset: 205"You should go and place this value in the declaration of the air_speed_bias variable, like this:int air_speed_bias=205;In order to zero the airspeed sensor. All the pressure sensors have different values.I know "bias" is wrong. ;-)Files:ArduPilot_EasyStar_V22.zipGroundStation_Alpha2.zip[UPDATE: I forgot to compile the EXE, sorry about that]:GroundStation_Alpha2_EXE.zip
Read more…
Developer

ArduPilot Shield Assembly Instructions

Here are some instructions and suggestions to assemble the ArduPilot Shield. But remember: You can always do it your way. You can buy a complete kit here.

First i recommend to solder the headers (either female of males) in the Ardupilot board, do not matters if you put the females header on the shield or in the ArduPilot board. I personally recommend to put the female headers on the active board, in this case ArduPilot. If you have male pins and you make contact with something you may cause a short circuit and toast it, otherwise with the female headers the board is "protected".

After soldering the headers on the Ardupilot board, place the opposite headers on top of it as indicated in the picture. In this way the pins will be right aligned and you will be able to remove it easily.

Then place the ArduPilot Shield on top and solder it. Be careful of not add too much soldering or the liquid solder may go to the button and you will be unable to remove the shield (happened to me once!)

Ready? Come on hurry! The result is a nice and well aligned shield. ;-)

Now you can solder the pins for the FTDI connector. Remember you can buy the official FTDI cable in our store, here. Has a long cable and is very practical on field when you are testing.

Now get some servo extensions like in the picture. You can buy them in our store too here

Now cut them slowly and painful, no mercy please! You will use both ends later.

Now solder the female side of the servo extension to the board. This connector will go to the receiver. I recommend to cut them as short is possible to void the big ball of wires inside the airplane. I personally like to remove the Power and Ground cables to the other connectors, leaving just the signal to eliminate the "big ball of wires", or at least leave two with Power and Ground to add some redundancy.

Now turn the Ardupilot and solder a jumper wire from "digital 8" to the "mux3", in order to enable the throttle control!The color of the wire is your choice, white looks nice with SparkFun logo. ;-)

Did you remember the redundancy thing? Well i extremely recommend to add hot glue or something to holds the wire in the bottom of the board. The everyday use will fatigue the wire and eventually will broke. I have learned this the hard way. One day the receiver rudder cable failed and i was unable to manually control it (i was flying!!!!), i was expecting to finally lost my EasyStar forever and definitely jump to Funjet and never came back, but the Autopilot was working fine, because the failure was from the receiver to the multiplexor. Anyway, i just switch to RTL mode and EasyStar was flying around me and luckily at that time i was controlling the throttle manually so i cut the throttle and ArduPilot land the EasyStar nicely. Chris once mentioned: that the human variable is the problem.

Now is time to solder the Infrared sensors. This is up to you and you can use anyway you want. In my case i developed a custom and redundant cable (locked!).A little bit of help with the FMA sensors:

The "Only For Girls" pin is not used.

You have a picture of the complete cable here with the FMA connectors. ;-)

Now take the other end of the servo extension and cut one cm of the power line (red wire).

Solder it in digital pin 6, this will be used as the "Remove Before Flight Plug" used to set home position. You can use any bind plug like this one or make you own (Also available soon).And you can also add any external reset button as indicated in the green arrow. Also available soon in our store.

Now an extra precaution: Please zoom the picture and look the silver hairs at end of the connector. This is a potential threat! You must cut that little metal hairs, if not you may burn your boards! I also learned it the hard way. ;-)

You can add now the Power Divider Cable, in order to know the voltage of your battery, this cable must be connected in the positive pole of your LIPO.And finally you can use a servo connector to plug your radio modem. That's what i did! This way is to noisy, modems require a lot of current, it will work but can cause some problems. I suggest to feed the radio modem with a direct 5V lines not coming from the GPS ports.Here you can get 5V for the radio modem:

Schematic:

[UPDATE]: The IR port labels are wrong, they suppose to be A0,A1,A2,5V,GND.[UPDATE2]: Assembly pictures of ArduShield V2 can are here.Good Luck!
Read more…
Developer

ArduPilot Shield Power Divider Theory

Today i started to write the theory+tutorial of Ardupilot and Ardupilot Shield. This is the first text. I will try to release more texts describing all the stuff involved in this little baby. My goal at the end is to join all the papers and make the mega manual, very well edited and revised for everybody.This is the first paper describing how the voltage divider in ardupilot works:Ardupilot_paper_preAlpha.doc[UPDATE] You can thrust in my word documents. No virus... ;-)[UPDATE] A better version well structured here (Thanks to Sarel P. Wagner )
Read more…
Developer

DIYdrones Store is Now Open!

Today is a great day! finally we had setup the little e-commerce and stocked it with a few products. Be advised! The page still have some little bugs!After making a payment, paypal will return you to the preview store page, don't worry about that, at that point you order has been sent.And the Store URL is................... this:http://store.diydrones.comHaa! I need to sleep now, was an unsigned long long day; Feel free of buy everything you need. ;-) More products coming soon!Good Night!
Read more…
Developer
The latest ArduPilot Fail Safe firmware V1.6 includes a state of the art system to detected if we have glitches or bad signal, triggering the RTL and avoiding undesired "Remote Resets".How it works?Well, the first part is just a low pass filter that works only when switching to autopilot, this prevent undesired toggles to autopilot mode when the signals becomes "noisy" and also avoiding undesired resets (the system mistakenly thinks you are toggling the switch).The second parts is a "Valid Pulse Width Checker", this is a very simple code that will increment a counter every good pulse received, if the system receive 75 valid frames (by default) it will thrust the commands we send through the remote control, otherwise will trigger RTL, and reinforces the prevention of undesired "Remote Resets" caused by noise.Of course the latest code could be found in the same place as always, here.The Attiny has been tested only on ground with my 72mhz Futaba and two different receivers, after confirmation i will remove the beta tag, and i will try convince Nathan to flash it on the SparkFun boards, in the meantime you can try it with your AVR programmer. ;-)Whats next?Well right now I'm working on the new ArduPilot firmware code name "Hybrid", will support NMEA, SIRF , uBlox UBX and VENUS 10HZ GPS protocols, on the same code, and you can switch between them by just changing a single variable, bad news, only works on 328. =P
Read more…
Developer
Finally! took me some time fix this. But for some reason the new bootloader of the Atmega328 is running at 57600bps (Hoo! that means the uploading time is a lot shorter compared with AT168), so i had to add the option to select between atmega168 and atmega328 as is illustrated in the picture above or right.Of course the latest file can be found here.Please report bugs, is normal that the upload/downloading procedure fails sometimes, but not so often...In the near future, the app will include:-Save and Load missions from the hard-drive (do you like .adp as extension?).-A better way to add waypoints.-Choose the desired speed for each mission.-And many more...Enjoy!
Read more…
Developer

ArduPilot Shield Demo

I few days ago i received the first prototypes of the Ardupilot Shield. Right now they don't have silkscreen to reduce the prototyping costs, but the commercial version will do..Main goals:-On board 3.3V power regulator.-Disable the GPS before uploading new firmware automatically.-A lot of pins headers to easily attach sensors with power supply included.-Special connector for 3.3V GPS modules (including the TTL conversion).-Pressure sensor, with low pass filtering, for AirSpeed...-External reset button.-Mirrored status LED,s...-Optional power divider (analog 5) to measure battery level.

[Infrared connector at the bottom]The cost without the sensor will be around $20 dlls at beginning, soon if i order bigger batch's i can reduce the price.My ideas is to make 100 units without the pressure sensor, and another 100's with the pressure sensor (around $30 dlls price tag)... Stay tuned for more news..You can give a look to the diagram here:

[UPDATE]: Auto turnoff is not working properly on 3.3Volts GPS, so i will need to make some changes.
Read more…
Developer

Ardupilot 2.0.1 Released

Main changes:-Solved compatibility issue with Arduino IDE 14 and 15, (thanks very much Arduino Mega).-Z Sensor support (extremely recommended, otherwise you will fly strange).-An small Ground Station based in Labview to play with ;-)...And can be donwloaded from here.The problem with the Ground Station is that i can't compile it, but you can run it if you have Labview installed. Later i will release the EXE.It includes a better virtual horizon and displays Speed, Altitude, Climb rate, Heading, Bearing and show the aircraft position in real time using Google Earth.What you need:-Any radio modem (XBEE) running at 57600bps.-Labview 8.6 installed.-Run the file "groundtest.vi".-Select the port number, then click open and enjoy!(You can try it with the FTDI cable if you don't have radio modem).Note: This ground station is same I'm using right now to debug the new ArduPilot firmware 2.1.Ground Station download click here.[UPDATE: The Ground Station for Labview 8.5 please Click here]Be ready for the next release of ArduPilot firmware, the version 2.1, that will include:-Diagonal X Sensors.-Throttle Control-AirSpeed Sensor Support[Warning: You need Arduino 0015 or higher in order to use this firmware]
Read more…
Developer
Since i got my new 2.4ghz spektrum radio (I FALL IN LOVE) i always wonder how the daughter receiver send data to the mother, maybe PPM? mmhh not! With a little help of an oscilloscope i started to reverse engineer the protocol used, well i saw only steady digital signal with lows of 8.6 useconds, that responded to the movements of my radio, so i quickly realize that is some kind of serial communication, and i did the calculations (1000000us/8.6us=116279bps) and i thought that maybe the serial speed was 115200bps. So i attached my FTDI cable and start analyzing the data, and i got this:Spektrum daughter board is sending 16 bytes of information using a serial com. running at 115200bps. As you see in the picture above, the two first bytes are the preamble or sync bytes (0x03, 0x01). The data comes in integers that response precisely in the order is labeled in the picture...So Paparazzi users this is a way to switch 2.4ghz (only in American), the back of my Specktrum radio says: "NOT FOR USE IN EU", uuh!I hope somebody can do something usefully with it, enjoy!
Read more…
Developer

New ArduPilot Pocket Navigation Algorithm

For months i have been slowly investigating and "developing" an accurate, efficient nav code (for slow power 8-bit uControllers), finally i just finish my new navigation algorithm, is super faster and smaller.... =).Before the functions were like this:int get_gps_course(float flat1, float flon1, float flat2, float flon2){float calc;float calc2;float bear_calc;float diflon;//I've to spplit all the calculation in several steps. If i try it to do it in a single line the arduino will explode.flat1=radians(flat1);flat2=radians(flat2);diflon=radians((flon2)-(flon1));calc=sin(diflon)*cos(flat2);calc2=cos(flat1)*sin(flat2)-sin(flat1)*cos(flat2)*cos(diflon);calc=atan2(calc,calc2);bear_calc= degrees(calc);if(bear_calc<=1){bear_calc=360+bear_calc;}return bear_calc;/********************************************************************************/}unsigned int get_gps_dist(float flat1, float flon1, float flat2, float flon2){float dist_calc=0;float dist_calc2=0;float diflat=0;float diflon=0;//I've to spplit all the calculation in several steps. If i try to do it in a single line the arduino will explode.diflat=radians(flat2-flat1);flat1=radians(flat1);flat2=radians(flat2);diflon=radians((flon2)-(flon1));dist_calc = (sin(diflat/2.0)*sin(diflat/2.0));dist_calc2= cos(flat1);dist_calc2*=cos(flat2);dist_calc2*=sin(diflon/2.0);dist_calc2*=sin(diflon/2.0);dist_calc +=dist_calc2;dist_calc=(2*atan2(sqrt(dist_calc),sqrt(1.0-dist_calc)));dist_calc*=6371000.0; //Converting to meters, i love the metric system.. =)return dist_calc;}Now are like this:int get_gps_course(float flat1, float flon1, float flat2, float flon2){float calc;float bear_calc;float x = 69.1 * (flat2 - flat1);float y = 69.1 * (flon2 - flon1) * cos(flat1/57.3);calc=atan2(y,x);bear_calc= degrees(calc);if(bear_calc<=1){bear_calc=360+bear_calc; }return bear_calc;}/********************************************************************************/unsigned int get_gps_dist(float flat1, float flon1, float flat2, float flon2){float x = 69.1 * (flat2 - flat1);float y = 69.1 * (flon2 - flon1) * cos(flat1/57.3);return (float)sqrt((float)(x*x) + (float)(y*y))*1609.344;}And if you wonder the difference i have compared them side by side and recorded it.The results are here:The precision is exactly the same, only if you go more than 8 km away, the distance starts to get dirty... But good enough for our purposes... =)
Read more…
Developer

ArduPilot: How to re-flash Attiny45

This is a quick video tutorial to explain how to re-flash the attiny45 in ardupilot boards. You can also tweak the attiny code if you wish...But first you need to fallow this steps:1.-Buy an AVRISP MKII programmer, you can buy one in DIGIKEY, MOUSER and FARNELL (for Europeans)2.-Download and install AVR Studio from here, if the link don't work try this one (you must register). When your are installing it, when it ask about "Jungo Drivers", say always "Yes, yes and yes!" (are AVRISP drivers).3.-Now AVR studio will only let you program ATMEGAS in assembler (yeah, sure). For C/C++ you must install the WINAVR (AVR GCC). It will automatically fuse with AVR Studio, so don't worry about anything else... The main page is here, and the direct download here. After download, install it please.4.-Now plug you AVRISP programmer and make sure the drivers are well installed, if you want to know more about AVR studio and AVRISP please read here (very suggested).5.-Download the Fail Safe firmware (or code), to download the one i'm using in the video click here. Lasted updates will be published here. You can also download the HEX directly here, if you want... ;-)6.-Watch my quick-made video:
Read more…
Developer

New DIY Open-Source MUX...

This an Open-Source multiplexor that will allow you switch between manual or auto mode using only one channel of your remote control, also include a "build-in" picoswitch with three states (down, middle and up) + reset mode, and all through one channel.This MUX is intended to be use in low power and simple autopilot systems. In case your uController do not have enough timers to control servos, you should try the pololu servo controller and interface it with the DIY MUX.The attiny firmware is also Open-Source and you can modify it as you wish, you will need winavr+avrstudio4 and of course an ISCP programmer, like this one.To buy a PCB click here.Part list from DigiKey:3 x 1k SMD(0805) resistor P1.00KCCT-ND1 x 10k SMD resistor P10.0KCCT-ND1 x .1uf capacitor PCC1828CT-ND2 x LEDs SMD(0603), the color is optional:Red: 160-1181-1-NDGreen: 160-1183-1-NDBlue: 160-1646-1-ND1 x Attiny 85, ATTINY85V-10SU-ND1 x Mux 74LS157 296-14884-1-NDThere is also an optional component (D1), (in the top of PSEL label on the schematics), this is just a protection diode, if you are not planning to use it you should make a solder bridge between the pads..Eagle files:ardumux4_v1.zipAttiny firmware:antifail_system.rarJust to remember, when i used to have no idea of basic PCB design rules:

Now i try to fallow some rules, for example NEVER use the autorouter. 100% by hand..
Read more…