Monday, 30 March 2015

Xiaomi Yi Ghetto Gopro

**Updates will be added at the end of the blog.**



Happy Easter-Pagan-egg-swopping-bunny-worshipping-celebration-holidays everybody. So, last week, I came upon the Xiaomi Yi camera.


I had wanted to upgrade my past action camera footage for a while, but have always been very reluctant to (or financially unable to) buy a Gopro Black edition. Nice cameras that do a lot of different recording options well, but a little too expensive for my purposes - that is drone flying. Every drone pilot fears landing hard or crashing as it damages equipment which has to be then repaired or replaced, and we drone pilots all test the boundaries of flying and do have at least a couple of damage-inducing landings in our belts. We generally therefore look hard and long at buying options, we really do seek features and value. My past cameras have been budget options too - the amazing 808 #16 V3 (about £28) which I love for what it is, also the Mobius camera (about £50) which is practically identical but for it's ability to record at a higher 1080p resolution (sorry for linking to Banggood, i'm sure it's available for less elsewhere - ebay perhaps). So where to go from there for the budget buyer?


As sure as Moore's Law does to size & power, time will also factor upon new tech releases and more-better budget options will gradually appear on the market. My 808 #16 camera was bought sometime in 2013, and now, as of the end of March 2015 we have this Xiaomi Yi camera appearing on the market, so I bought one (with my own money) to see if it is any good and if it offers anything better than my other cameras. I was also thinking about a SJCam SJ5000+ but it appears to have become distinctly expensive yet quite poor and buggy according to this review here.

The Xiaomi Yi is a cheap device, it cost me about £50 using a discount code. It feels reasonable in the hand, the buttons are solid click presses, but the all-plastic does feel cheap. It doesn't come with any bells, whistles, or waterproof housings or clips. It's just a camera, a battery, a short usb-to-micro charging cable (like your smartphone), and some instructions that are %100 in Mandarin.


The smartphone app is also in Mandarin, however there appears to be a pseudo-english version which can be downloaded here which is functional. Strangely, once the app is installed on your device, the icon reads the app name "xxx Cam" which sounds a bit.....Well....a bit 'Livejasmin'...

The app however, if you're not very inclined to technology you might struggle a bit - If you've ever bought a default Chinese android tablet direct from China that comes to you totally in the Mandarin language, and have then experienced the difficulty for you to have to figure out how to change to English, then you know the possible problem. I did not find it incredibly difficult to connect my camera, but I feel there is a shed-load of progress to be made with the English Version of the app.


Features-wise, it does indeed offer us mobius users, some more features than previously available. I'm not going to go into total detail, but just to stick to the features which interest me as a drone flyer.

So here's my first 5-minute impression with the camera.



It does indeed record 1080p 30fps. It's very similar in video quality to a mobius, but It might be possible that light/brightness adjustment is quicker than the mobius, and detail is better (but I can't see a difference on my PC monitor).




It also records video at 1080p 60fps equally well - thus allowing you to post-process the slo-mo video footage smoothly to 50% speed without jitter. The quality is the same to my eyes as that of 1080p 30fps.




It also records OUTDOOR footage in much the same quality at 720p 120fps - thus allowing you to post-process the slo-mo video footage smoothly to 25% speed without jitter. 
  • I say 'outdoor' as I begin to notice some image quality deterioration (slight %10-20 grain/wash-out) when filming indoor/house lighting footage. But the slo-mo 120fps is quite smooth and cool to experience.
  • I am also unable to app preview the live recording in 720p 120fps mode. Perhaps I will try with a super expensive class-10 micro sd card in future. I am able to live-preview using 1080p 30fps & 60fps.

Photo quality appears to be similar to the Mobius to my eyes. It isn't close to my Canon SX230 point & shoot, and it's light years away from my Sony NEX but that's understandable. Here are a few pictures:


File sizes are reasonably large (4608x3456px) Jpeg, each image recorded at highest settings is around 2.2MB-2.5MB in size. But the quality isn't a pant wetter. Here are some from my Sony Nex the same morning:

Totally different ball game, correct? It also can do timelapse photos recording at various intervals repeatedly if you set this in the smartphone app. It is also a bit of a chore (30secs per connect) connecting via wifi to the camera via the app repeatedly, everytime you want to adjust something.

Wifi range let me take a photo from about 30ft. It might do more but I reached the limits of my house.

