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).

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):

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:

  • \$\begingroup\$ It looks like you have to implement a MIPS CPU on your FPGA along with SPI interface that will connect to your ADC. And then program this CPU to do what you want. Really hard task for a beginner. \$\endgroup\$
    – Eugene Sh.
    Mar 19, 2015 at 15:02
  • \$\begingroup\$ Verilog OR MIPS, not Verilog AND MIPS. The latter is just making work for yourself. What's your deadline and how many hours can you allocate until then? Are you reasonably OK with Verilog? \$\endgroup\$
    – pjc50
    Mar 19, 2015 at 16:40
  • \$\begingroup\$ I'm confident with the level of Verilog I've learned up to this point, but it's not very extensive. I can certainly make a shift register. The deadline is April 2 for the whole project, though I'm looking at revising the proposal considerably. At this point I can't allocate more than about 15-20 hours to the project. \$\endgroup\$
    – BrainFood
    Mar 21, 2015 at 1:10

2 Answers 2


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.

  • What kind of data am I reading?

Similar to SPI. The datasheet details it.

  • Where/how do I connect it?

Absolutely anywhere. It's up to you to designate what pin is which on an FPGA (within limits).

  • Is it possible/feasible for a beginner

Yep, shift register systems are pretty simple to implement.

  • ...use Verilog HDL or MIPS Assembly Language

You could do it entirely in Verilog, or tap up OpenCores for an open source MIPS IP to drop in to do the processing side of things for you.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.