Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
1,605 Views

DE0-Nano Project

Hi, 

I am a newbie to the DE0-Nano but I have a project in mind and I was wondering if I could get some high level feedback on whether I am on the right track or not. 

 

background: 

I am a software engineer and we deal with X-Ray sensors on a fairly regular basis. If you have ever gone to the dentist and they shoved some plastic piece in your mouth, told you to bite down, and took an X-Ray then you know what I'm talking about. The problem is that in order to test the implementation of these sensors you have to hook them up and shoot them with radiation before they will return an image. Although we take precautions, sometimes you have to a LOT of images before you are done. 

 

project: 

What I am wanting to do is to create a dummy sensor by connecting the real sensor to the DE0-Nano board and logging the initialization so when I connect the DE0-Nano board to the computer that the computer will recognize the DE0-Nano as a sensor. 

 

The second part of this would be to log the protocol the sensor uses to return an image so that when I push one of the push buttons on the DE0-Nano that it will send and resend an image out to the USB. That way I can emulate the entire process and the actual sensor wouldn't need to be used.  

 

assumptions: 

I will need to hookup a USB breakout board to the DE0-Nano so I can use the DE0-Nano to log the communication between the sensor and the computer. 

 

questions: 

Am I on the right track with the DE0-Nano? 

Will I need a USB breakout board or is there a better way to do it? 

If I need a USB breakout board, what would you recommend for use with the DE0-Nano? 

 

Any other advice/questions/comments welcome.
0 Kudos
9 Replies
Altera_Forum
Honored Contributor I
52 Views

Hello, 

 

This is interesting. 

 

Following is what I am understanding from your post. 

When you connect your DE0-nano to your computer via USB interface, your computer should recognize that as a USB device capable to send some images to it. When you press any push button, some data captured from your sensor should be passed to your computer via USB interface. Is this correct? 

 

I have some confusion in following points: 

 

--- Quote Start ---  

when I push one of the push buttons on the DE0-Nano that it will send and resend an image out to the USB.  

--- Quote End ---  

 

What does send and resend mean here? 

 

 

--- Quote Start ---  

That way I can emulate the entire process and the actual sensor wouldn't need to be used.  

--- Quote End ---  

 

Why do you not need actual sensor? You need to have some data to be sent to your computer via USB. Without sensor, from where will you get data? 

 

Regards, 

Bhaumik
Altera_Forum
Honored Contributor I
52 Views

Bhaumik, 

I am basically trying to create an emulator instead of using the actual sensor. The computer should recognize the DE0-Nano as the sensor ( I.E. the computer should use the sensor drivers to communicate with the DE0-Nano ) and the DE0-Nano should be able to respond as if it was the sensor. In order to do that I would need to hook up the actual sensor and log the information to better understand how to communicate with the computer. Once I have the information, then I can store it or write it into the code so that when I push the button on the DE0-Nano that I can send the information to the computer as if someone took an X-ray with the sensor ... without someone actually having to take an X-Ray.
Altera_Forum
Honored Contributor I
52 Views

It might be easier for you to just use a protocol analyzer such as http://www.totalphase.com/products/beagle-usb480/ other companies make these, but this one worked for me. Some Arduino boards can act as a USB device to let you simulate pressing keys on your pc keyboard. It should be possible to simulate a keyboard and mouse at the same time.

Altera_Forum
Honored Contributor I
52 Views

That beagle is interesting but this is more about learning the DE0-Nano and trying to tackle a real world problem than the emulator. I guess you could say the adventure is more valuable than the destination. Plus ... $1200 is a bit much.

Altera_Forum
Honored Contributor I
52 Views

Hi, 

 

This is not trivial but I'm new to FPGAs.  

 

In order for the computer to recognize the DE0 nano as the x-ray sensor you are planning to plug into the DE0, you will need to configure the usb port in the DE0 with correct usb parameters of the x-ray sensor.  

 

Then the DE0 will need to be able to capture the data from the sensor and store it in non-volatile memory. So that you don't loose the data at power down. Or RAM if you don't mind capturing another image every time you power down the DE0. 

 

Then the DE0 needs to be able to retrieve the image (in memory at this point) and format it correctly to send it to the computer (via usb) when you push a button. 

 

 

This could be a two step process. First plug the x-ray sensor into the DE0 and capture data. Then remove x-ray sensor and connect to PC for emulation. Either way ...well beyond my current capabilities. Good luck ... it looks interesting and fun. 

 

As a side note. You may want to look at a new MAX10 FPGA just because you don't have to deal with the external configuration ic for the FPGA . 

 

Take care.
Altera_Forum
Honored Contributor I
52 Views

OK got it. From a quick look at the board, it doesn't look like the DE0-NANO has a user controllable USB port. It is only used for programming. Please note that this will be significantly easier to do with a microcontroller that has a purpose built USB device or OTG interface. Several Arduino's and TI launchpad boards would work. If you need FPGA as well, consider using the USB that is connected to the HPS in the SoC chips. A board like the DE0-SoC would work for this.

Altera_Forum
Honored Contributor I
52 Views

 

--- Quote Start ---  

Several Arduino's and TI launchpad boards would work. 

--- Quote End ---  

 

 

Ahhh, I see what you mean now. It looks like the Arduino Leonardo will do this or there is a firmware upgrade for the UNO ( which I already have ). This might be a better route.
Altera_Forum
Honored Contributor I
52 Views

If you are using an Arduino check to see if you need voltage level conversion. If you do, breakout boards are available from Adafruit, Sparkfun, Amazon, eBay, etc.

Altera_Forum
Honored Contributor I
52 Views

 

--- Quote Start ---  

Ahhh, I see what you mean now. It looks like the Arduino Leonardo will do this or there is a firmware upgrade for the UNO ( which I already have ). This might be a better route. 

--- Quote End ---  

 

 

i played with arduino uno before, complete all included all kind of freaking popular driver ..even with PWM controller.. and a easy to use thing..but in FGPA, you might need to look for own own way. hehe
Reply