By the way, I bought the selfie stick-cum-wand of Narcissus as an extra to the camera (it's not the one that comes with the 'Xiaomi + selfie stick' version. This might make sense because my selfie stick doesn't screw tightly to the Xiaomi Yi camera, the screw hit bottom but needs to go a bit more to make a solid fitting. I had to put a silicone washer between the camera & thread to be secure. It's probably fine with the official Xiaomi wand.

So, this camera...It does some neat slo-mo footage, has wifi, what else does it do? 

Well, I guess importantly, all of us drone pilots want to know if it does USB/AV-out, like the 808 #16 or Mobius camera. 

(WORKS NOW SEE UPDATE 5)
Unfortunately
I am unsuccessful. I have tried using the typical Mobius/808 camera usb-av cable and also the typical Gopro AV-USB cable, and of course the USB connector is different on the Xiaomi Yi.

The Xiaomi Yi uses USB-micro, the Mobius/808 & Gopro use USB-mini


Until I have a micro usb cable cut up, or a micro hdmi cable to connect to the Xiaomi Yi I cannot test fpv use (Did I mention the Xiami Yi has a micro hdmi port as well as a micro-usb port?). The HDMI might be an option but this might mean the purchase and expense of a mini hdmi-av converter before you can connect it to your AV video transmitter (adding £20 to £30 just to do this is asking a great deal when it's almost 50% of the camera value). So, who knows???????


Connecting the camera to a computer using the usb cable, then holding the power button, it bleeps a bit, and mounts the camera as a device storage drive


"AMBA storage USB Device" - not heard of AMBA before, is this a reference to AMBArella the processing chip??

"USB Mass Storage Device - Failed" not sure why this failed, but it still mounts as a storage device ok.


A problem with the Xiaomi for gimbal mounting is that the typical Velcro straps that often come with the cheap GLB gimbal, doesn't fit - it's a smidge too small in diameter, that is the Xiaomi Yi lens barrel is a smidge bigger than the typical Gopro camera. The Xiaomi lens barrell measures fractionally under 24mm in diameter, the Velcro lens strap measures 23.5mm in diameter. If you wish to use it you will have to sand/dremmel it until it fits. You could of course use the tripod thread with a screw mount if you wish for alternatives. I am unsure how the Xiaomi Yi fits with other gimbals at this time.

Post-sanding it fits:



Thanks for reading.

Update #1
It seems I can power the camera from usb, with the battery removed. This roughly reduces the weight by 40-50% which is good news if you are flying a mini quadcopter.

Update #2
The pseudo-English Android app appears to be version 1.0.0. 
When I start the app it offers (in Mandarin) an app update to V1.3 but it won't actually update for me (Is it to prevent us from having the app totally in Mandarin, and therefore unusable?)
Here is a screenshot:


Also, the app settings tell me that my Yi camera has firmware v0.7.10 and that an update is available too, to version V1.0.7 and has some words about "TV", is this firmware enabling TV-out function? I can't read it, maybe someone can? It seems that the firmware is also not downloadable with my app, it's either been disabled to prevent the firmware update defaulting to Chinese, or I am just not doing something right.
Here is a screenshot:
Update #3
It seems that it is possible to update the camera firmware afterall, from V0.7.10 to V1.0.7. It seems that the app will not allow you to update if the phone/tablet + camera have less than 50% battery.

When connecting the camera to a computer using USB we now get this driver installed:


"XiaoYi SportCam USB Device"

Updating firmware is described clearly by this nice gentleman:


You must also update the Android app to V1.3. For me, the app update kept on crashing preventing me from updating. However, I found a thread with the updated app APK file here. I downloaded the app file and installed it. If you don't wish to go through the registration process on this forum because it asks for your phone verification (security issue perhaps?), you can download the V1.3 apk file directly from this link.

-It changes the app settings to include "AV Out" feature.

However, as yet, I am unable to know how to use the AV-out feature. I have tried connecting to my computer using the USB cable and pressing the camera buttons to try and enable something, I have tried using Virtualdub to attempt to capture it as a webcam device, I have tried connecting using my Android device + OTG cable, and attempted to use a 'USB webcam' app to view the camera. But not working for me yet.

The next possibility is either waiting until an official AV cable is released, or cutting a Micro-USB cable and hopefully testing each wire for a video signal, but I do not have a spare micro-usb cable yet.

Update #4
Flight footage:

























Update #5:
I received in the post an SJ4000 usb Av-out cable, and it works with the Xiaomi Yi camera enabling USB AV-out. Wire explanation is here. Video lag is no worse than the 808 #16 or Mobius cameras, so I feel it is fine to use for FPV use.Here are some pictures and a demonstration video:





















Thanks for reading.
Donations are thankful:


Wednesday, 18 February 2015

Ghetto controller idea

Just a short note today to show my new controller idea. It's a standard 6 channel remote but with integrated Bluetooth telemetry bridge similar to the Event38 telemetry bridge

I'm really pleased with it's simplicity and function and I've even started selling a system on ebay.co.uk

I'm also available now on LiveNinja for technical questions you have regarding Quadcopters, drones, Arduino, setup & programming and general help.

If you like it, I'm happy to make one for you and ship it. just get in touch. 

Update:
I have been using this tx for a few months now and it's great. Yesterday I opened up the transmitter and it looks interesting for programmer connections:




Perhaps it is possible to flash with custom opentx or er9x (er6x???) firmware? Or maybe using just usb cable?

I will look closer for usual VCC-GND-MOSI-MISO-SCK-RST connection points.

Then possibilities for APM Ardupilot telemetry direct from receiver like normal er9x but without frsky module costs :) :) :)



