Difference between revisions of "Lisa/S/Tutorial/Nano Quadcopter"

From PaparazziUAV
Jump to navigation Jump to search
 
(9 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<div style="float: right; width: 20%">__TOC__</div>
<div style="float: right; width: 20%">__TOC__</div>


So you've received your Lisa/S Nano Quadcopter kit, what do you do next...
So you've received your [http://1bitsquared.com/products/lisa-s-nano-quadcopter-kit Lisa/S Nano Quadcopter kit], what do you do next...


The following is an example set of instructions on how to put together your new Lisa/S Nano Quadcopter kit. As with all things open source there's always more than one way to do it. So feel free to deviate from the instructions where you feel the need. Of course if you see errors or improvement please feel free to update them.
The following is an example set of instructions on how to put together your new Lisa/S Nano Quadcopter kit. As with all things open source there's always more than one way to do it. So feel free to deviate from the instructions where you feel the need. Of course if you see errors or improvement please feel free to update them.
Line 80: Line 80:
The superbitrf firmware source code is hosted on Github. Additional information regarding the flashing firmware instructions can be found on the wiki page https://github.com/esden/superbitrf-firmware/wiki.
The superbitrf firmware source code is hosted on Github. Additional information regarding the flashing firmware instructions can be found on the wiki page https://github.com/esden/superbitrf-firmware/wiki.
The flashing firmware instructions are the following:
The flashing firmware instructions are the following:
* Open the terminal
 
* Clone the superbitrf-firmware repository by typing <code>git clone https://github.com/esden/superbitrf-firmware.git</code>
1. Open your OS terminal window
* Change directory into the superbitrf-firmware directory
2. Clone the superbitrf-firmware repository by typing in your terminal command
* run <code>git submodule</code> init to initialize the libopencm3 submodule
<code>git clone https://github.com/esden/superbitrf-firmware.git</code>
* run <code>git submodule update</code> to download the libopencm3 submodule
3. Change directory into the superbitrf-firmware directory via
* run <code>make</code>
<code>cd superbitrf-firmware</code>  
* plug in your Superbit USBRF dongle while holding "the button" on the Superbit USBRF dongle, into your laptop (you should see the red and yellow LED blink alternating, indicating that the bootloader is active)
4. to make sure you have the latest and greatest of supporting source code of libopencm3  
* run <code>make flash</code>
<code>git submodule init && git submodule update</code>
5. Now build this code via
<code>make</code>
6. Plug in your Superbit USBRF dongle '''while holding "the button"''' on the Superbit USBRF dongle, into your laptop.
You will see a red and yellow LED blink in turn, indicating that the module is ready to receive and update to the latest firmware you just build.
 
7. To start the firmware update  a.k.a. Flashing your firmware type:
<code>make flash</code>
 
Wait... and your are done with the update


== Step 6 - Build and upload the Lisa/S firmware ==
== Step 6 - Build and upload the Lisa/S firmware ==
Line 95: Line 104:
Now lets get to building the firmware for the Quadcopter.
Now lets get to building the firmware for the Quadcopter.


* Start Paparazzi Centre by running <code>./paparazzi</code> from a terminal window
# Start Paparazzi Centre by running <code>./paparazzi</code> from a terminal window
* From the A/C menu select <code>LadyLisa</code>
# From the A/C menu select <code>LadyLisa</code>
* In the Airframe section check that you have the <code>ladybird_lisa_s.xml</code> airframe file
# In the Airframe section check that you have the <code>ladybird_lisa_s.xml</code> airframe file
* In the <code>Target</code> drop down list select <code>ap</code>
# In the <code>Target</code> drop down list select <code>ap</code>
* Click the <code>Build</code> button. If everything goes to plan the code will be built and there will not be any errors shown.
# Click the <code>Build</code> button. If everything goes to plan the code will be built and there will not be any errors shown.
* Plug the <code>Serial Wire Debug</code> board into the ribbon cable
# Plug the <code>Serial Wire Debug</code> board into the ribbon cable
* Plug the other end of the ribbon cable into the BlackMagic board
# Plug the other end of the ribbon cable into the BlackMagic board
* Plug the USB cable into the BlackMagic board
# Plug the USB cable into the BlackMagic board
* Plug the <code>Serial Wire Debug</code> board into the Lisa/S SWD pins
# Plug the <code>Serial Wire Debug</code> board into the Lisa/S SWD pins
* Plug the other end of the USB cable into a vacant USB port on the computer.  
# Plug the other end of the USB cable into a vacant USB port on the computer.  
* Connect a fully charged battery to the Lisa/S
# Connect a fully charged battery to the Lisa/S
* From the <code>Flash mode</code> drop down list select <code>BlackMagic Probe (SWD)</code>
# From the <code>Flash mode</code> drop down list select <code>BlackMagic Probe (SWD)</code>
* Click the <code>Upload</code> button. You should see the LEDs of the Lisa/S go out and only the Power LED remains lit while the upload takes place. Once complete the other LEDs will light.
# Click the <code>Upload</code> button. You should see the LEDs of the Lisa/S go out and only the Power LED remains lit while the upload takes place. Once complete the other LEDs will light.
 


If using the Black Magic Probe use the [http://1bitsquared.com/collections/all-products/products/jtag-idc-cable "JTAG SWD Cable"] with [http://1bitsquared.com/collections/all-products/products/jtag-swd-adapter "JTAG SWD Adapter] and connect to the 4pin SWD header on the [http://1bitsquared.com/collections/autopilots/products/lisa-s Lisa/S] with the adapter facing away from the Lisa/S.
If using the Black Magic Probe use the [http://1bitsquared.com/collections/all-products/products/jtag-idc-cable "JTAG SWD Cable"] with [http://1bitsquared.com/collections/all-products/products/jtag-swd-adapter "JTAG SWD Adapter] and connect to the 4pin SWD header on the [http://1bitsquared.com/collections/autopilots/products/lisa-s Lisa/S] with the adapter facing away from the Lisa/S. [[File:swd.JPG|thumb|none|Connect the 4pin SWD header with the Lisa/S]]


If you are using Mac OS-X, then you have to create a symbolic link for the BlackMagic to be seen as <code>ttyACM0</code>. Plug your BlackMagic board into a USB port on the computer and write " ls -l /dev/*usb* /dev/*USB* " command in a terminal window in order to see the device name. Use the first appearing name which should be something like /dev/cu.usbmodemE3BBA8B7. Then create a sym link with "sudo ln -s /dev/cu.usbmodemE3BBA8B7 /dev/ttyACM0 " command. Check the sym link by "ls -l /dev/ttyACM0 " command. Now the flashing should work.
If you are using Mac OS-X, then you have to create a symbolic link for the BlackMagic to be seen as <code>ttyACM0</code>. Plug your BlackMagic board into a USB port on the computer and write " ls -l /dev/*usb* /dev/*USB* " command in a terminal window in order to see the device name. Use the first appearing name which should be something like /dev/cu.usbmodemE3BBA8B7. Then create a sym link with "sudo ln -s /dev/cu.usbmodemE3BBA8B7 /dev/ttyACM0 " command. Check the sym link by "ls -l /dev/ttyACM0 " command. Now the flashing should work.
Line 116: Line 124:
== Step 7 - Binding your transmitter to the Superbit USBRF dongle ==
== Step 7 - Binding your transmitter to the Superbit USBRF dongle ==


*Plug in the Superbit USBRF dongle into your computer
1) Plug the Superbit USBRF dongle into one of your computers USB ports
*Press "the button" on the Superbit USBRF dongle (the orange led should light up)
<br>
*Turn on your transmitter while holding the bind button. (for more information how to turn on your transmitter in bind mode refer to your transmitters documentation. This varies a lot depending on the version and maker of the transmitter. Spektrum DX6I and Orange RX transmitters you just hold the Trainer switch while you power it on. Others have a dedicated bind button on the back of the transmitter that you hold while turning on your transmitter.)
 
*If binding was successful the orange led will turn off
 
*Release the bind button on the transmitter
2) Press "the button" on the Superbit USBRF dongle
*After few seconds another led will light up indicating that the dongle is seeing/receiving packets from the transmitter
<br>''The orange LED on the dongle should have lit up now...''
Tip: sometimes the binding is not successful on the first try, you might need to turn off and on (while still holding the bind button) your transmitter several times before the dongle recognizes your transmitter and the orange LED turns off
<br>''NOTE: Sometimes the binding is '''not successful''' on the first try, you might need to '''retry to bind''' before the dongle recognizes your transmitter and the orange LED turns off''
<br>
 
3) Put your transmitter into binding mode, on most transmitters turn on your transmitter while holding the bind button.
<br>''If the binding with your transmitter was successful the orange LED on the USBRF dongle will turn off''
 
 
4) Get your transmitter out of bind mode, most of the time just simply release the bind button on your transmitter
<br>''After few seconds the orange LED will turn off while another LED will light up. This indicates that the transmitter is connected to your dongle and receiving packets from your transmitter''
<br>
<br>
<sub>''Note: for more information how to turn on your transmitter in bind mode refer to your transmitter documentation. This varies a lot depending on the version and make of the transmitter. Spektrum DX6I and Orange TX transmitters you just hold the Trainer switch while you power it on. Others have a dedicated bind button on the back of the transmitter that you hold while turning on your transmitter. Some have a TX menu item for this.''</sub>


