Sign In

Don't have a Xilinx account yet?

  • Choose to receive important news and product information
  • Gain access to special content
  • Personalize your web experience on Xilinx.com

Create Account

Username

Password

Forgot your password?
XClose Panel
Xilinx Home
Reply
Regular Visitor
bhavin.max
Posts: 31
Registered: ‎07-07-2011
0
Accepted Solution

SENSOR- FPGA INTERFACE ERROR ..

Hi All !!!!!!!

             I am using spartan 3 xc3s400 pq208 -5 device.

I have interface a distance sensor to one of the fpga channel and given external supply to sensor.....the distance sensor is working  fine..

because when i check the sensor on dmm the voltage varies as per the distance varies....The problem is that variation in the voltage of sensor doesnot reflect the output  which is given to spartan 3 board leds...

 

PLease help me regarding this!!!!!!!!!


Expert Contributor
joelby
Posts: 1,056
Registered: ‎10-05-2010
0

Re: SENSOR- FPGA INTERFACE ERROR ..

Are you using a commercial development board, or are you using something you've developed?

 

Exactly how have you connected the sensor to the FPGA? Are you using an analog to digital converter? Which one? Are you sure you've configured it correctly? Have you simulated your code?

Regular Visitor
bhavin.max
Posts: 31
Registered: ‎07-07-2011
0

Re: SENSOR- FPGA INTERFACE ERROR ..

Hi All !!!!!!!!!
Thanks for the reply Joelby......
1]No,its commercial development board...there is nothing which i have develop on board...........
2]Yes,the distance sensor has three terminal with 1]vcc, 2]gnd, 3]sensor output
i have given a supply of 5V to vcc and 0V to gnd from an adapter which directly connected to AC mains supply.only the sensor output pin is given to one of the input channel of FPGA board.
3]yes,i am using A to D converter from the IC 7891 which is
onboard of fpga kit.
4]I have seen the simulation its perfect ..........except with sensor interface........i have simulated for A to D vhdl code .
PLease help me regarding this !!!!!!!!!!!!!!!!!!!
Expert Contributor
eteam00
Posts: 7,505
Registered: ‎07-21-2009
0

Re: SENSOR- FPGA INTERFACE ERROR ..

[ Edited ]

Please don't force us to guess which development board you are using!

Links to board schematics or product page would be handy as well.

And while you are preparing essential information, please include a link to the sensor datasheet.

 

-- Bob Elkind

SIGNATURE:
README for newbies is here: http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369

Summary:
1. Read the manual or user guide. Have you read the manual? Can you find the manual?
2. Search the forums (and search the web) for similar topics.
3. Do not post the same question on multiple forums.
4. Do not post a new topic or question on someone else's thread, start a new thread!
5. Students: Copying code is not the same as learning to design.
6 "It does not work" is not a question which can be answered. Provide useful details (with webpage, datasheet links, please).
7. You are not charged extra fees for comments in your code.
8. I am not paid for forum posts. If I write a good post, then I have been good for nothing.
Regular Visitor
bhavin.max
Posts: 31
Registered: ‎07-07-2011
0

Re: SENSOR- FPGA INTERFACE ERROR ..

Hi All !!!!!!!!!!
http://www.mte-india.com/ProductinfoNew.aspx?ProductId=151&CategoryId=3
the above link give the details of the fpga board which i am using.
Expert Contributor
eteam00
Posts: 7,505
Registered: ‎07-21-2009
0

Re: SENSOR- FPGA INTERFACE ERROR ..

This is an important step forward!

 

Do you have a specific sensor in mind?

 

-- Bob Elkind

SIGNATURE:
README for newbies is here: http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369

Summary:
1. Read the manual or user guide. Have you read the manual? Can you find the manual?
2. Search the forums (and search the web) for similar topics.
3. Do not post the same question on multiple forums.
4. Do not post a new topic or question on someone else's thread, start a new thread!
5. Students: Copying code is not the same as learning to design.
6 "It does not work" is not a question which can be answered. Provide useful details (with webpage, datasheet links, please).
7. You are not charged extra fees for comments in your code.
8. I am not paid for forum posts. If I write a good post, then I have been good for nothing.
Regular Visitor
bhavin.max
Posts: 31
Registered: ‎07-07-2011
0

Re: SENSOR- FPGA INTERFACE ERROR ..

Hi All !!!!!!!!!!!!!!!!!

            The attached file shows  the distance sensor which i am using.

Expert Contributor
joelby
Posts: 1,056
Registered: ‎10-05-2010
0

Re: SENSOR- FPGA INTERFACE ERROR ..

You need to methodically check each part in the system. If you are using a commercial development board and an off-the-shelf sensor, there's a good chance that they work (unless they're damaged), which means that the problem is in your code 99% of the time. If it's working in simulation, you may not have simulated it properly.

 

Anyway, here are the steps I would take:

 

  • Check sensor by connecting it to a multimeter or oscilloscope. Wave hand in front of it and check that the output matches the data sheet specifications.
  • Check that the analog input for your FPGA development board is compatible with the output of the sensor. The MTE site has broken links, so it's not clear if the ADC has a pre-amplifier. Check the schematics. According to the sensor data sheet, the output voltage varies between 0 and 3.2 V. Is the ADC configured for single ended or differential input? What's its VREF? If VREF is 2.5 V, have you set the ADC's RANGE bit to 1 to allow input voltages of up to 2 * VREF?
  • Examine the ADC configuration logic using a logic analyser or oscilloscope and verify against the data sheet that you're not sending it garbage.
  • Consider implementing a configuration read-back stage to verify that the values you've set have actually made it to the chip.
  • Provide a constant input voltage to the ADC using a voltage divider (e.g. a potentiometer), perhaps at the middle of the ADC input range. Observe the ADC's output using a logic analyser and confirm that the data values are what you would expect from the data sheet (for example, a 50% analog input value should give a digital output of 50% of the maximum value).
  • Debug the FPGA's internal state using ChipScope Pro if you have a license, or using a UART or LED debug output if you don't. If you're just reading parallel data from the ADC and displaying that on LEDs, your internal logic ought to be incredibly simple, so there may not be many internal data paths to examine.

You might want to consider posting your code on the forum so that we can dissect it. Without it, we can only guess at what might be wrong and guide you to finding a solution (with it, we'll still try to guide you toward finding the solution yourself).

Regular Visitor
bhavin.max
Posts: 31
Registered: ‎07-07-2011
0

Re: SENSOR- FPGA INTERFACE ERROR ..

Hi All !!!!!!!!!!!!!!!
I have checked sensor on DMM its absolutely working fine...When power up the sensor,As the distance of opaque object changes make changes in the voltage level of Sensor also...
So I need to analyze my code.........

Thanks for the suggestion joelby.................