Robot project with arduino mega

Hello,

I'm trying to build a walking robot, and hoping to use the arduino mega for it. The obvious advantage is the ability to easily interface with sensors, plus I'm somewhat familiar with the arduino IDE and not much else.

I need to control 16 servos with it (using a PCA9685 driver via I2C), plus a couple of servos for a camera. A few other sensors (ultrasonic, microphone, etc.) are quite easy to interface. After testing, I'd like to be able to control it remotely, so planning to use the ESP8266, which also need I2C I believe. The difficult part seems to be the camera: at the moment I have the OV7670 module without a fifo buffer. I was hoping to be able to control the robot remotely eventually, which implies having the arduino send the camera's output (I believe by using lower resolution I can get frames less than 100Kb in size) directly via the ESP8266 to a controlling PC. I've found some code at https://github.com/ComputerNerd/ov7670-no-ram-arduino-uno which seems to do exactly that, but the transfer rate is stated to be 1Mb/s, which would amount to something like 10 frames per second, and I don't really know how to incorporate the c code into the arduino IDE anyway.

The basic questions: 1. Does it seem feasible to send video from the camera sensor via the arduino to a PC at a reasonable enough rate (probably about 15 frames/second) to control the robot? Or do I need a different microcontroller/computer? 2. Will I be able to make enough I2C connections to talk to the servo driver, ESP8266, and the camera at the same time?

Also, if anyone happens to have some example code using the OV7670 camera with the arduino IDE, I'd appreciate seeing that. Thanks for reading.

Which parts of your project have you experimented with so far? I would suspect a lot of technical knowledge and background will be needed to make it work.

I managed to get everything to interface with the arduino except the motor driver (waiting for a power supply for the 16 servos), which I don't think will be hard too hard, and the the OV7670 camera. I did get the camera to work: when supplied with an 8MHz external clock signal and power from the arduino, it starts driving the appropriate pins. The code that will control it is the bigger problem, it's more complicated than any of the sensors I've worked with so far. Most code examples for it that I've looked at so far involve a lot of work with the camera's registers and such, that's a bit complex for my current level, so I can't tell if transferring video with that setup is possible.

I feel that the most difficult part of the project (camera aside) will be getting the servos to coordinate properly for movement. I'll have to do research into the algorithms for that, etc., but I feel it's definitely worth a try. Basically I was envisioning this as a learning platform where I can add more advanced functionality as I go along. The reason for choosing a walking robot, which is not the easiest starter project, is because I felt the challenge might be educational and I'm interested in robotics in general.

I'm willing to go with something like a raspberry pi if the arduino just won't work, but then I'll have to learn python before I can get the robot to move at all, and interfacing with sensors becomes more challenging.

Don't connect the cam to the arduino use an IP (Wifi) cam and connect it directly to the PC.

Mark

There are a couple of reasons I don't want to go that route: 1. I already have several of the OV7670 modules I can use. 2. Their small size makes them quite convenient to fit on the robot chassis, I was in fact hoping to eventually have 2 of them for 3d FPV, not as easy with a webcam. 3. Despite the challenge, I feel that it's good to learn to interface these types of components if I want to learn more about electronics.

Thanks for the suggestion though. If it turns out that it's not doable with the arduino, I'll explore either the webcam option or using a more powerful controller.