Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
17252 Discussions

Comparator challenge (FPGA)

Altera_Forum
Honored Contributor II
3,428 Views

Hello frndz, 

Again, i want to design a comparator that can compare two analog voltage (e.g 3.0v and 1.5v) for a STRATIX III FPGA. Meaning my design is supposed to be digital using VHDL. The comparator is should be sensitive to the input analog voltage such that voltage 3.0 to 2.5 = HIGH (1) and 2.0 to 1.5 = LOW (0) (My DE 3 board has the capacity to adjust the input voltage to the above voltage levels). Can this be done in VHDL??? and how it done???
0 Kudos
5 Replies
Altera_Forum
Honored Contributor II
2,493 Views

This task would typically be performed by an external comparator, and the comparator output (a logic level) routed to the FPGA. 

 

What are you trying to do? Perhaps I can offer an alternative solution. 

 

Cheers, 

Dave
0 Kudos
Altera_Forum
Honored Contributor II
2,493 Views

 

--- Quote Start ---  

This task would typically be performed by an external comparator, and the comparator output (a logic level) routed to the FPGA. 

 

What are you trying to do? Perhaps I can offer an alternative solution. 

 

Cheers, 

Dave 

--- Quote End ---  

 

 

Trying to design temperature sensor, it would require varying input voltage at some comparator. The design ought to be typically digital and inbuilt in the FPGA, so using an external comparator would not be an alternative. Do u think a voltage-to-frequency converter using linear voltage controlled oscillator would suffice???
0 Kudos
Altera_Forum
Honored Contributor II
2,493 Views

 

--- Quote Start ---  

Trying to design temperature sensor, it would require varying input voltage at some comparator. 

--- Quote End ---  

 

 

Why would you try to design a temperature sensor, when there are very good parts already available? 

 

 

--- Quote Start ---  

 

The design ought to be typically digital and inbuilt in the FPGA, so using an external comparator would not be an alternative. Do u think a voltage-to-frequency converter using linear voltage controlled oscillator would suffice??? 

--- Quote End ---  

 

 

This design would require an external voltage-to-frequency converter, so that breaks your idea to keep everything digital. 

 

If the goal is to sense DC voltages using an FPGA, then you can use an LVDS receiver to build a sigma-delta converter, however, I'm not sure how accurate it would be. 

 

It sounds to me like you are making more complicated than they need to be. 

 

Cheers, 

Dave
0 Kudos
Altera_Forum
Honored Contributor II
2,493 Views

 

--- Quote Start ---  

Why would you try to design a temperature sensor, when there are very good parts already available? 

 

--- Quote Start ---  

 

 

We are trying out something different, never mind. 

 

 

--- Quote Start ---  

 

If the goal is to sense DC voltages using an FPGA, then you can use an LVDS receiver to build a sigma-delta converter, however, I'm not sure how accurate it would be. 

--- Quote Start ---  

 

Building a sigma-delta converter is a trival task, anything simpler??? perhaps a voltage-to-frequency converter?? But if a sigma-delta is used will it keep design digital???
0 Kudos
Altera_Forum
Honored Contributor II
2,493 Views

 

--- Quote Start ---  

 

Building a sigma-delta converter is a trival task, anything simpler??? perhaps a voltage-to-frequency converter?? But if a sigma-delta is used will it keep design digital??? 

--- Quote End ---  

 

 

No, there is no way to measure an analog voltage with an FPGA without using some external components. 

 

The sigma-delta method relies on an external RC filter and an LVDS receiver, so the external components are simple; Google "Lattice RD1066" for an example. 

 

A voltage-to-frequency converter is essentially a VCO, i.e., it has an analog input and a logic output, at that point you may as well use an ADC. 

 

Cheers, 

Dave
0 Kudos
Reply