HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old Feb 28, 2013, 06:12 PM
Registered User
lmhart's Avatar
United Kingdom, Northern Ireland, Belfast
Joined Jan 2013
113 Posts
Mini-HowTo
WLtoys v959 video camera R/C hack

G'day,

The camera which came with my WLToys V959 RC quadcopter does a reasonably good job of recording video - audio is of course there but never much to listen to with motors buzzing ...

But lately, I've been flying my Bixler more than the V959 and I was thinking about mounting the camera on the Bixler instead - but in order to do that, I need a way to trigger the camera record function (and optionally photo function).

So I did some tinkering and I've managed to find out what the four pins on the V959 flight controller header do:

red: +5v
black: gnd
yellow: +3.3v nominal, pull to ground for 250ms to start or stop video fuction
white: +3.3v nominal, pull to ground for 250ms to take a still photograph

One of the nice folk at 9xforums (Kilrah) suggested I would need some active circuitry between the receiver and camera, pointing me to the rc-cam.com project page for some examples.

So I decided to get hacking with my Arduino Uno to see if I could power and trigger the V959 camera's video function from my plane's Turnigy 9X8Cv2 receiver

I hooked up my Arduino Uno to the 9x RX thusly:



+5V from the Uno to +BAT on the RX
GND from the Uno to -BAT on the RX
Digital Input pin 5 on the Uno to channel 8 SIG on the RX

I then used pulseIn to read the pulses on channel 8 which I had mixed as "CH8 100% FULL GEA" in er9x.

I initially just printed out the values - 1400ish when the gear switch was off, 1900ish when the gear switch was on.

A little video of the output from the Arduino's serial monitor is here: http://www.flickr.com/photos/allandrick/8509087140/

Next step was to wire up the camera, powered by the Arduino 5V rail, and trigger the camera trigger somehow when the gear switch was toggled..

Kilrah to the rescue again with a little hint that allows you to not need a level converter on the 3.3v pin of the camera by using the Arduino's output as an open collector: When you need it LOW, turn it LOW. When you need it high, do NOT turn it HIGH, but switch it to input mode instead. The camera's pull-up will do its job and hold it at 3.3V. As long as you're careful not to set the pin HIGH you're good.

That made the design a bit simpler! So I ordered some attiny45 chips and, after a bit of googling and micrometer measuring (image search for the win), I found a molex 1.25mm pitch plug/header connector that looked like it was a match for the one on the WLtoys V959 flight controller camera port - that way I wouldn't have to hack up the camera cable and could move it between the plane and the quad as desired



I got some servo extension cables from ebay and waited for the deliveries to arrive.

Two days later (today) the packages had landed and I set out building a test circuit on a breadboard. I soldered one of the molex connectors to some jumper cables so I could plug them into the board and prototype with the attiny45 - what a nightmare!

My eyesight isn't that good up close (I wear reading glasses) and even with a magnifying glass, I was struggling. Thankfully, the trusty Multimeter confirmed that there was no short circuit... *phew* - the testing on attiny45 could begin!



Success!

Here's a pair of videos demonstrating the functionality (one from my perspective, one from the WLtoys camera which I am triggering with my er9x gear switch ).

My crappy filming view:
Testing an attiny45 sketch (2 min 49 sec)


WLtoys camera view:
Testing WLtoys V959 camera conversion to Turnigy 9x R/C control (0 min 0 sec)


Credit goes to the folks at the High-Low Tech group (MIT) for the great article on how to use the Arduino Uno as an AVRISP for the AtTiny45.

The next task was to package it all up in one small package and try to protect the tiny connector, somehow...

Phew, that was hard work!

Soldering wires to the end of the molex male socket was a pain in the you-know-what.

The sockets I got were meant for surface mount boards, so I had to gently bend the bottom lugs up into little pins jutting out from the bottom of the connector - I then used the ends of some breadboard jumper wire with the pins removed from the crimped end, pushing the crimp over the tiny pins on the bottom of the molex plug. I then wicked solder into the crimp, making a nice secure connection to each pin on the molex plug - heat-shrinking each joint before starting the next. Rosin Flux for the win!

Even with the smallest heatshrink tube, it was a tight squeeze fitting them in the 1mm gap between each pin - thankfully I only needed 3 out of the 4 pins connected (video mode is all I care about, taking still photos is only as good as a single video frame on this camera anyway). I then pushed the wires through the square end of a servo cable shroud and glued it all together in a neat package:



This should remove any possibility of strain being put on the solder joints.

