How to interface a new sensor

Hi!

How can I add a new sensor that is not supported by the PYNQ-Z1 base overlay? I know that multiple Grove peripherals are supported, but what options do I have if I want to interface with a new one other than Grove? From my understanding, I could design custom hardware, create a custom driver, or use MicroBlaze. What are the available options, and are there any tutorials to guide me through the process? Thank you!

Hi @Moh_Ali,

What sensor and what is the communication protocol?
If it is a protocol that is supported by the IOP, the easiest way would be to use IOP and then can try

You can also write your own overlay to communicate with the senso, but this will require more work.

Best,
Mario

Hi @marioruiz,

I have developed a neural network for deep learning and successfully deployed it on the PYNQ-Z1. The inference works well, utilizing many features that I used for training and prediction. Testing it has been amazing!

However, I need to interface Arduino sensors, as I unfortunately do not have the Grove sensors supported by the base overlay. I have an Arduino sensor kit that includes components like the DHT11, a PIR motion sensor, and a 4-digit segment display. I need to connect these sensors and gather data to feed into the inference model for specific predictions and algorithms.

You mentioned that I could write my own overlay to communicate with the sensors, but this would require more work.

My question is: what are the options for this? Should I write Verilog HDL for RTL, use Vivado HLS, or set up a MicroBlaze to create a driver? Alternatively, can I simply use Vivado’s block design with protocol timing configuration?

I’m looking for guidance on these options, as well as any related documentation and tutorials.

Thank you!

What protocol do the sensor use?

DHT11 sensor uses a single-wire bi-directional protocol which requires accurate timing.

In that case, you’ll have to write the RTL code to communicate with the sensor.
If the precision that you need is in the order of microseconds, you can try with the Microblaze (IOP)