Mini Quadcopter Parts

I created some CAD drawings for quadcopter parts I kept breaking. I got tired of making and cutting out the fibreglass myself so I created some Oshpark boards.

You can go here to order your very own Quadcopter parts

Here’s what the first batch looked like. I didn’t like the look of the power board so I did a new layout for my second batch.

I’ve tried the screw positions with the KK multirotor board and the CC3D flight control board.

IMG_20150116_164459

AP510 APRS

I recently got my amateur radio certificate and was interested doing some APRS messaging so I purchased a Sainsonic AP510. It’s a nice little TNC with GPS, bluetooth and a thermometer.

It comes with minimal documentation in 4 languages and no software to configure it.

There’s a Yahoo Group that has firmware, configuration software and upgrade software. It’s annoying that you need to sign up for a Yahoo account to download the files there.

There’s also a Chinese website that has more firmware and some forums ( the Yahoo site has mined most needed data from there )

There’s also a good French website that explains how to flash the firmware and has some files needed for windows 7.

I found a German site that explains the serial cable pinout.

Upgrading the firmware

Standard disclaimer: this has worked for me but if it fails and bricks your AP510 I’m not responsible.

So far I have only gotten this to work on Windows, it will run under Wine but won’t connect. On windows XP these files AVRTTupdata.exe.zip and the VB6 runtime will be enough. On any newer windows MSCOMM32.OCX and MSSTDFMT.DLL will be required as well.

Make sure the ini file is in the same directory as the AVRTTupdata when you run it as it has the correct setup for the AVR in the AP510. The first time you run AVRTTUpdata it will be in Chinese, select language and put it into English.

  1. Use the option->comport menu item to chose the correct comport. Don’t change any of the other settings.
  2. Use the folder icon to load the hex file into the Upgrade tool.
  3. Turn off the AP510.
  4. Push and hold the power button on the AP510.
  5. While still holding the power button push the chip icon and the download will begin.
  6. Keep holding the power button until the download completes.

Voila your AP510 is now upgraded.

Linux Configuration tool

Update: This is deprecated use chirp instead as it now supports the AP510

The windows configuration tool is in the archive above. I didn’t want to start up a VM each time to change the config so I wrote a simple python tool AP510-setup to configure it. You’ll need to edit the script to change the comport, callsign and other settings. I’ve licensed it GPL V2 and please send me any improvements you make to the script.

To use the script:

  1. Edit the configuration
  2. Turn the AP510 off
  3. Start the script
  4. Turn the AP510 back on
  5. The script should dump the current settings, update the new settings and then dump the new settings

EDIT: Jan was nice enough to reverse engineer a schematic for the AP510.

Hobby King X230 replacement parts

I purchased the X230 Quad copter kit from hobby king in December. I’ve been learning to fly it and in the process have been breaking parts.

Hobby king doesn’t sell replacement parts so I’ve been patching it up as I go along. Some of the pieces are getting too broken to be patched. I’ve created a DXF of the parts and I’m going to have them built out of carbon fibre for increased crash resistance ūüôā

Quad_designAt left is a 1:2 jpeg of the parts. If you’d like the DXF it’s here

If you’d like the SVG it’s here

Edit: I don’t recommend using carbon fibre to prototype this unless you have a laser cutter.

i’m Watch Accelerometer

I tried to get the part number for the accelerometer from im Watch developer support and they refused to give it to me. The response was you don’t need need that information just use the supplied sensor library. I tried to tell them the library would only collect data at 10 Hz and I require 200 Hz. It also wastes time by always sampling the magnetometer and the accelerometer even if you only need the accelerometer data.

After trying for a few days to get the information from developer support I decided to figure it out for myself.

I wrote a little i2c scanner and enumerated the devices on the bus. I found a device at 0x19 and 0x1e. now to figure out what they are. I disassembled the the sensor library supplied by imdeveleoper.it and found the hex constant 0x19 in the initAccel function. So far so good.