Soldering the wires to the AtTiny45 pins was easy enough - a bit of rosin flux (dispensed by my handy flux pen) followed by a dab of solder on the chip pins, and the solder on the ends of the tinned wires was enough to make a perfect connection without needing too much heat for too long. Six connections later and it was done :-)



I then twisted the wires gently on each end of the circuit and wrapped them around the chip and servo cable shroud for some extra strain relief and got it ready for heatshrink:



Result:



Just like a bought one!

All hooked up ready for installation in my plane:



I tested it and, as with the prototype above, it worked perfectly! I didn't bother adding the LED and resistor, even though the sketch still tries to turn it on, because the camera has an LED status anyway - which was enough for me to confirm I hadn't fried the chip with my soldering efforts nor had I created any shorts between wires in the molex plug end!

Happy days! I now have a remotely controlled camera controller for the princely sum of 2.50 ($4.00) worth of components and a few hours of labour. Given that I didn't have all the right tools for this kind of project, I am rather pleased with the result.

I'll be shooting some remotely activated video this weekend :-)

Cheers

Leigh
lmhart is offline Find More Posts by lmhart
Last edited by lmhart; Feb 28, 2013 at 07:49 PM.
Reply With Quote
Sign up now
to remove ads between posts
Old Mar 01, 2013, 03:18 AM
Registered User
asanovrus's Avatar
Ukraine, Crimea, Bakhchysarai
Joined Mar 2012
1,554 Posts
finally someone did this. thanks!
asanovrus is offline Find More Posts by asanovrus
RCG Plus Member
Old Mar 01, 2013, 03:57 AM
Registered User
lmhart's Avatar
United Kingdom, Northern Ireland, Belfast
Joined Jan 2013
113 Posts
Quote:
Originally Posted by asanovrus View Post
finally someone did this. thanks!
Heh, yeah, I was searching the forums to find out if someone else had done it already and/or had figured out what the pins on the camera port do and/or what kind of connectors they use on the V959 FC - finding the right one was a case of google image searches plus measuring the width between the pins on the V959 FC ports and finally finding an electronics component vendor in the UK which supported searching for those parameters... ended up being a
MOLEX - 53398-0471 - HEADER, VERTICAL, SMT, 4WAY which I found on Farnell. Sadly I didn't realise it was surface mount but found a work-around for that anyway
lmhart is offline Find More Posts by lmhart
Reply With Quote
Old Mar 01, 2013, 07:04 PM
Registered User
lmhart's Avatar
United Kingdom, Northern Ireland, Belfast
Joined Jan 2013
113 Posts
Camera mounted on the Bixler, tested, working, ready to fly tomorrow! :-)

lmhart is offline Find More Posts by lmhart
Reply With Quote
Old Mar 02, 2013, 04:30 AM
Registered User
asanovrus's Avatar
Ukraine, Crimea, Bakhchysarai
Joined Mar 2012
1,554 Posts
good luck. as your camera is on top of aircraft it could be not good if it's sunny. I made lens hood on mine as on v959 it also not covered from above. I used plastic card peaces which I glued around lens so lens is protected from sun light from above and sides.
asanovrus is offline Find More Posts by asanovrus
RCG Plus Member
Last edited by asanovrus; Mar 02, 2013 at 04:42 AM.
Reply With Quote
Old Mar 03, 2013, 09:03 AM
Registered User
lmhart's Avatar
United Kingdom, Northern Ireland, Belfast
Joined Jan 2013
113 Posts
Great idea! I live in Northern Ireland, sunshine is something of a rare item here ;-)
lmhart is offline Find More Posts by lmhart
Reply With Quote
Old Mar 03, 2013, 10:17 PM
Registered User
lmhart's Avatar
United Kingdom, Northern Ireland, Belfast
Joined Jan 2013
113 Posts
Three flights on Sunday with the V959 on the Bixler:

bixler flight with v959 video camera #1 (5 min 38 sec)


bixler flight with v959 video camera #2 (8 min 13 sec)


bixler flight with v959 video camera #3 (5 min 6 sec)
lmhart is offline Find More Posts by lmhart
Reply With Quote
Old May 14, 2013, 01:40 PM
Galantly bodging away
Joined Feb 2013
377 Posts
Hey Imhart - did you only use this camera for recording or were you getting a live video feed for FPV?

Sorry dude, I don't have time to read the whole thread to find out for myself LOL. Very interested in getting a video feed from this camera for FPV - I have some Hubsan Spyhawk gear lying around and figure if I could get a video feed from the camera I could use the VTx from the spyhawk on the V959 for quadcopter FPV.
Sir Bodgealot is offline Find More Posts by Sir Bodgealot
Reply With Quote
Old May 15, 2013, 07:18 AM
Registered User
lmhart's Avatar
United Kingdom, Northern Ireland, Belfast
Joined Jan 2013
113 Posts
G'day,

