I bought a small HD camera for a quadrocopter. It is dedicated for the specific model and supports filming motion JPEG movies and shooting stills. (photos not mine)
The connector is custom and have 4 pins. From what little I know about electronics (unfortunately), I guess, that one or two pins are the power ones and the other two are the control ones for start/stop recording and photo shoot.
My question is: how can I determine, which pins are used for which purposes? I'd like to create my own interface, which would simulate connection from the quadrocopter, such that I'll be able to use the camera without the aircraft. I'm owner of the quadrocopter as well, so I can use it for testing.
Best Answer
You're probably right on the power connections, red is normally positive and black negative but it's never 100% safe to assume that. You'll also need to know what voltage the camera runs from because that may not be the same as the battery voltage. A cheap multimeter can be used to check that but the bigger complication is likely to be the two data lines.
Most devices will use a form of serial communication and it will possibly be a non-standard protocol and the speed will be unknown so you'll need an oscilloscope to see what is being sent and received. For a quadcopter it's unlikely to be a very fast protocol so one with say a 20 MHz or bandwith or more should be ample and will also assist with the microcontroller aspect I'll add below.
This is actually the output from a protocol analyzer (which is a little different) from a project I was doing last week and should give you a rough idea of what the signals might look like. In this case it's a protocol called I2C where the top line is the interpreted data (which you'll have to do yourself with an oscilloscope) following by the data and clock lines.
So you'll save yourself quite a bit of work if you can find out documentation for the device or someone else's effort to reverse-engineer it. Assuming it does turn out to be a serial protocol the next step would be to program a microcontroller to replicate it. I see from your profile you're a programmer so maybe something like an Arduino which is an AVR microcontroller already mounted on a board with some C++ libraries and a development environment might be a good place to start.
So you might have a bit more work on your hands than you expected, but I think for an experienced programmer it might be a challenging and interesting project in another area. If you have a look on e-bay you can find some 20 MHz USB based oscilloscopes that should do the job for under $US100. Whether you go with one of those or a standalone one just make sure it's something with digital storage that can transfer data to a PC, that will make things much easier for this kind of work.
The above side of things ignores the hardware side of things, but you'll also need to source some connectors and make a wiring arrangement so that you can get access to all the lines while attached to the quadcopter to take measurements with the oscilloscope.