I then stepped up my scanner to read all of the registers from 0 to 127. The first register was at 0x7 and the second was at 0xF and then a bunch more upto 0x2F. I had expected some kind of who am I at 0x0. No such luck. I re-read the registers a few times looking for the changing values. The values at 0x28 to 0x2d changed with the orientation of the device. Good I’ve found the accelerator, but which one ?

I started going through accelerometer datasheets and found that the st micro parts had a who_am_i variable at 0xF. I finally found a match, 0x33 in the LIS3DSH datasheet. The changing values also correspond to the locations of the x, y and z values ¬†so I’m pretty sure I’ve found the correct part.¬†EDIT: i’m Watch support finally got back to me and it is actually the¬†LSM303DLHC. The magnetometer and thermometer are both integrated.

So now I get to re-write the imWatch sensor library. The good news is that the accelerometer has a FIFO, can sample at 5KHz and has a temperature sensor. After I’ve re-written the sensor lib I’m going to see what’s hiding in the magnetometer.

 

i’m Watch Sensors

After almost a year the IMWatch developer site has finally released a library to access the sensors. They even released an example application but no documentation ???

Fortunately there are some tools to decompile java apps.

Below are the prototypes for the two undocumented functions the you’ll need to use to get access to the sensors.

public SensorServiceInstance(int updateInterval)
public SimpleShakeDetector(Context context, OnShakeListener listener, int updateInterval)

The¬†important¬†argument¬†here is the updateInterval. It’s an int but what does it represent. A few tests show it’s the number of milliseconds between samples. Reading the decompiled code implies that this value must be greater than zero but has no other limits.

The application I’m writing needs to have a 200Hz update rate so I tried setting this value to 5 ms. This doesn’t get the required update rate. It seems the practical lower limit to updateInterval is 100ms which doesn’t even match the game update interval for the Android standard sensors updates. 10 Hz isn’t even the lowest rate I can use for my application.

Digging deeper into the sources looks like they have included a native i2c library to access the sensors. I might be able to use that to get direct access and increase the update rate. Stay posted for a blog post on where I get with that.

The full decompile source is available here.

Once again IMWatch has underwhelmed with no documentation and a marginally functional sensor library.  Another release, another fail.

Lenovo Thinkpad Tablet

The Lenovo Thinkpad 3G Android Tablet has been a lemon since it got released. When initially released the GPS in the tablet didn’t work. The ICS update fixed the GPS issues but caused more problems with 3G and Wifi. Here’s a link¬†Lenovo Wifi and 3G issues.

Today I updated the tablet to ThinkPadTablet_A400_03_0070_0132_ROW and the 3G would no longer connect. I tried a Telus SIM card and a Bell SIM card. After 45 minutes on the phone with Telus tech support and 2 phone calls to Lenovo ( 1 that ended with the CSR hanging up on me for using big words ) the tablet would still not register on the Network.

With no resolution forthcoming from Lenovo I decided to ask the Great Google to help. Luckily some European customers have had a similar issue ( check post 28 which is an English translation of a German post ).  The steps below are from those posts with Canadian cell providers instead of the European ones.

You will need a 2G SIM-Card.¬†I used speakout wireless but Rogers or Fido should work too. You don’t need an internet plan for this to work. Anywhere below where I mention Telus you can also substitute Bell.

  1. activate 3G (mobile broadband connection)
  2. activate 2G only (go to: setting -> mobile connections and activate “use only 2G”)
  3. press the reset button (the one between sim card slot and sd card slot
  4. After the reboot you should have a 2G internet connection with the speakout card
  5. reactivate 3G (go to: settings -> mobile connections and deactivate “use only 2G”)
  6. you should now have a 3G connection with the speakout SIM-Card
  7. you should be able to switch between 3G and Wi-Fi without any problems
  8. Turn the tablet off.
  9. Take out your speakout SIM-Card and insert your Telus SIM-Card
  10. Turn the tablet on again.
  11. The Telus SIM-Card should work now.

Overall I really can’t recommend this tablet as one of the primary reasons I purchased it was for the 3G functionality. I’ve already spent more time diagnosing this tablet than it is worth. ¬†The other business class value add from Lenovo can be had from other manufacturers for less. The business features also seem to make the tablet mush slower than comparable devices.