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

From PaparazziUAV
Jump to navigation Jump to search
m (more spelling errors)
Line 86: Line 86:
3. Change directory into the superbitrf-firmware directory via
3. Change directory into the superbitrf-firmware directory via
  <code>cd superbitrf-firmware</code>  
  <code>cd superbitrf-firmware</code>  
4. to make sure you have the latest and greatest of supporting sourccode of libopencm3  
4. to make sure you have the latest and greatest of supporting source code of libopencm3  
  <code>git submodule init && git submodule update</code>
  <code>git submodule init && git submodule update</code>
5. Now build this code via
5. Now build this code via
  <code>make</code>
  <code>make</code>
6. Plug in your Superbit USBRF dongle '''while holding "the button"''' on the Superbit USBRF dongle, into your laptop.
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 ltest firmware you just build.
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. Flasing your firmware type:
7. To start the firmware update  a.k.a. Flashing your firmware type:
  <code>make flash</code>
  <code>make flash</code>


Line 138: Line 138:


4) Get your transmitter out of bind mode, most of the time just simply release the bind button on your transmitter
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 orenge 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>''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>
<br>
<br>

Revision as of 09:04, 29 December 2015

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