Quote:
Originally Posted by Sir Bodgealot View Post
Hey Imhart - did you only use this camera for recording or were you getting a live video feed for FPV?
Sadly I don't have the budget for FPV yet, so it was purely a hack to record video full stop. To be honest, you'll get a better quality video recording from a keychain camera (search the forums for the best one to buy - they're quite cheap). I did this more as an exercise in Arduino hackery than anything else - to be honest, it probably cost me more than a keychain camera to build...

Quote:
Sorry dude, I don't have time to read the whole thread to find out for myself LOL.
It wasn't *that* long :-)

Quote:
Very interested in getting a video feed from this camera for FPV - I have some Hubsan Spyhawk gear lying around and figure if I could get a video feed from the camera I could use the VTx from the spyhawk on the V959 for quadcopter FPV.
I don't think you can get a live feed from this camera, unfortunately. However, there are other threads on this forum that show how to build a very small FPV rig for these micro quads.

Good luck!

Cheers

Leigh
lmhart is offline Find More Posts by lmhart
Reply With Quote
Old May 15, 2013, 09:50 PM
Galantly bodging away
Joined Feb 2013
377 Posts
Quote:
It wasn't *that* long :-)
Neither it is.....LOL

My bad.

TBH never been impressed with the video from those keychain cameras.

The video from this wee camera is 60fps that's why I was interested; that and it does a pretty good job with colours.

I am going to have a rethink. I could certainly rig up an 808 cam to the spyhawk VTx board.

Thanks anyway!
Sir Bodgealot is offline Find More Posts by Sir Bodgealot
Reply With Quote
Old May 17, 2014, 11:06 AM
Registered User
United States, TN, Cleveland
Joined Oct 2013
168 Posts
Here's a sample from that camera before & after using a flexible tape mount.
V222 camera mount mod (4 min 18 sec)

BTW the camera for the Nine Eagles Galaxy Visitor 2 has the same pin-outs except the still & video are swapped.
And it's 720p for $18 from Banggood!
sureshot__ is offline Find More Posts by sureshot__
Reply With Quote
Old Jun 27, 2014, 09:00 AM
Registered User
Germany, NRW, Engelskirchen
Joined Jun 2014
18 Posts
Is it possible to do this hack without ardiono?
Sandrail1 is offline Find More Posts by Sandrail1
Reply With Quote
Old Jun 28, 2014, 07:34 PM
Registered User
lmhart's Avatar
United Kingdom, Northern Ireland, Belfast
Joined Jan 2013
113 Posts
Quote:
Originally Posted by Sandrail1 View Post
Is it possible to do this hack without ardiono?
I wouldn't know where to start - the camera required a specific trigger to start/stop video, you need some form of circuit to detect the RX channel change and trigger the camera accordingly - I'm sure it is possible to do this with an electronic circuit, but wouldn't know where to start.
lmhart is offline Find More Posts by lmhart
Reply With Quote
Old Jun 30, 2014, 02:31 PM
Registered User
Germany, NRW, Engelskirchen
Joined Jun 2014
18 Posts
that's too bad, then I have to buy a arduino.
must i have a arduino uno, or can I use any other cheap arduino board?
Sandrail1 is offline Find More Posts by Sandrail1
Reply With Quote
Old Jun 30, 2014, 03:32 PM
Registered User
United Kingdom, Bristol
Joined Aug 2008
1,774 Posts
Arduino is a programming environment or Arduino IDE. Using opensource software/hardware
They do have there own hardware using AVR's It does have its own custom bootloader which makes life simpler no need to learn anything about how to flash or change fuses. Theres more but thats enough.
All you will need is this http://www.aliexpress.com/store/prod...242584516.html
SadSack is offline Find More Posts by SadSack
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Mini-Review WLtoys V959 Quad (with Video Recording Function) Mini-Review FyreSG Mini Multirotors 1313 Aug 11, 2014 09:48 PM
Mini-Review JamesChen072's WLToys V959+modules review jameschen072 Mini Multirotors 1458 Jul 07, 2014 04:28 PM
Mini-Review WLtoys V959 Quadcopter with on-board Video old4570 Mini Multirotors 7 Jul 23, 2013 03:57 PM
Discussion Torsional rigidity gone on WLToys V959 boom 1auriec Mini Multirotors 7 Feb 20, 2013 06:52 AM