== Step 8 - Binding your transmitter to Lisa/S ==
== Step 8 - Binding your transmitter to Lisa/S ==


*Power on the Lisa/S autopilot while holding the bind button on the board
1) Press the bind button on the Lisa/S board and while '''holding it pressed power on the Lisa/S autopilot board''', difficult but doable if you pre-position your battery connector then connect the battery
*The Radio LED should be blinking in short blinks once a second
<br>''The Radio LED should be blinking in short blinks once a second, sometimes hard to notice''
*Turn on your transmitter while holding the bind button
 
*The Radio LED should stop blinking
2) Put your '''transmitter into binding mode''', for most most transmitters, just turn on your transmitter while holding the bind button of your transmitter
*Now you will have to press the bind button again and the transmitter should get recognized and the data should be received
<br>''The Radio LED on the Lisa/s should stop blinking, this can take even upto 40 seconds, be patient''
 
==Where to Purchase==
 
The Lisa/S Nano Quadcopter Kit is available through the [[File:1bitsquared_logo.png|50px|link=http://1bitsquared.com/products/lisa-s-nano-quadcopter-kit]] [http://1bitsquared.com/products/lisa-s-nano-quadcopter-kit 1BitSquared Store].


[[Category:Lisa]] [[Category:User_Documentation]] [[Category:Tutorial]]
[[Category:Lisa]] [[Category:User_Documentation]] [[Category:Tutorial]]

Latest revision as of 11:30, 6 January 2016

So you've received your Lisa/S Nano Quadcopter kit, what do you do next...

The following is an example set of instructions on how to put together your new Lisa/S Nano Quadcopter kit. As with all things open source there's always more than one way to do it. So feel free to deviate from the instructions where you feel the need. Of course if you see errors or improvement please feel free to update them.

Step 1 - Check the parts and tools

First we need to check that we have everything that we need.

The kit contains:

  • 1 x Lisa/S
  • 1 x Superbit USBRF Dongle
  • 2 x CyRF Modules (one mounted on Lisa/S, and one mounted on USBRF dongle)
  • 2 x 2.4GHz U.FL whip antennas
  • 1 x Cortex JTAG connector to 4 pin SWD connector adapter
  • 1 x TTL level UART adapter
  • 1 x motor connector adapter kit with battery pigtail
  • 2 x 0.05" pitch 10 pin headers
  • 1 x 0.05" pitch 4 pin header
  • 1 x 120mm class quadcopter frame (brushed motors and propellers included)
  • 1 x set of replacement propellers
  • 1 x 1S LiPo 230mAh battery
  • 1 x battery charger with USB cable
  • 1 x 10mm x 10mm GPS patch antenna (optional, only included in the "With GPS Antenna" variant)
  • 1 x Black Magic Probe with JTAG and Serial cables (optional, only included in the "With Black Magic Probe" variant)

Other tools:

  • A small phillips head screw driver
  • A fine tipped soldering iron and solder, flux, etc... (Required if you selected the some soldering required option)
  • A multimeter

Useful tools

  • A desk vice
  • Some 2 mm diameter round toothpicks sanded down to tightly fit the mounting holes of the Lisa/S

Step 2 - Soldering

If you selected the Some Soldering Required option now we need to do that soldering.

  • The 4 x 2 pin Molex PicoBlade connectors to the motor adaptor kit PCB
  • The battery pig tale to the motor adaptor kit PCB
    Soldering
  • Using the multimeter check that there is no continuity between the pins of the battery and motor connectors. If there is then you have a solder bridge causing a short which needs to be fixed.
  • Check that there is continuity between the positive (red) lead of the battery and the outside pin of the connectors.
  • Wash off any flux with flux wash
  • Place a tiny amount of solder on the pads on the bottom of the motor adaptor opt PCB where it connects to the Lisa/S. Tip use a solder sucker to suck most of the solder off again. You just want the pads tinned.
  • Solder one of the 0.05" pitch 10 pin headers to the Lisa/S CAN, UART, SWD pads
  • Alight the motor adaptor PCB with the Lisa/S PCB using the 2 mm toothpicks and solder the 6 pads
    Soldering the motor adaptor to the Lisa/S
  • Wash off any flux with flux wash
  • Inspect the PCB to ensuring that all solder joints are wet and no drops of solder have be been left on the board causing shorts.
  • Dry the PCB thoroughly with your wife/girlfriends hair dryer while she's out. Remember to put it back as you found it so she doesn't suspect a thing.

Now that you've got this far sit back and bask in the glory of soldering the tiny little joint. You might like to ponder as I did on your decision to opt for the pre soldered kit...

Step 3 - Assemble the aircraft

Now that the fiddly bit has been completed, lets put everything together

  • Place a small square of double sided tape on the back of the GPS antenna.
    Double sided tape on the back of the GPS antenna
  • Attach the GPS antenna to the GPS antenna connector on the Lisa/S
  • Attach the CYRF antenna to the CYRF antenna connector
    Antennas connected
  • Stick the GPS antenna to the back of the CYRF radio PCB
    GPS fixed
  • Unscrew the 4 screws on the body of the airframe
    Airframe disassembled
    Assembly Legend
  • Insert the 4 arms with attached motors to the body
  • Place the Lisa/S on the rubber mounts on the body in your desired orientation and secure with the 4 screws
    Lisa/S mounted
  • Connect the 4 motors to the connectors
    Motors connected

Step 4 - Install Paparazzi and other tools

If you don't already have Paparazzi installed on a computer now is the time to do so.

Follow the instructions at http://wiki.paparazziuav.org/wiki/Installation.

Tip: If you are installing on Mac OS X we recommend installing using the Source installation method instead of the basic. Some packages in the binary installer might be outdated and cause problems if you decide to use the Basic installation route. With Source installation you guarantee to have the newest packages that are much more likely to work on your version of Mac OS X and XCode.

Step 5 - Flash the USBRF

The superbitrf firmware source code is hosted on Github. Additional information regarding the flashing firmware instructions can be found on the wiki page https://github.com/esden/superbitrf-firmware/wiki. The flashing firmware instructions are the following:

1. Open your OS terminal window 2. Clone the superbitrf-firmware repository by typing in your terminal command

git clone https://github.com/esden/superbitrf-firmware.git

3. Change directory into the superbitrf-firmware directory via

cd superbitrf-firmware 

4. to make sure you have the latest and greatest of supporting source code of libopencm3

git submodule init && git submodule update

5. Now build this code via

make

6. Plug in your Superbit USBRF dongle while holding "the button" on the Superbit USBRF dongle, into your laptop. You will see a red and yellow LED blink in turn, indicating that the module is ready to receive and update to the latest firmware you just build.

7. To start the firmware update a.k.a. Flashing your firmware type:

make flash

Wait... and your are done with the update

Step 6 - Build and upload the Lisa/S firmware

While we go through the initial process it would be a good idea to charge the flight battery. You can do this with the supplied charger or your own battery charger.

Now lets get to building the firmware for the Quadcopter.

  1. Start Paparazzi Centre by running ./paparazzi from a terminal window
  2. From the A/C menu select LadyLisa
  3. In the Airframe section check that you have the ladybird_lisa_s.xml airframe file
  4. In the Target drop down list select ap
  5. Click the Build button. If everything goes to plan the code will be built and there will not be any errors shown.
  6. Plug the Serial Wire Debug board into the ribbon cable
  7. Plug the other end of the ribbon cable into the BlackMagic board
  8. Plug the USB cable into the BlackMagic board
  9. Plug the Serial Wire Debug board into the Lisa/S SWD pins
  10. Plug the other end of the USB cable into a vacant USB port on the computer.
  11. Connect a fully charged battery to the Lisa/S
  12. From the Flash mode drop down list select BlackMagic Probe (SWD)
  13. Click the Upload button. You should see the LEDs of the Lisa/S go out and only the Power LED remains lit while the upload takes place. Once complete the other LEDs will light.

If using the Black Magic Probe use the "JTAG SWD Cable" with "JTAG SWD Adapter and connect to the 4pin SWD header on the Lisa/S with the adapter facing away from the Lisa/S.

Connect the 4pin SWD header with the Lisa/S

If you are using Mac OS-X, then you have to create a symbolic link for the BlackMagic to be seen as ttyACM0. Plug your BlackMagic board into a USB port on the computer and write " ls -l /dev/*usb* /dev/*USB* " command in a terminal window in order to see the device name. Use the first appearing name which should be something like /dev/cu.usbmodemE3BBA8B7. Then create a sym link with "sudo ln -s /dev/cu.usbmodemE3BBA8B7 /dev/ttyACM0 " command. Check the sym link by "ls -l /dev/ttyACM0 " command. Now the flashing should work.

Step 7 - Binding your transmitter to the Superbit USBRF dongle

1) Plug the Superbit USBRF dongle into one of your computers USB ports


2) Press "the button" on the Superbit USBRF dongle
The orange LED on the dongle should have lit up now...
NOTE: Sometimes the binding is not successful on the first try, you might need to retry to bind before the dongle recognizes your transmitter and the orange LED turns off

