[beginners question] which board: record/playback audio / comparing images
david_b
Posts: 4
hello hello,
i'm new to this forum so my question will therefore may be a little bit naive. but i will give it a try anyways.
i'm right now writing my masterthesis and i have knowledge in working with microcontrollers (eg arduino), but my teacher suggested i look up if the propeller chip may be better suited for my master thesis.
the board should be able to record and playback soundfiles - saving them for example on a sd-card
the board should as well be able to take a picture with a usb-webcam (or something similiar) - calculate the average color and save them on either the same sd-card or on a second one.
concerning the sd-card i already found kye's forum entry:
http://forums.parallax.com/showthread.php?122991-SD2.0-Full-FAT32-16-File-Sytem-Driver-You-there!-Yes-you-viewing-this-forum.
i did however find nothing concerning taking a picture with a webcam and calculating the average color values.
is this at all possible with the propeller boards?
and if so which one would you suggest to me?
cheers from austria
and thanks in advance
david
i'm new to this forum so my question will therefore may be a little bit naive. but i will give it a try anyways.
i'm right now writing my masterthesis and i have knowledge in working with microcontrollers (eg arduino), but my teacher suggested i look up if the propeller chip may be better suited for my master thesis.
the board should be able to record and playback soundfiles - saving them for example on a sd-card
the board should as well be able to take a picture with a usb-webcam (or something similiar) - calculate the average color and save them on either the same sd-card or on a second one.
concerning the sd-card i already found kye's forum entry:
http://forums.parallax.com/showthread.php?122991-SD2.0-Full-FAT32-16-File-Sytem-Driver-You-there!-Yes-you-viewing-this-forum.
i did however find nothing concerning taking a picture with a webcam and calculating the average color values.
is this at all possible with the propeller boards?
and if so which one would you suggest to me?
cheers from austria
and thanks in advance
david
Comments
Saving a picture to an sd card - yes.
Taking a picture with a webcam. no
The reason is that most webcams are USB devices, and while a USB device is relatively simple, the host side is rather complex.
1) There may be solutions with serial cameras.
2) I have a $5 keychain camera that can record stills and video to a SD card. It could be quite possible to hack into the control buttons and build a circuit that isolates the SD card. So you could take some stills, then the propeller takes over the SD card and reads the file back. I suspect this may be one of the lowest cost solutions, though it will involve some hacking. Possibly a new sd card socket and wires to the socket on the keychain camera.
3) Creating a USB host. This has been discussed on this thread http://forums.parallax.com/showthread.php?127212-USB-Host-for-Propeller-Platform&highlight=usb+host and looking at the way the SPI bus works on the C3 to switch between various SPI devices, how much simpler might it be to have a physical board with just a line of USB sockets? Then connect a USB memory device instead of sd card, a USB mouse, a USB camera and a USB keyboard.
It would be useful brainstorm this further.
This Product came to mind, I am probably way off base here, but, what does this thing do?
TCS3200-DB Color Sensor, (Parallax item code #28302)
Can it be used for what You need?.
There is also the ColorPal, but that might not be what You would need either...
But I have to investigate further into it to be exactly sure..
What sensor/board would you then suggest for the audio recording and playing back part?
Assuming I'm using the Propeller C3 Board:
I could use the AP-16+ Audio Player (#31316) to play .wav files. But how am I recording sound?
Is there an onboard microphone? Or could I just hook up a simple microphone directly to the board?
Cheers and thanks for your help
David
http://www.parallax.com/tabid/768/ProductID/340/Default.aspx
But no SD card. Maybe hybridise the microphone circuit with the A to D on the C3?
Adding sound in and out is simple with a couple of resistors and capacitors. So don't worry about which pcb you use if it is not onboard. SD storage is similarly easy but you may want to actually get a pcb with this onboard because a number have had issues with the interface length. It is SPI so it's 4 pins and code has been done.
Phils Backpack (available on the Parallax site) has TV in and out and although this was orginally designed for overlaying, it may still be possible - I am no expert here. Someone with a bit more knowledge may be able to give you some hints as to how you can get this info into a prop. You may need one or more fast ADCs to convert from video to digital. As Drac said, using a USB camera will not be the easiest with a prop. Better to use a camera with composite video out or component video out. Component video would make your average color calculation easier.
The color sensor will not give you a picture that you can save (from what I think anyway). But maybe your project will allow both, I just don't know.
Hope this helps.
Maybe I didn't make myself completely clear in my initial post:
For me the colorsensors would propably work just as well. It's not about saving a picture - the important part is the calculating the average color part. The saving the image part was just my way of thinking.. but like I said, a colorsensor would propably be just fine..
Actually, Cluso99 might be onto something there with cameras with composite video. There are lots of those around as they are used as "security" cameras - you can even buy 2.4Ghz transmitters for them too. They plug into RCA sockets on "video capture cards" that you put in your PC. A composite video signal is just a voltage going up and down very fast. Is the propeller fast enough to sample it in a meaningful way? And if not, could you feed it into a fast A to D and store it in a memory chip, then read it back more slowly?
Assuming that you can get the sampling worked out, the easiest way to extract color from a video signal is to sample at 4 times the colorburst frequency.
I will talk to my supervisor and will let you know how I will proceed.