So then no need for 3dr telemetry units perhaps. Just thoughts & possibilities right now but potential super cost saving over 9x/frsky combo.

Hmmm maybe this controller has 6-pin programmer already, when using firmware usb cable? Also debug port?

Update:20 Feb 2015:
Board uses eeprom chip (for storing your programs/vehicle configurations) + 32bit ARM M0 processor @ 48mhz (Raspberrypi is also ARM 32)
Pictures:
eeprom datasheet



So er9x & open tx are currently compiled for the 9x 8-bit processor (Atmel AtMega64 8-bit MCU), so what to do?

My understandings at the moment are that the controller is connected to a PC using a USB UART/SPI/FTDI-programmer like this:
or making your own (which is what I did) like this:

then opening the firmware update file:


This connects to the remote server (there are some verisign handshaking & server commands in the code of the .exe), and replaces the existing controller firmware, so quite secure, making sure you can't easily get a copy of the firmware. Running this exe file with a network monitor program, there does not seem to be any network traffic that is specific to flysky, or at least I can't find any.

So it might seem that the exe contains the firmware.

Options are to get a copy of the firmware and then understand the type of embedded software being used and alter it, or create one from scratch by changing the bootloader, using the various embedded software available that are compatible with this arm 32-bit chip (like Eclipse IDE?? Anyone know of others?). 

The newer firmware 'v1.1 november 2014' allows ppm signal. Didn't see anything else changed. Download link here

Update:
Too difficult for me to try to decompile the firmware updater, or figure out how to flash the chip. Spent far too long thinking about it and almost fried my brain. The furthest I got was to observe the flashing process using a port monitor, and then looking at the HEX code - which makes very little sense but shows some interesting snippets:
That's as far as I am and can go, Maybe some of the guys who worked on the er9x or opentx projects can take over and do something.

Update:
Seems that the 9xrpro & Taranis all use ARM 32-bit chips so this looks good for the prospect of flashing opentx or er9x with this unit, hopefully making half the process of my goal (full telemetry data) possible. There is also a version for the very similar flysky t6 recently done, so I am excited more about this now.

I managed to hack the updater app, modify it so it looks like it a different hacker release, and also extract the firmware binary. I am able to modify text for the transmitter menus, but not to add a menu yet. 

Programmer app updated, small beginnings....

Now to modify the firmware dump I have, then replace the one in this app with my modified one (easily said, very hard to do)...Possibly this is out of my abilities, and might be better for someone who has more experience editing a firmware. 


Update:
Some people asking if possible to modify i6 with lipo/life battery. i6 Spec sheet says "Working Voltage: 1.5v x 4 AA" So this might have to be obeyed (anybody wish to test if it can take 3s lipo????? *be careful*). Safe solution to use lipo/life battery is to also use an adjustable step-down voltage regulator like this:
Then you can install any rechargeable battery you wish to. The Rhino 610mah 3s lipo seems to fit:

(You will also have to cut away the inside as it is designed to fit 4pcs AA-size batteries). Also, you will have to use 3s lipo alarm to protect your lipo from being killed.... Or just use 4x AA Nimh batteries and quit d**king about?????