3) Put your transmitter into binding mode, on most transmitters turn on your transmitter while holding the bind button.
If the binding with your transmitter was successful the orange LED on the USBRF dongle will turn off


4) Get your transmitter out of bind mode, most of the time just simply release the bind button on your transmitter
After few seconds the orange LED will turn off while another LED will light up. This indicates that the transmitter is connected to your dongle and receiving packets from your transmitter

Note: for more information how to turn on your transmitter in bind mode refer to your transmitter documentation. This varies a lot depending on the version and make of the transmitter. Spektrum DX6I and Orange TX transmitters you just hold the Trainer switch while you power it on. Others have a dedicated bind button on the back of the transmitter that you hold while turning on your transmitter. Some have a TX menu item for this.

Step 8 - Binding your transmitter to Lisa/S

1) Press the bind button on the Lisa/S board and while holding it pressed power on the Lisa/S autopilot board, difficult but doable if you pre-position your battery connector then connect the battery
The Radio LED should be blinking in short blinks once a second, sometimes hard to notice

2) Put your transmitter into binding mode, for most most transmitters, just turn on your transmitter while holding the bind button of your transmitter
The Radio LED on the Lisa/s should stop blinking, this can take even upto 40 seconds, be patient

Where to Purchase

The Lisa/S Nano Quadcopter Kit is available through the 1bitsquared logo.png 1BitSquared Store.