Sony's Developer World forum

    • Home
    • Forum guidelines

    Upcoming maintenance 

     

    Dear Customers and Partners.

    This website will be undergoing scheduled maintenance on June 14, 2023. Please be aware there may be disruption to the developer portal website and associated services during the scheduled maintenance period.

    This upgrade is essential to ensure the continued performance, reliability, and security of Developer World.

    We apologize for any inconvenience.

     

     

    Spresense and DFRobot HCHO sensor

    Spresense
    2
    2
    304
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      Kaduwela last edited by

      I am integrating the DFRobot HCHO (formaldehyde) sense with Spresense. I am running circuit-python on spresense. The HCHO sensor can do either UART or DAC. When I did UART using the code below, I got a stream of 'None..'

      import time
      import board
      import busio

      import digitalio

      For most CircuitPython boards:

      #uart = busio.UART(board.TX, D0, baudrate=9600)
      uart = busio.UART(board.TX, board.RX)
      #uart = board.UART(baudrate=9600)
      time.sleep(2)

      while True:

      time.sleep(0.1)
      data = uart.read()
      time.sleep(0.1)
      

      The HCHO sensor is a three wire thing. Two for power and one for RX.

      I must be doing something wrong here. Do you see what it is?
      Now I am trying to use DAC with A2 pin. My questions are

      1. What is reference voltage for this pin? (I have JP1 jumper set to 3V3 for several other sensors I am incorporating)
      2. Is the DAC truly 10-bit or is it acting as it is 16-bit?
      K 1 Reply Last reply Reply Quote
      • K
        KamilTomaszewski DeveloperWorld @Kaduwela last edited by

        Hi @kaduwela

        Did you connect the signal to the main board or extension board?

        Here is the link to the documentation: https://developer.sony.com/develop/spresense/docs/circuitpython_tutorials_en.html#_circuitpython_uart

        Reference Voltage of A2 and A3 pins on Main board is 0.7V.
        Reference Voltage of A0 ~ A5 pins on Extension board is 5.0V.

        It is 10-bit but value is outputted as unsigned 16-bit data.

        Best Regards,
        Kamil Tomaszewski

        1 Reply Last reply Reply Quote
        • First post
          Last post
        Developer World
        Copyright © 2021 Sony Group Corporation. All rights reserved.
        • Contact us
        • Legal