Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Hardware
  3. How to mysensorise a new sensor via microUSB?

How to mysensorise a new sensor via microUSB?

Scheduled Pinned Locked Moved Hardware
9 Posts 4 Posters 1.9k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • alexsh1A Offline
    alexsh1A Offline
    alexsh1
    wrote on last edited by
    #1

    Hello all,

    I have a new air quality sensor, which is reposting the air quality via USB (9600) in the following format:

    10.0, 12.0, 2456.0
    

    First one is PM10
    Second one is PM25
    and last one is CO2

    How do I mysensorise it? Can I connect nrf24l01+ with a USB chip like this (http://2.bp.blogspot.com/-Ps46Q81M6Ws/UbNgRzcU7pI/AAAAAAAADuc/2T5ocrsacNc/s1600/uart_nrf24l01.jpg) or it has to be an Arduino + nrf24l01? As it is reported not in MySensors format, I suppose I do need Arduino....
    Any advice is welcome.

    AWIA 1 Reply Last reply
    0
    • alexsh1A alexsh1

      Hello all,

      I have a new air quality sensor, which is reposting the air quality via USB (9600) in the following format:

      10.0, 12.0, 2456.0
      

      First one is PM10
      Second one is PM25
      and last one is CO2

      How do I mysensorise it? Can I connect nrf24l01+ with a USB chip like this (http://2.bp.blogspot.com/-Ps46Q81M6Ws/UbNgRzcU7pI/AAAAAAAADuc/2T5ocrsacNc/s1600/uart_nrf24l01.jpg) or it has to be an Arduino + nrf24l01? As it is reported not in MySensors format, I suppose I do need Arduino....
      Any advice is welcome.

      AWIA Offline
      AWIA Offline
      AWI
      Hero Member
      wrote on last edited by
      #2

      @alexsh1 interesting. I assume you cannot take information from the inside circuitry?
      You will need at least an arduino with radio or ESP to connect the serial / USB port and interpret and translate the information to MySensors

      alexsh1A 1 Reply Last reply
      0
      • tbowmoT Offline
        tbowmoT Offline
        tbowmo
        Admin
        wrote on last edited by
        #3

        An option could be to use nodered to reformat the data into mysensors protocol format, and pass it on to your controller of choice.

        alexsh1A 1 Reply Last reply
        1
        • AWIA AWI

          @alexsh1 interesting. I assume you cannot take information from the inside circuitry?
          You will need at least an arduino with radio or ESP to connect the serial / USB port and interpret and translate the information to MySensors

          alexsh1A Offline
          alexsh1A Offline
          alexsh1
          wrote on last edited by alexsh1
          #4

          @AWI I probably can, but this is a finished product and I got all I need from a microUSB. So fixing a small Arduino or atmega328p TQFP with nrf24l01+ is a good option. There are no transceivers in the sensor now just a display

          1 Reply Last reply
          0
          • tbowmoT tbowmo

            An option could be to use nodered to reformat the data into mysensors protocol format, and pass it on to your controller of choice.

            alexsh1A Offline
            alexsh1A Offline
            alexsh1
            wrote on last edited by
            #5

            @tbowmo can you please elaborate on it in terms of hardware?

            1 Reply Last reply
            0
            • tbowmoT Offline
              tbowmoT Offline
              tbowmo
              Admin
              wrote on last edited by tbowmo
              #6

              @alexsh1

              If you can't intercept the "serial" data before it enters USB (that is, there is no ft232, CH340 etc) then you have to use a device capable of acting like an USB host. That can in theory be implemented on a SAMD21, as it has host capabilities, but you need to write a device driver for it.

              On the other hand, you can connect it to a computer (raspberrypi, or the likes), which has a USB stack already, now you can get the data on a serial port (like you have already). Install node-red and have it listen on the serial data from the USB device, and then have node-red decode, and perhaps re-encode into mysensors serial protocol messages.

              I have done this with my utility meter sensor, which just counts pulses from the utility meter. It then reports the counts to my raspberry pi, which is running node-red. Node-red is also talking to domoticz on the other side, where domoticz thinks it's a mysensors serial gateway it talks to. I then inject messages from the utilitymeter into the datastream comming from the real mysensors gateway, and domoticz never knows what hit it.. :d

              In my setup it's only partly mysensorized, and only with the help of node-red.. (node-red is acting like a mysensors node)

              alexsh1A 1 Reply Last reply
              2
              • tbowmoT tbowmo

                @alexsh1

                If you can't intercept the "serial" data before it enters USB (that is, there is no ft232, CH340 etc) then you have to use a device capable of acting like an USB host. That can in theory be implemented on a SAMD21, as it has host capabilities, but you need to write a device driver for it.

                On the other hand, you can connect it to a computer (raspberrypi, or the likes), which has a USB stack already, now you can get the data on a serial port (like you have already). Install node-red and have it listen on the serial data from the USB device, and then have node-red decode, and perhaps re-encode into mysensors serial protocol messages.

                I have done this with my utility meter sensor, which just counts pulses from the utility meter. It then reports the counts to my raspberry pi, which is running node-red. Node-red is also talking to domoticz on the other side, where domoticz thinks it's a mysensors serial gateway it talks to. I then inject messages from the utilitymeter into the datastream comming from the real mysensors gateway, and domoticz never knows what hit it.. :d

                In my setup it's only partly mysensorized, and only with the help of node-red.. (node-red is acting like a mysensors node)

                alexsh1A Offline
                alexsh1A Offline
                alexsh1
                wrote on last edited by alexsh1
                #7

                @tbowmo Thanks for sharing your setup. My idea is to make it simple. Do not want to use RPi as I would like to keep the size small. The sensor is running on a battery so adding the RPi (even a small Zero) means less juice for the sensor.

                I think I'd go atmega328p tqfp with nrf24l01+ SMD purely to keep it small

                1 Reply Last reply
                0
                • tbowmoT Offline
                  tbowmoT Offline
                  tbowmo
                  Admin
                  wrote on last edited by
                  #8

                  @alexsh1

                  From your initial description it seems that you only have a USB interface available to communicate with the sensors?

                  That means you have to implement a USB host device of some sorts, and a CDC driver for that host..

                  In that respect, a raspberry would be the easiest route.. :)

                  1 Reply Last reply
                  0
                  • FotoFieberF Offline
                    FotoFieberF Offline
                    FotoFieber
                    Hardware Contributor
                    wrote on last edited by
                    #9

                    There is an USB host shield:
                    https://www.circuitsathome.com/arduino_usb_host_shield_projects/

                    This could be a solution.

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    23

                    Online

                    11.7k

                    Users

                    11.2k

                    Topics

                    113.1k

                    Posts


                    Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • MySensors
                    • OpenHardware.io
                    • Categories
                    • Recent
                    • Tags
                    • Popular