I am a high school teacher in Denver, and I am hoping that the two ROVs which I am building will be a major part of my Robotics course this year.
I am having perhaps a simple issue connecting the Bar30 Pressure sensor through to QGroundControl.
I snipped the Molex connector on the Bar30 Pressure Sensor and replaced it with a JST connector suitable for the I2C 2 connector on my PixHawk 2.1 (pictured)
The PixHawk is connected through a Raspberry Pi (image supplied by BlueRobotics) to QGroundControl. QGroundControl correctly readis Pixhawk compass direction, Pixhawk level, etc. data from the PixHawk (pictured). I verified that the GND_EXT_BUS parameter has been set correctly to “Bus1.”
The Accelerometer and Compass calibrated on QGroundControl without incident. When I attempt to “Calibrate Pressure” (i.e., the Bar 30 Pressure), however, I get the following message: “Calibration command failed.” I also do not get any temperature reading. QGroundControl is also reporting the following “Vehicle Health” warning “Absolute pressure.”
Is there any way I can troubleshoot the I2C connection to determine if the issue is related to QGroundControl, the Bar 30 Pressure Sensor, my JST rewiring, Mavproxy, etc.?
On QGroundControl’s GND_EXT_BUS, there are three options: 1) Disabled, 2) Bus 0, and 3) Bus 1. Previously, I had the parameter set to Bus 1. There was not an option for Bus 2, so I manually entered a 2, as you suggested.
Unfortunately, this did not change the sensor calibration response.
I also tried all nine combinations of GND_EXT_BUS (Disabled, Bus0, and Bus1) and GND_PRIMARY (FirstBaro, 2ndBaro, and 3Baro) resets, again, without success.
Hi @gallopsean, I am away from my pixhawk2 till monday, then I will have another go. Can you verify that you have ArduSub firmware on your pixhawk, and not ArduCopter or ArduPilot? You should see an ‘ArduSub’ logo in the upper right of the QGC window when it is connected to an ArduSub vehicle.
Hi Jacob, thank you for your reply. I do indeed have ArduSub running on the PixHawk 2.1, and the ArduSub logo is indeed in the upper right hand corner of my QGC (see previous photo).
I verified using the QGC Inspector widget that the SCALED_PRESSUR2 and SCALED_PRESSUR items contain values, and those values appear to update about once a second. The odd thing is that both items contain the same set of values, and both items report values whether I have the PixHawk I2C connector attached or not.
In the Summary tab of the Vehicle Setup page, can you look in the Frame section and tell me what version number it says? Can you tell if the number in scaled_pressure2 field changes when you push your thumb on the pressure sensor opening? And last thing, can you save and post a list of parameters by clicking Tools on the parameter page?
Scaled_pressure2 field is back…it reads on top 0Hz #137
The four values contained inside of Scales_pressure2 are not changing and do not respond to placing my finger over the 30 BAR pressure sensor.
The following two parameters are now set:
GND_EXT_BUS: Bus1
GND_PRIMARY: FirstBaro
Ok Sean, I’m sorry I can’t find out for sure what the settings should be until Monday, but I think it should work on Bus0. The selection of the GND_PRIMARY does not matter here, it will be auto-selected at boot depending on whether or not the external sensor has been detected with a successful communication/initialization sequence.
If you are seeing the scaled_pressure2 message, but it is not updating, that sounds like it has seen the sensor at least once, and the sensor has subsequently malfunctioned. Did you solder the spliced wires or just twist them together? I am beginning to suspect those connections.
Great Jacob, thanks for the reply. I had a few issues with the PixHawk, but they now appear to be mostly resolved.
With regard to scaled pressure2, I am getting a reading and it updates regularly. I don’t know if it matters, but (see attached photo), scaled_pressure and scaled_pressure2 are showing the same reading and they update in lockstep. With regard to calibration, I continue to get an “Absolute pressure” Vehicle Health warning, and the “Calibrate Pressure” mechanism fails.
With regard to the spliced wires on the Bar30 Pressure Sensor, I soldered them. It was difficult however to discern the pinout connections for the green and white wires into the PixHawk 2.1 JST connector. I was careful, and I think that I soldered and aligned the wires correctly.
Ok, it looks like it’s working correctly. The pressure sensors are both reading the same air pressure (slightly different), and different temperatures.
Re the pressure warning, not sure what’s up here. Is it always there or intermittent? Is it present immediately after booting the rov or does it show up some time after?
What is your depth reading? Calibration will fail if it’s armed or if it thinks it’s deeper than 1m.
Absolute pressure warning is constant; it never goes away. Also, the warning is present immediately after booting (see first photo attached)
Thank you for the quick reply and the info on the Calibration. My depth is +4 feet (see second photo attached), and the pressure calibration still fails (see third photo also attached).
Separately, can you tell me why the Temperature (see second photograph) is reading so high? I am assembling the ROV in my living room, and the ambient temperature is no higher than 22 degrees celsius. I have not adjusted the parameters, GND_SPEC_GRAV and GND_TEMP beyond their default settings. Perhaps, I have should have done so?
Hi, just got a chance to play with it, and it turns out the Bar30 will show up under SCALED_PRESSURE3. This is because there are two on-board barometers on the Pixhawk2. This is also why the temperatures are reading so high, because they are inside the electronics housing which gets pretty warm.
The only change that needs to be made from defaults is to change GND_EXT_BUS to 0. Because you are having failure calibrating the sensor and with the health warning, this indicates that the pixhawk is unable to read the pressure sensor.
With GND_EXT_BUS set to 0, the SCALED_PRESSURE3 value appears (second photo attached). Likewise, I was finally able to calibrate the Bar30 Pressure Sensor without further incident (first photo attached).
I would not have been able to figure this issue out without your help.
PS: One last question, what is the effective length of Cat 5 cable that one can use into the Raspberry Pi without losing video. At 100feet, I get a connect signal, but no video. At 10 feet, I get a connect signal and plenty of video. I’m guessing, the right number is somewhere around 50 feet.
I think cat5 is rated to 100 meters, and I think you should be able to get video through at least 50’, but I’m not sure. There is a tool called iperf3 that you can use to test the network connection bandwidth and latency.
Thank you Jacob…School starts this week. Some subset of my Robotics students will have to figure out how to build a socially impactful robot which operates in marine environments. They will probably come up with their own design, but given that I have been through the process once, I will be in a position to talk them through the tricky bits (e.g., connecting a Bar 30 Pressure Sensor, booting ArduSub on a PixHawk 2.1, booting MaxProxy, etc.)
Very good. I would love to see some updates on the progress and feedback on the process. I’ve already made some notes to add better support for pixhawk 2.1.