This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF9160 + Zephyr + DHT22, officially supported?

Hi Nordic,

We have done some research on the DHT22 and the results showed that this sensor has excellent performance. Sadly it appears that neither the nRF9160 nor Zephyr support onewire out of the box.

I have checked some other suggestions and examples, but most seem to imply that we will have to bit-bang this. This is something we really want to avoid as this adds some serious complexity and may introduce some nasty side-effects down the road. We've considered using an i2c to onewire converter, but it appears the DHT22 aren't really onewire chips... They just communicate over one wire. Deceptive if you ask me.

We're currently considering using a very cheap microcontroller as an i2c to (not) onewire converter instead, but this comes with an additional cost.

We would like to know what your thoughts are on this. Are we perhaps overlooking something?

Regards,
Thom

Parents
  • Hello Thom,

    my apologies for the late reply! We have been out of office for a couple of days due to public holidays and the Norwegian national day.

    I’m glad to inform you that Zephyr actually has support for the DHT22. You can find a sample in ../zephyr/samples/sensor/dht.

    It is based on the nrf52dk_nrf52832, but it should not be a problem to add a nRF9160 device.

    Since this application uses the GPIO peripheral, bit-banging is still applied though. But I would probably prefer this solution instead of adding an extra converter, given that it meets your requirements.

    I hope this will help you!

    Regards,

    Markus

Reply
  • Hello Thom,

    my apologies for the late reply! We have been out of office for a couple of days due to public holidays and the Norwegian national day.

    I’m glad to inform you that Zephyr actually has support for the DHT22. You can find a sample in ../zephyr/samples/sensor/dht.

    It is based on the nrf52dk_nrf52832, but it should not be a problem to add a nRF9160 device.

    Since this application uses the GPIO peripheral, bit-banging is still applied though. But I would probably prefer this solution instead of adding an extra converter, given that it meets your requirements.

    I hope this will help you!

    Regards,

    Markus

Children
Related