Reading ADC using Altera DE2 Board (Beginner)

adcfpgaintel-fpgaload cellverilog

Question:
Would it be possible and feasible for a beginner to use Verilog HDL and an Altera DE2 board to read input from a weight sensor's HX711 ADC (see below), and if so:

  • What kind of data am I reading?
  • Where/how do I connect it?

(I suppose that "is it possible/feasible for a beginner" could be too vague for this forum, but the two bullet points above are the real question.)

Alternatively, if it's not possible/feasible, what would I need to look for in an Arduino microcontroller to use the HX711, in terms of minimum requirements (for the cheapest possible solution)? I believe I could connect an Arduino board to the DE2 via USB (though I wouldn't know what to do with that either).

Context:
I'm a computer science student, working on a final project for a basic (and very rushed) hardware course. I have little to no prior experience with electrical engineering.

For my project, I'm required to either use Verilog HDL or MIPS Assembly Language — and I'm far more familiar with Verilog at this point.

I am using an Altera DE2 educational board (with Cyclone® II 2C35 FPGA):
https://www.altera.com/support/training/university/de2.html

For my project, I'm trying to build a system that can detect the amount of liquid in a container, can be calibrated for any similarly-sized container, and then can (theoretically) fill the cup to the appropriate level, or at least calculate the amount of liquid needed to fill it.

I could only find one load/weight sensor in a local shop and I unfortunately don't have time to wait for online delivery, so it seems to be my only option. It is "Arduino compatible" and uses an HX711 amplifier/ADC:
http://www.dfrobot.com/image/data/SEN0160/hx711_english.pdf

Best Answer

My approach to this would be to get the ADC working by reading values in the Altera debugger first. It looks like the chip spontaneously takes samples and declares itself "ready" every 100ms. So you need to build a system which looks for that signal and starts shifting in the data at the appropriate speed (1MHz SPI). There's a slight wrinkle in that you have to send 25,26 or 27 clock pulses to configure its behaviour. Once you've got 24 bits in a shift register, you should be able to use the Altera toolchain (Chipscope?) to show you this without having to build some kind of user interface yet.

Then you have to calibrate it, and work out what logic to apply as a result.

As for physical connection, it ought to just connect directly to two GPIOs - check the voltages, and keep wires short.