X4M300 with Raspberry pi 3 UART connection

Discussion in 'Module Connector (MC)' started by Sheng Chong, Nov 4, 2017.

  1. Sheng Chong

    Sheng Chong New Member

    Hello,

    I'm recently doing a vital signal detection project using x4m300 module, but I'm a bit confused about UART transmission. First of all, is the radar module using 3.3 volts for UART transmission? If my board (say another dev board) using 5V for UART, do I need a level shifter for that?

    Second thing that is confusing me is how to establish the UART connection (in software level) between my Pi and X4M300?
     
  2. Charlie Shao

    Charlie Shao Moderator Staff Member

    Hi Sheng,

    For your first question, the outputs of Tx from X4M300 are approximately 0V and 3V, it should be enough to trigger the thresholds of 5V based UART Rx input pin, please check the minimum input high threshold and maximum input low threshold voltage of your MCU. I think the main problem might be if the Rx input pin of X4M300 is 5V tolerance. I checked the MCU datasheet, it is not specified. But I have tested it with a UART-USB cable on both Raspberry PI and computer, the USB port is working at 5V, it works well. So the level shifter is not necessary, but it will increase reliability if you do this.

    The second question is software level UART communication. We have provided a very good solution for your confuse, it is the Module Connector for Raspberry Pi, an API library providing all you need to communicate with our sensor, also you can find lots of examples inside it. Please download from here: https://www.xethru.com/community/resources/module-connector-raspberry-pi.81/.
     
  3. Sheng Chong

    Sheng Chong New Member

    Thanks, Charlie.
    If I only want to get presence data, what baudrate should I use?
     
  4. Charlie Shao

    Charlie Shao Moderator Staff Member

    The default is 115200, which is enough for your application, we even use this setting for raw data output. If you just care about presence data, the x4m300_presence_simpleoutput.py example is a good reference.