Thursday, 1 January 2015

Ghetto (auto?) Retractable Landing Gear

Hello and happy New Year. Today I am going to show you how to make your own ghetto retractable landing gear for your quadcopter or multicopter.

I decided to make this article because I thought briefly about getting some retracts for my hexacopter, so I could work on coding the ardupilot to auto-retract at a set height. I am aware that the DJI S1000 does this, and that the DJI Inspire 1 has a cool retract system and well, I wanted to improve the open-source ardupilot to do the same. A stumbling block for me financially, was that a suitable retractable landing gear was going to cost me about £50/80usd. Other places are starting to release retracting landing gear such as this kickstarter project which again costs about £50/80usd if you're an early bird blah blah bah....

So how about we make our own?

We need:
2x servoless retracts bought from hobbyking for just £5 each
2x 5cm lengths of 3mm steel rod from ebay for £1
a set of m2.5 screws + bolts for mounting the servos to the copter

A couple of cm of guitar wire about 0.5mm in diameter (free thanks to the guitar shop and nail clippers hehehe)
some superglue
some hotglue from a hot glue gun
a small drill bit like this 0.6mm drill bit (£0.99 for 20 on ebay)
a drill obvs..

OK.
So, when we buy the servoless retracts from hobbyking, we see that when operated they go from zero -to- 90 degrees, in this ghetto tutorial we are going to adjust them so they are between 70-80 degrees so that they look like the expensive ones. If you are happy to have 90 degrees then you can skip this tutorial and go fly..

If you are still here, then you want to know how to adjust the angle on the retracts.

We do this by opening up the servo. We have to unscrew the top plate and unscrew the side screws, then gently as you like, open up the servo as in the bottom picture.
Inside is a long screw with a fitting in the middle and some gears on the end, we need to take that out and drill a hole in it.
This is how we drill the hole, just to show you it can be done easily. Holding the bit in some pliers will help you not make hole in your fingers.


Once we have the hole, we can take a 1cm piece of guitar wire and glue it into the hole. Leave it to set solid. like this:
This is where the magic happens. we can adjust the angle of the legs by trimming the wire to our desired needs. If you look at the servo inside, you will notice that there is a switch at either end, what the bit was doing was engaging these switches to stop the motor. By adding the pin, we can engage the switch to turn off the servo motor sooner thus reducing the angle from 90degrees, to a lesser degree. Cool huh?
Here's some filthy servo action:


So, how do we mount it to the copter? Well we bolt the servoless retract to either side of the leg mounts like this:
It's easy to connect one servo to a receiver channel right? But how do we connect two, and make them work together? You can try using a servo splitter cable if you like, but I decided to make a small PCB to link the two servos, to the receiver, and be powered by a 5v ubec. Here are some pictures:
I cut a small piece of PCB board, and used the acid etching technique to make it into a functional circuit. It's basically writing with a permanent acid resistant pen, and then dunking it into some warm etching fluid until the copper has been eaten away and leaving the penned copper lines. There's a simple tutorial here.

The legs of my copter were hot glued and the metal rod of the servos were pushed into the glue, and held until set solid. It is a good idea to rough-up the steel rod (the part that's going into the glue) so that it sticks better. You can do this by using a Dremmel tool, a saw, a bread knife, your teeth, etc etc.

And that's it really. Cost me about £12 in parts, and saved me about £38 being sent to China. I like making my own stuff, I've learned how much we just throw our money to China because we're often just too lazy to do it ourselves. Learn to make stuff and be creative, even if you mess up, or have to pay for tools, you'll learn a skill and have fun.

And here she is doing what she does best:

Update: 11/01/2015

I decided that I wanted to work on a simple auto retract system, and as I have a sonar sensor, an arduino, and a couple of servos, I put them all together and made the servo retract to 90 degrees when the sonar detects a user defined distance; in this case, under 30cm and the landing gear will lower. But you can change this value in the code.
Here's my first test:
as you can see the servo operates when the sonar detects  more/less than 30cm.

I decided to hook up two servos fixed with chopsticks as legs to show that it (kinda) works.

Here's the video:
If you want to try the code it is here.

Anyway for the life of me, I can't seem to get it to trigger the servoless retracts and i'm not sure why, or where I'm going wrong as the servoless retracts work with my 9x gear switch without a problem. Is it a pwm thing? Anyway, it works with normal servos at the moment.


update:
added fancy blinking leds to the circuit