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. PMS7003 Sensor - TTY/UART scrambled output [solved]

PMS7003 Sensor - TTY/UART scrambled output [solved]

Scheduled Pinned Locked Moved Hardware
11 Posts 3 Posters 1.4k 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.
  • K Offline
    K Offline
    kernelpanic
    wrote on last edited by mfalkvidd
    #1

    Hello,

    I've bought a PMS7003 air sensor from alliexpress and I connected to RaspberryPI UART and I get scrambled output

    0_1553369074368_pms7003.png

    Any idea?

    Thanks

    dbemowskD mfalkviddM 2 Replies Last reply
    0
    • K kernelpanic

      Hello,

      I've bought a PMS7003 air sensor from alliexpress and I connected to RaspberryPI UART and I get scrambled output

      0_1553369074368_pms7003.png

      Any idea?

      Thanks

      dbemowskD Offline
      dbemowskD Offline
      dbemowsk
      wrote on last edited by
      #2

      @kernelpanic Output like that in most cases means that your arduino is set to communicate on a different baud rate than what you have your terminal set for. Look at the sketch you are using in the setup() method and see what value is in this statement:

      Serial.begin(9600);
      

      In this case, the baud rate is being set to 9600bps (bits per second). When you open your terminal program, you should select the same baud rate prior to opening the com port. If those two numbers do not match you can see output similar to what you are seeing.

      Vera Plus running UI7 with MySensors, Sonoffs and 1-Wire devices
      Visit my website for more Bits, Bytes and Ramblings from me: http://dan.bemowski.info/

      1 Reply Last reply
      0
      • K kernelpanic

        Hello,

        I've bought a PMS7003 air sensor from alliexpress and I connected to RaspberryPI UART and I get scrambled output

        0_1553369074368_pms7003.png

        Any idea?

        Thanks

        mfalkviddM Offline
        mfalkviddM Offline
        mfalkvidd
        Mod
        wrote on last edited by
        #3

        @kernelpanic according to http://download.kamami.pl/p564008-PMS7003 series data manua_English_V2.5.pdf (page 13) pms7003 sends data in a binary format, which is not human readable.

        1 Reply Last reply
        0
        • K Offline
          K Offline
          kernelpanic
          wrote on last edited by
          #4

          I connected first time on the RaspberryPI UART and I get scrambled output, I thought that is something wrong with RaspberryPI UART and I've bought a CP2102 USB to UART Bridge Controller and I get the same output.

          The baudrate of the image that I shown is 9600 - this is the command that I use to get the output: screen /dev/ttyUSB0 9600 or cat -v < /dev/ttyUSB0

          0_1553423812280_Screenshot_22.png

          Perhaps the sensor is broken? have anyone this sensor or PMS5003, what output do you get when use screen or cat?

          mfalkviddM 1 Reply Last reply
          0
          • K kernelpanic

            I connected first time on the RaspberryPI UART and I get scrambled output, I thought that is something wrong with RaspberryPI UART and I've bought a CP2102 USB to UART Bridge Controller and I get the same output.

            The baudrate of the image that I shown is 9600 - this is the command that I use to get the output: screen /dev/ttyUSB0 9600 or cat -v < /dev/ttyUSB0

            0_1553423812280_Screenshot_22.png

            Perhaps the sensor is broken? have anyone this sensor or PMS5003, what output do you get when use screen or cat?

            mfalkviddM Offline
            mfalkviddM Offline
            mfalkvidd
            Mod
            wrote on last edited by
            #5

            @kernelpanic the senson't output is not designed to be human readable.

            K 1 Reply Last reply
            1
            • mfalkviddM mfalkvidd

              @kernelpanic the senson't output is not designed to be human readable.

              K Offline
              K Offline
              kernelpanic
              wrote on last edited by kernelpanic
              #6

              @mfalkvidd I know that, but I should see 01010101 or [0x42, 0x4d] output not scrambled data

              mfalkviddM 1 Reply Last reply
              0
              • K kernelpanic

                @mfalkvidd I know that, but I should see 01010101 or [0x42, 0x4d] output not scrambled data

                mfalkviddM Offline
                mfalkviddM Offline
                mfalkvidd
                Mod
                wrote on last edited by mfalkvidd
                #7

                @kernelpanic if you want to view the data in binary or hex, you'll need to pass it through a program (such as hexdump or xxd). 0x42 is the character B. 0x4D is the character M.

                1 Reply Last reply
                0
                • K Offline
                  K Offline
                  kernelpanic
                  wrote on last edited by kernelpanic
                  #8

                  Ok, you are right, the sensor it's working good, I just have to code to get the output.
                  I've found https://github.com/rjaros87/pm-home-station on github, it has a windows app and i tested there.

                  Air purifier OFF
                  0_1553449039335_c9136a97-9686-46ac-a022-de4d0293be00-image.png
                  After 5 minutes of Turbo on Sharp KC-A50EU W
                  0_1553449071101_f90b9844-0aaa-49bb-bb24-90b304950bd8-image.png
                  And here when I hit a puff from my electronic cigarette
                  0_1553449160018_65eecc4b-b741-4a71-b2f4-ed7fab49beee-image.png
                  Great!

                  mfalkviddM 1 Reply Last reply
                  2
                  • K kernelpanic

                    Ok, you are right, the sensor it's working good, I just have to code to get the output.
                    I've found https://github.com/rjaros87/pm-home-station on github, it has a windows app and i tested there.

                    Air purifier OFF
                    0_1553449039335_c9136a97-9686-46ac-a022-de4d0293be00-image.png
                    After 5 minutes of Turbo on Sharp KC-A50EU W
                    0_1553449071101_f90b9844-0aaa-49bb-bb24-90b304950bd8-image.png
                    And here when I hit a puff from my electronic cigarette
                    0_1553449160018_65eecc4b-b741-4a71-b2f4-ed7fab49beee-image.png
                    Great!

                    mfalkviddM Offline
                    mfalkviddM Offline
                    mfalkvidd
                    Mod
                    wrote on last edited by
                    #9

                    @kernelpanic very cool, thanks for sharing the graphs. Nice to see that your purifier is able to clean the air.

                    1 Reply Last reply
                    0
                    • K Offline
                      K Offline
                      kernelpanic
                      wrote on last edited by
                      #10

                      I found a Python script that output the PM2.5 and all for Python and I can use it with RaspberryPI - https://github.com/MarkJB/python-pms7003/blob/master/pms7003.py - Thanks @MarkJB (github)

                      Can you set the thread to [SOLVED] ? Thanks

                      mfalkviddM 1 Reply Last reply
                      0
                      • K kernelpanic

                        I found a Python script that output the PM2.5 and all for Python and I can use it with RaspberryPI - https://github.com/MarkJB/python-pms7003/blob/master/pms7003.py - Thanks @MarkJB (github)

                        Can you set the thread to [SOLVED] ? Thanks

                        mfalkviddM Offline
                        mfalkviddM Offline
                        mfalkvidd
                        Mod
                        wrote on last edited by
                        #11

                        @kernelpanic done. If you want to do it yourself next time, just click edit on your first post and edit the field at the top.

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


                        20

                        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