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

libraries for various sensors

HI team,

   I like to interface methane, hydrogen and moisture sensor in my custom board which is going to use nrf52840 soc. i am in development stage. for outdoor application i need to interface these sensors in my board is there any libraries and example available for this. if not from where can i start? 

regards,

karthikeyan

  • Hello,

    I am not sure exactly what sensors you are looking at, but they usually have some peripheral interface, such as UART, SPI, I2C (TWI).

    We have support for most of these peripherals, with examples in the SDK, under SDK\examples\peripheral.

     

    If you are looking for a more sensor-like implementation, you should check out the Thingy:52 SDK, which has a lot of sensors implemented. You can find it here.

     

    Please be aware that the Thingy:52 SDK is written for nRF52832, but the libraries should be quite similar to the nRF52840. If you include the libraries in a project for the nRF52840, then the pins should be correct for the 840.

     

    Best regards,

    Edvin

  • hi edvin,

            i am looking for some sensors which i have asked in question. for example MiCS-5524 this is the methane sensor. i want to communicate with this and want to transfer the data through bluetooth. is there nordic provides any libraries for any type of methane, hydrogen and moisture sensor. because i am having a client ready in now.

  • Hello,

    We do not have any libraries specifically made for that sensor, no, but I see that this sensor outputs an analogue signal. The nRF has an ADC, which is shown in the SDK\peripheral\saadc example, but you will have to convert from the voltage output to the gas concentration actual value. That is typically different between different types of sensors.

     

    BR,

    Edvin

  • Hi edvin, i just showed for example. I want to make 6 sensors interface with nrf52840 and form a mesh network. Use case is big. In confusion to achieve it.

  • Hello,

    You can use several inputs for the ADC. 

    You can e.g. see the example that I attach here. It has 2x ADC on AIN0 and AIN1 (pin P0.02 and P0.03). The example works for both nRF52832 and nRF52840.

     

    saadc_x2_test.zip

     

    It works with SDK14.2.0, but I have not yet tested it for SDK15.0.0. The ADC values will show in the UART log, so open an UART terminal like Putty or Termite, and connect P0.02 to GND and P0.03 to VDD, and you can see the different values in the UART log.

    Best regards,

    Edvin

Related