BBMMVV
Posts: 6
Joined: Wed Mar 15, 2017 12:28 am

minicom for rangefinder

Fri Mar 24, 2017 9:48 pm

I am trying to use a Maxbotix 7386 and 7076 acoustic sensor (not at the same time) with Minicom on my Pi 3. I now have the Pi seeing the sensor, but Minicom is giving a whole bunch of garbage data, and only randomly displaying the range. The 7076 needs to run through an inverter first. The Pi was not even seeing the sensor at first, but since we got better connectors, that seemed to help.

The sensors transmit the data at 5 V, so I am running the data through resistors to bring the voltage down to 3.3 volts, even though the company's page on interfacing with a Pi do not mention bringing the voltage down. I did not think it was a good idea to send 5V serial data through my GPIO pins.

Does this seem like a connector issue, where poor connections are creating noise, or possibly a Minicom configuration issue, or something else?

Heater
Posts: 12731
Joined: Tue Jul 17, 2012 3:02 pm

Re: minicom for rangefinder

Fri Mar 24, 2017 10:09 pm

Check the following:

Voltage levels. Correct, 5v into a Pi is a bad idea.

With a good ground connection of course.

Baud rate.

Number of character bits.

Number of stop bits.

BBMMVV
Posts: 6
Joined: Wed Mar 15, 2017 12:28 am

Re: minicom for rangefinder

Fri Mar 24, 2017 10:22 pm

Heater wrote:Check the following:

Voltage levels. Correct, 5v into a Pi is a bad idea.

With a good ground connection of course.

Baud rate.

Number of character bits.

Number of stop bits.
9600 Baud rate, 8 character bits, no parity, one stop bit. The output should be the ASCII character RXXXX, where XXXX is the range in mm (7386) or cm (7076). We had hooked it up as the company said at first, with no resistors, though that has not seemed to damage the Pi, I tested the pins and they are fine. The actual output are supposed to be the R, the four number characters that correspond to my range, and a carriage return.

What I am reading is ASCII characters that are the same if I am reading the same range, but they are not the right ASCII characters. Occasionally I will get a good range reading RXXXX that may hold for half a second or five seconds, I never know, and there is no common denominator for when I get good readings. I am connecting the GPIO ground to my power supply ground, or Minicom will not receive any data.

Heater
Posts: 12731
Joined: Tue Jul 17, 2012 3:02 pm

Re: minicom for rangefinder

Fri Mar 24, 2017 10:41 pm

I presume you have disabled the kernel and OS from using the UART on the GPIO pins.

Hmmm...I presume you are using the UART on the GPIO pins.

Electron752
Posts: 142
Joined: Mon Mar 02, 2015 7:09 pm

Re: minicom for rangefinder

Sat Mar 25, 2017 10:29 pm

I really really try adding those resistors. A simple voltage divider should work fine for you. That is if the PI isn't already damaged at this point.

BBMMVV
Posts: 6
Joined: Wed Mar 15, 2017 12:28 am

Re: minicom for rangefinder

Wed Apr 05, 2017 7:52 pm

Heater wrote:I presume you have disabled the kernel and OS from using the UART on the GPIO pins.

Hmmm...I presume you are using the UART on the GPIO pins.

Yes, I am using the UART. The OS is disabled from using the UART as well. The big problem is lack of consistent readings, every now and then a good reading then garbage for a while, then a good reading for several seconds, then garbage for a while. Maxbotix says it is probably the connections, though we really can't make them better, and there is no way to see why suddenly I get a good reading, then it is bad again.

Return to “General discussion”