DFRobot SEN0395 stops working when disconnecting serial interface

Hi,

I have multiple SEN0395 (mmWave) sensors which all show the same behavior. Everything is working fine as long as the serial port is connected (to a Raspberry Pi). I can configure the sensor and the GPIO port sends out HIGH based on that configuration. The serial port works as well (output below).

However, as soon as I disconnect the serial port the sensor seems to stop the detection process. The LED on the sensor itself stops blinking (transitions into steady red) and the GPIO output level does not change when I move in front of the sensor. The LED on the sensor itself also stops blinking when I execute the “sensorStop” command. This leads me to believe that the sensor stops the detection process as soon as the serial port is disconnected. I’ve tried to change the start behavior using “sensorCfgStart 1” but that also didn’t change the behavior.

I would like to configure the sensor using the serial port, and then operate it only using the GPIO, connecting multiple sensors to the same Raspberry Pi. I’m using this Raspberry Pi for other purposes as well. If I’m forced to connect the serial port, I will run into some scalability issues or I need to move to a different (ESP-based?) concept.

Can you give me some help or point me in the right direction?

$JYBSS,0, , , *
$JYBSS,0, , , *
$JYBSS,0, , , *
$JYBSS,1, , , *
$JYBSS,1, , , *
$JYBSS,1, , , *
$JYBSS,1, , , *
$JYBSS,1, , , *
$JYBSS,1, , , *
$JYBSS,1, , , *
$JYBSS,1, , , *
$JYBSS,1, , , *
$JYBSS,1, , , *
$JYBSS,1, , , *
$JYBSS,0, , , *
$JYBSS,0, , , *

GPIO 5: level=0 fsel=0 func=INPUT pull=UP
GPIO 5: level=0 fsel=0 func=INPUT pull=UP
GPIO 5: level=0 fsel=0 func=INPUT pull=UP
GPIO 5: level=0 fsel=0 func=INPUT pull=UP
GPIO 5: level=0 fsel=0 func=INPUT pull=UP
GPIO 5: level=0 fsel=0 func=INPUT pull=UP
GPIO 5: level=1 fsel=0 func=INPUT pull=UP
GPIO 5: level=1 fsel=0 func=INPUT pull=UP
GPIO 5: level=1 fsel=0 func=INPUT pull=UP
GPIO 5: level=1 fsel=0 func=INPUT pull=UP
GPIO 5: level=1 fsel=0 func=INPUT pull=UP
GPIO 5: level=1 fsel=0 func=INPUT pull=UP
GPIO 5: level=1 fsel=0 func=INPUT pull=UP
GPIO 5: level=1 fsel=0 func=INPUT pull=UP
GPIO 5: level=1 fsel=0 func=INPUT pull=UP
GPIO 5: level=1 fsel=0 func=INPUT pull=UP
GPIO 5: level=0 fsel=0 func=INPUT pull=UP
GPIO 5: level=0 fsel=0 func=INPUT pull=UP
GPIO 5: level=0 fsel=0 func=INPUT pull=UP
GPIO 5: level=0 fsel=0 func=INPUT pull=UP

According to the specification this should work. If it doesn’t, I need to return the sensors.

1 Like

Hi @marioverhaeg and welcome to the forum!

Not sure if you have already seen these but:

When I look at the wiki page, I see that there is a Configuration Save Parameter command. Are you using this? If not, maybe this is the problem.

Also, are you closing the port in the code before disconnecting UART?

Thank you.

Hi @igor_X , I’m aware of the wiki and am saving my configuration accordingly. What do you mean with closing the port in the code? I cannot find a reference to this in the wiki.

Mario

1 Like

Hi @marioverhaeg !

I meant something like this: raspbian - Problems with closing ports with pyserial on Raspberry Pi 3 - Raspberry Pi Stack Exchange