[N00B WARNING] Sensor matrix through ADC to USB UVC stream.

XCore Project reviews, ideas, videos and proposals.
amm
Newbie
Posts: 1
Joined: Tue Jun 06, 2017 12:59 am

[N00B WARNING] Sensor matrix through ADC to USB UVC stream.

Postby amm » Tue Jun 06, 2017 1:10 am

Hi!

I'm in the research phase of a new project and came across xCORE a few days ago.
Looking at the marketing materials I think it might be a good fit, but need to make sure I'm not going for the overkill solution, nor that it is too much for my newbieness.

The system will be really simple: a matrix of sensors (40x40 or 60x50) with analog outputs that need to be read serially through an ADC, converted to an UVC stream and sent through USB to a host computer.
Each "frame" of the "video" is a reading pass over all sensors of the matrix.
An 8-bit "pixel depth" would be enough. Frequency should be at least 60Hz, but 120Hz would be ideal.
I think High-speed USB 2.0 will be enough.
Back of the envelope calculations yield 2.88Mbps bandwidth needed assuming I can send 60x50x8bpp@120Hz, but I'm not familiar with USB specifications, so I don't know if that would be possible.
I assume the worst case would need 294.912Mbps if I must send 320x240x32bpp@120Hz, as a seemingly standard format.

The idea of using an UVC stream is so I don't have to write an USB driver on any platform, because I can use the standard driver provided by the system. Then the host application will read the video stream, interpret each pixel of each frame of the "video" as a digital reading for each sensor, then processes it accordingly.

I've looked into various app. notes in XMOS' site and found a good example of USB video, which does not read any sensor but "generates" a video stream. The code is so beautiful and simple, it's scary... Somn' fishy must be goin' on!
Now I have to find an ADC example and merge the two, but I've found none yet.

The xCORE must also be able to select each sensor in turn for ADC reading, by driving shift registers and multiplexers/decoders. The circuit for reading the sensors will be really simple.

I'd also like to be able to make the xCORE field-programmable, that is, to be able to download new firmware to the xCORE via the USB interface from my host application, in case of bug fixes or enhancements are needed.
I really have no idea if this is possible nor how difficult it is, nor how it complicates the circuitry.

I think xCORE is more than enough for this, but I would like to hear from experienced people, as I am a total n00b.
I really don't know what I'm talking about nor what I'm doing, but this is not a hobby project.
I'm a software developer and never have tinkered with electronics before, until now.
I have electronics-savvy people I can get help from, but I'm the lone-ranger developer for this project.


My questions are really simple (stupid):
Will an xCORE-XU be an overkill for this? Seriously. At least it will be fun!
Will the eXplorerKIT board be enough for prototyping? (Including USB, ADC).
Will I need an xCORE-USB sliceKIT?
What about the startKIT?
Is there a simple example on ADC where I can draw inspiration (and steal code) from?
How difficult would it be to make the xCORE field-programmable, as explained above?

And now the stupidest question of all. I'm so, so sorry :(
Assuming everything goes well and the project mutates into a product...
What about programming the xCOREs? What kind of programmer do I need?
How will I do mass programming of xCORES to be soldered into PCBs?
Well, "mass production" means "couple of dozens", if lucky... :)
With PIC you can buy a quite expensive station for programming the MCUs, but found nothing similar for xCORE in xmos.com/buy/.


Sorry for the long post and all the stupid questions.
Thanks in advance for your time.

A.
Gothmag
Experienced Member
Posts: 96
Joined: Wed May 11, 2016 3:50 pm
Contact:

Postby Gothmag » Tue Jun 06, 2017 3:55 pm

I may not be remembering correctly but I don't think the explorer kit has an ADC.
User avatar
infiniteimprobability
XCore Expert
Posts: 829
Joined: Thu May 27, 2010 10:08 am
Contact:

Postby infiniteimprobability » Wed Jun 07, 2017 2:33 pm

Welcome to xcore amm!

Code: Select all

Will an xCORE-XU be an overkill for this? Seriously. At least it will be fun!

It could do more than this for sure, but having some spare resources is good as you don't have to spend time optimising as much.

Will the eXplorerKIT board be enough for prototyping? (Including USB, ADC).

As per above, this kit has no ADC. You will need quite a fast ADC anyhow so will probably be parallel. Very easy to hook one up.
https://www.xmos.com/download/private/A ... rc1%29.pdf
This board is good for USB development though.
Will I need an xCORE-USB sliceKIT?
No
What about the startKIT?

No user USB on that so not helpful
Is there a simple example on ADC where I can draw inspiration (and steal code) from?
see above app note
How difficult would it be to make the xCORE field-programmable, as explained above?

Just add DFU to USB and should be fine. There is not an app note for that but you can borrow code from USB audio..
And now the stupidest question of all. I'm so, so sorry :(
Assuming everything goes well and the project mutates into a product...
What about programming the xCOREs? What kind of programmer do I need?

xcore boots from a SPI or quadspi flash. You can either program these via JTAG from our chip (not fast but works) or program the SPI device any way you like.


Just one point - I see that the UVC uses an ISO endpoint for data. That means it will be limited to 64Mbps. Maybe you could change that to BULK to get high bandwidth - I am not 100% sure

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 4 guests