Arduino boards and image processing.

AI Thread Summary
The discussion focuses on creating a robot that receives commands via USB and captures images using a serial camera. The user initially chose the Freetronics Eleven board but discovered its limitations with data processing. Suggestions include modifying the UART interrupt to send data directly to the USB connection or using a USB camera with a hub to simplify the setup. The camera's baud rate and data transmission speed are highlighted as critical factors in the project's feasibility. Overall, the user is encouraged to explore options that align with their programming skills while managing hardware challenges.
Kalibr
Messages
10
Reaction score
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
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.
 
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!
 
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:
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
 
Very basic question. Consider a 3-terminal device with terminals say A,B,C. Kirchhoff Current Law (KCL) and Kirchhoff Voltage Law (KVL) establish two relationships between the 3 currents entering the terminals and the 3 terminal's voltage pairs respectively. So we have 2 equations in 6 unknowns. To proceed further we need two more (independent) equations in order to solve the circuit the 3-terminal device is connected to (basically one treats such a device as an unbalanced two-port...
suppose you have two capacitors with a 0.1 Farad value and 12 VDC rating. label these as A and B. label the terminals of each as 1 and 2. you also have a voltmeter with a 40 volt linear range for DC. you also have a 9 volt DC power supply fed by mains. you charge each capacitor to 9 volts with terminal 1 being - (negative) and terminal 2 being + (positive). you connect the voltmeter to terminal A2 and to terminal B1. does it read any voltage? can - of one capacitor discharge + of the...
Thread 'Weird near-field phenomenon I get in my EM simulation'
I recently made a basic simulation of wire antennas and I am not sure if the near field in my simulation is modeled correctly. One of the things that worry me is the fact that sometimes I see in my simulation "movements" in the near field that seems to be faster than the speed of wave propagation I defined (the speed of light in the simulation). Specifically I see "nodes" of low amplitude in the E field that are quickly "emitted" from the antenna and then slow down as they approach the far...
Back
Top