Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
14 years ago

Altera Analog

Hi

I wanted to connect the LV-EZ1 ultrasonic range finder (sensor) to the de2 board. How do i connect this to the board this sensor gives a voltage depending on how far the object is located?

Thanks for any help

10 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    I wanted to connect the LV-EZ1 ultrasonic range finder (sensor) to the de2 board. How do i connect this to the board this sensor gives a voltage depending on how far the object is located?

    --- Quote End ---

    You read the data sheet.

    http://www.maxbotix.com/uploads/lv-maxsonar-ez1-datasheet.pdf

    The sensor has both serial output and a PWM output. You can probably interface to those easier than the analog output, which would require you use an analog-to-digital converter.

    Cheers,

    Dave
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    How do i start with the adc? I am not able to find any extensive tutorial ao information on it? It would be great if u could let me know where to start

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    How do i start with the adc? I am not able to find any extensive tutorial ao information on it? It would be great if u could let me know where to start

    --- Quote End ---

    You would need to interface to an external analog-to-digital converter to use the analog output of the sensor.

    There is a technique where you can use an LVDS input as a fast comparator, and then implement a sigma-delta ADC.

    http://www.latticesemi.com/products/intellectualproperty/referencedesigns/simplesigmadeltaadc.cfm

    However, the sensor you want to interface to already has digital output options, so why not use them?

    Cheers,

    Dave
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    The digital ouput is the serial output right and i can have to integrate this with the rs232 in the de2 board?

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    The digital ouput is the serial output right and i can have to integrate this with the rs232 in the de2 board?

    --- Quote End ---

    There are two digital output options; the RS232 option and the PWM output.

    Probe the voltages on the two signals and see what their levels are. Based on that, you can decide how to interface to the DE2 board. If the RS232 output is at RS232 logic levels, then you can use the RS232 interface on the DE2 board. If the RS232 levels are really just UART logic levels, then you can use the GPIO header.

    Cheers,

    Dave
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    When the *BW is open or held low, the TX output delivers

    asynchronous serial with an RS232 format, except voltages are 0-

    Vcc. The output is an ASCII capital “R”, followed by three ASCII

    character digits representing the range in inches up to a maximum

    of 255, followed by a carriage return (ASCII 13). The baud rate is

    9600, 8 bits, no parity, with one stop bit. Although the voltage of 0-

    Vcc is outside the RS232 standard, most RS232 devices have

    sufficient margin to read 0-Vcc serial data. If standard voltage

    level RS232 is desired, invert, and connect an RS232 converter

    such as a MAX232.

    Thats from the data sheet. I am not sure but i am thinking its the UART standard. How do i start with this implementation ?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    I am not sure but i am thinking its the UART standard. How do i start with this implementation ?

    --- Quote End ---

    It does sound like a UART format to me too. Worst-case, its RS232 at non-standard voltage levels, and all you need to do is invert the signal to convert it to UART format. You should be able to instantiate an Altera UART - look in the Embedded Peripherals IP Guide.

    http://www.altera.com/literature/ug/ug_embedded_ip.pdf

    Cheers,

    Dave
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    to avoid complications since you are a beginner, just use the analog output (AN) on your board, interface it with external ADC circuit, connect the ADC outputs to the FPGA, and write a translation code for the digital inputs received by the FPGA from the ADC and feed it to the Seven segments or LCD as you wish