Arduino boards and image processing.

In summary, the conversation discusses the speaker's plans to make a robot that can accept commands from a computer via USB and take pictures using a serial camera. The speaker mentions using the Freetronics Eleven board and questions whether it can handle the camera's output. The other person suggests using a software solution to send the camera's output to a serial-to-USB chip, or alternatively, getting a USB camera. The speaker expresses gratitude for the input and plans to continue working on the project.
  • #1
Kalibr
10
0
Okay, so my first essay was swallowed by some impromptu logging out, so I'll be shorter and sweeter this time.

I want to make a robot that accepts commands from a computer via USB. It will tell the robot basic commands like "next" and "back" with the bot figuring out what motors to move for each. Then the computer will tell the robot to take a snapshot from a serial camera (I'm thinking of this one: http://www.sparkfun.com/products/10061" ) and finally it will send the picture back to the PC for processing.

Now, I've picked the Freetronics Eleven, which is apparently similar to the Arduino Uno but I've learned since that the chip won't be able to handle the size of the output. I was wondering if it'd be possible to pipe the input of a particular pin straight out to the USB wire instead of forcing the poor ATmega chip to try work out what exactly I'm sending it, and additionally I was wondering if the camera I've picked is even good for the job.

I'm not too good at electronics, I'm more of a programmer so if I can help it most of my problems will be overcome with code than tricky wiring, but I'm not above doing that either. Thanks for any input guys.
 
Last edited by a moderator:
Engineering news on Phys.org
  • #2
The manual for the camera seems to indicate that you can choose the chunk size in multiples of 8 bytes. It's rather cryptic as to how to do this, but I assume that, based on the comments at their forum and store, it's possible.

What you *could* do, since your desired camera uses a UART (Universal Asynchronous Receiver-Transmitter, a.k.a. 'serial') interface, is to (re)write the interrupt that services the UART so that it sends a received byte onto the computer via the USB connection. If you're polling for input (say, with kbhit) you just send the received byte whenever you've received a byte.

A quick glance at the camera manual indicates that its baud rate is variable from 9600 baud up to 115200. Assuming you go with the default 38400 baud that's 4800 bytes per second, or having to send a packet to the PC once every 208 us. That sounds fast, but the ATmega328 is operating at 16 MHz and every clock cycle is 62.5 ns.

The other way to do it would be to disable the 328's serial module (once the send picture signal has been sent to the camera) and then go with an interrupt-on-change routine that mirrors the camera's output (frame buffers / stop bits and all) to the serial-to-USB chip input. You'd have to figure out when the camera was done transmitting (so as to restore the 328 serial mode), but you can probably figure that out.

Another possibility is to just get a USB camera, a small USB hub, and plug both the Eleven and the camera into the hub, thereby completely bypassing the Eleven.

EDIT: If you go with the byte capture-retransmit method, you'll clearly have to transmit to the serial-to-USB at a higher baud rate than the camera transmit to the '328.
 
  • #3
Wow, reading that reply made my head spin haha.

I like the idea of connecting them both to a hub, it doesn't exactly fit with what I envisioned but most of this is me learning as I go I reckon it's best not to make it too difficult for myself.

Thanks for the input, it's nice to know what I was thinking of is at least physically possible, even if it's beyond my capabilities right at this second. I'll go ahead then and grab the camera and hack at it till it works!

Cheers!
 
  • #4
Kalibr said:
Wow, reading that reply made my head spin haha.

Hey, you did ask for a software solution. :biggrin: (FWIW, I'm a hardware guy...)

Kalibr said:
I like the idea of connecting them both to a hub, it doesn't exactly fit with what I envisioned but most of this is me learning as I go I reckon it's best not to make it too difficult for myself.

Thanks for the input, it's nice to know what I was thinking of is at least physically possible, even if it's beyond my capabilities right at this second. I'll go ahead then and grab the camera and hack at it till it works!

Cheers!

If you do, you should probably grab an actual USB camera. To wire this one up, you'd still need a USB-serial converter and to supply power. You can probably find something (maybe a little larger) that has a USB port and drivers or even better, software libraries.
 
Last edited:
  • #5
MATLABdude said:
Hey, you did ask for a software solution. :biggrin: (FWIW, I'm a hardware guy...)


If you do, you should probably grab an actual USB camera. To wire this one up, you'd still need a USB-serial converter and to supply power. You can probably find something (maybe a little larger) that has a USB port and drivers or even better, software libraries.

Hrrm, well I've got a fair bit of thinking to do then! I'll have to check out who sells what and plan accordingly. I really do appreciate the input so far, it's saved me from just leaving yet another project to gather dust with all the other things I've tried to do :-p
 

Related to Arduino boards and image processing.

What is an Arduino board?

An Arduino board is a microcontroller-based device that allows you to create and control electronic projects. It consists of a programmable board, software, and a community of users who share ideas and resources.

What is image processing?

Image processing refers to the use of algorithms and techniques to analyze, alter, or enhance digital images. This can include tasks such as image recognition, image classification, and image manipulation.

How can an Arduino board be used for image processing?

An Arduino board can be used for image processing by connecting a camera module to the board and using the board's processing power to analyze and manipulate images. The board can also be programmed to control other components, such as motors or LEDs, based on the analysis of the images.

What are some popular image processing libraries for use with Arduino boards?

Some popular image processing libraries for use with Arduino boards include OpenCV, Processing, and SimpleCV. These libraries provide a variety of functions and algorithms for image processing tasks.

What are some potential applications of using an Arduino board for image processing?

An Arduino board can be used for a wide range of applications involving image processing, such as creating a security camera system, building a self-driving car, or developing a gesture-controlled interface for a device. It can also be used in educational settings to teach students about image processing and programming.

Similar threads

  • Electrical Engineering
Replies
8
Views
17K
Replies
3
Views
2K
  • Computing and Technology
Replies
1
Views
6K
Replies
2
Views
1K
  • Special and General Relativity
Replies
4
Views
1K
  • Biology and Medical
Replies
2
Views
2K
Replies
152
Views
5K
  • Programming and Computer Science
Replies
4
Views
5K
  • Mechanical Engineering
Replies
5
Views
990
Replies
1
Views
2K
Back
Top