1
$\begingroup$

I want to make a object tracking quadcopter for a project. While I'm using the Arduino Mega 2560 as the flight controller, I was thinking of using an additional offboard microcontroller/board for getting data from the onboard camera,which would then send an appropriate command to the onboard Arduino.

I was hoping someone could provide clarification on the advantages/disadvantages of doing object tracking with either choice.

Thanks!

$\endgroup$
  • $\begingroup$ What camera are you using, if you have selected one yet? (I ask because it will need to be compatible with the additional controller that you choose.) $\endgroup$ – Andy Jun 14 '16 at 13:59
  • 1
    $\begingroup$ I haven't really decided, but I was thinking of using the Raspberry Pi Camera OV5647 if i went for the latter option. For Arduino, I would go with a CCD image sensor (OV7670). But it all depends on what board allows me to easily wrote code to achieve object tracking in a moving camera scenario. $\endgroup$ – Sandesh Jun 14 '16 at 14:33
  • $\begingroup$ "... with either choice." Do you mean Arduino or Raspberry Pi? You ask in the title but not in the question body. You say you're "getting data from the onboard camera" - are you just getting image frames or are you attempting to do image processing? What generates the "appropriate command" for the flight controller? There's a large difference between image acquisition and computer vision. $\endgroup$ – Chuck Jun 14 '16 at 15:07
  • $\begingroup$ Sorry for the ambiguity Chuck. I'm attempting to do image processing using an external, offboard board that has code to determine the direction the quadcopter should move in. The external board is master to the onboard flight controller. $\endgroup$ – Sandesh Jun 14 '16 at 15:11
  • $\begingroup$ No,not necessary. The offboard processor only requires the input from the image sensor mounted on the drone, which it processes and sends an appropriate command to the onboard Arduino. $\endgroup$ – Sandesh Jun 16 '16 at 14:05
5
$\begingroup$

For interfacing with a camera, I would recommend the Pi. The reason is that the AVR in the Arduino is an ordinary processor, whereas the Broadcom SoC in the Pi was originally designed for multimedia. Besides the ARM processor, it contains video encoding/decoding hardware that you won't find in the Arduino.

Of course, you would need to learn how to use that extra hardware.

$\endgroup$
3
$\begingroup$

The only issue with having the off-board controller is that the commands to the quad-rotor might lag, because of 1. range to controller or 2. the complexity of image processing code. With that said I wouldn't say use an Arduino only, because it probably won't be fast enough to do image processing + stabilization from accelerometers and gyroscopes. Instead use a raspberry pi and arduino in tandem, maybe the arduino is connected via serial. That way the arduino can do normal flight stabilization, and the raspberry pi can do image processing and send maneuvers to the arduino for appropriate action to the quad-rotor.

$\endgroup$
  • $\begingroup$ i have been trying the same thing , the problem is using transmitter receiver for flight control $\endgroup$ – anshulkatta Jun 20 '16 at 5:51
1
$\begingroup$

One point that hasn't been addressed, which is admittedly outside the scope of the prompt, is whether or not a Pi should be used at all as the off-board component. Unless you are trying to develop on the Pi for a specific reason (possibly cost), you will be losing out on serious computational power that can be achieved with a laptop or desktop computer. Other posts highlight the fact that image processing will be computationally expensive, especially if it is needed in real-time. If you can keep everything on-board, then the following doesn't hold, but if you need to do off-board processing, I would advise you to develop on a "larger" linux box (or VM/dual-boot with Windows) first.

$\endgroup$
  • $\begingroup$ Onboard processing won't be possible only with the Arduino, even if its the Mega I'm using. The reason I thought of using the Pi was that I could allow transfer of information between the Pi and Arduino easily. I agree, I would be better off using a laptop to accomplish image processing. But I'm not too sure about how the laptop will communicate with the flight controller. Any suggestions? $\endgroup$ – Sandesh Jun 22 '16 at 3:44
  • 1
    $\begingroup$ You have to use RF to communicate with the quadcopter regardless of your off-board computer. Depending on the range, you will need an appropriate transceiver. If you are inside, you might be able to get away with communicating over WiFi, which would be good for testing because it is likely readily available. $\endgroup$ – NBCKLY Jun 22 '16 at 4:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.