Shop OBEX P1 Docs P2 Docs Learn Events
[beginners question] which board: record/playback audio / comparing images — Parallax Forums

[beginners question] which board: record/playback audio / comparing images

david_bdavid_b Posts: 4
edited 2011-01-17 12:02 in Propeller 1
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

Comments

  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-01-16 21:25
    Recording and playing back sound files stored on an sd card - yes.

    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.
  • TtailspinTtailspin Posts: 1,326
    edited 2011-01-16 22:04
    When You said..
    calculating the average color values.

    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...
  • david_bdavid_b Posts: 4
    edited 2011-01-17 00:02
    Ttailspin wrote: »
    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...
    Actually: this looks from the first glance at it exactly like something I could use.
    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
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-01-17 00:09
    This board has a microphone http://www.parallax.com/dl/docs/prod/prop/PropDemoDschem.pdf

    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?
  • Cluso99Cluso99 Posts: 18,069
    edited 2011-01-17 00:24
    david_b: Welcome to the prop forum.

    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.
  • david_bdavid_b Posts: 4
    edited 2011-01-17 00:32
    Cluso99 wrote: »
    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.
    Thank you for the warm welcome!

    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..
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-01-17 05:24
    How much resolution do you need for "average color"? You could do this with three LDRs, cellophane on them - red, green and blue.

    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?
  • ericballericball Posts: 774
    edited 2011-01-17 11:13
    Video Capture has been done with the Propeller (see Stupid Video Capture for one example). However the ADC capabilities of the Propeller as somewhat limited. One of the counters can be used as a delta-sigma ADC but the resolution is inversely proportional to the sample frequency (2^bits per sample * samples per second = master clock frequency).

    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.
  • david_bdavid_b Posts: 4
    edited 2011-01-17 12:02
    Thanks for all the quick replies.
    I will talk to my supervisor and will let you know how I will proceed.
Sign In or Register to comment.