Interfacing DHT11 with Pynq-Z2


In my current design, I need to interface a temperature/humidity sensor in the PCB. I am using Zynq FPGA to talk to rest of the ICs in the circuit, and wanted to know if I would talk to the DHT11 sensor as well via the pynq-z2 board.

Any ideas on whether it is feasible, or do I have to resort to some microprocessor just for the DHT11?

I had a quick look at this.
The DHT11 has a serial interface, so yes you should be able to use it with PYNQ/PYNQ-Z2. You shoudl note PYNQ-Z2 IO are 3.3V which should be OK for DHT11 which supports 3-5.5V.
The refresh rate is quite low - 1Hz.
You can see the protocol here that you would need to implement:

For info, we have support in PYNQ for the Grove Temperature sensor:
You need to use this with a Grove ADC:


1 Like

Thanks for the reply.

I will definitely consider Grove Temperature sensor+ADC as a design option as well.

Since DHT11 has a very low refresh rate of 1 Hertz, its better suited to use a microcontroller to interface it rather than Zynq 7000.

This is a very good, simple learning project. Read the datasheet for the DHT11 device. Identify required timing and signalling requirements then work out how to generate the output signal from the Zynq and release the single data line to allow the DHT to respond, while you gather up the data.
Yes, you could do this with a separate micro, or use Python and the ARM proc in the Zynq. But the experience that you will gain, working this out from scratch and writing the VHDL/Verilog, plus working out how to get the data back into the ARM device is very significant. Good luck.

1 Like


Yeah as you mentioned there are multiple ways of going about implementing this. Via python, via ARM processor on the Zynq, or just plain programming of the FPGA fabric.

There is also Grove temp sensor which is supported by pynq, but I will stick with DHT11 for now.