Hey guys, so I am having some issues with getting external I2C temp sensors running on ArduPlane 4.3.7. In fact the TEMP parameters are missing altogether from the firmware it seems… or at least they are on mine. Any ideas why they are missing, or if something needs to be enabled for them to show up?
I just ran across the same issue on the exact same firmware version! Have you tried updating to a newer firmware? Have you tried anything else?
Not sure what else I can try, outside of updating! I have updated to v4.4 since apparently this is where these params get support, but even in v4.4 they don’t show up, which has me at a loss! In the wiki for v4.4 and v4.5 dev the TEMP params show up… but in the actual Full Param List in the autopilot they do not show up. I am open to ideas…
What flight controller?
I am using the CUAV V5+
Did you look at the Custom Firmware Builder and see what features are supported as default?
This is the first time I am hearing of a custom builder… would like to hear more!
Here Custom firmware builder
Thank you! I was able to build a firmware and flash it to the board, seemingly successfully, using the *.apj file that the builder generates. I can now see the TEMP params in the param list, however, I am running into another hurdle - I have an MCP9600 sensor connected to I2C port labelled 1 on the board, but since I can also see I2C labelled 4 on the board, I assume in the TEMP params the TEMP1_BUS should be set to 0 for I2C port 1, or should it be set to 1? Also, how do I find out the I2C address of the sensor so I can input it in the TEMP1_ADDR param? Thanks in advance for any help you can provide.
I can answer at least one of your questions, the I2C address of the sensor you are using should be in the datasheet of that sensor on the manufacturer’s website.
Well I was not able to easily find that for the temp module I have, so I used an Arduino loaded with an I2C scanner. It showed the address in hexadecimal format, so I assume I just have to convert it to decimal for use with ArduPlane’s firmware? I also found out how to change the address, tried that too, but regardless of what address I input into the TEMP1_ADDR param, upon restart it always defaults to 96. I changed the address of the module to 96 decimal address, which in hexa was 0x60, still no luck! I then found some code for the Arduino to run this sensor module, and when I run the module fron the Arduino board, it works well, outputs temperatures, etc., all looks good. I connect it to ArduPlane… nothing… temperature shows 0 at all times and doesn’t change.
I have the same sensor as you but I have not tried extensively to get it to work. You are correct that the address should be in decimal. How did you change the sensor’s I2C address? Did you use the pads on the sensor or change it through Arduino? Did you also make sure to enable temperature logging?
Well one of the changes is by connecting the AD pad with the GND pad, that would change it from 0x67 to 0x60, which equates to 96, which is the value the TIME1_ADDR parameter assumes on restart! No matter what I change it to, it reverts to 96 upon restart. Hence, luckily, one of the addresses you can set the board to is 0x60, or in decimal 96, so I did that… but sadly there are still no values showing up on the HUD. I have set that value to be displayed on the ESC1 temp data, but it doesn’t show anything other than zero.
Probably set TEMP1_BUS=0. TEMP1_ADDR is writeable, so you should be able to set it however you want. Be sure to actually write the parameters after changing them in MP.
The value should show as a discrete temperature sensor in the telemetry, not as an ESC sensor.
The TEMP1_BUS is set to 0 by detaul, and I have connected the sensor to I2C 1 port, so I assume that is the BUS 0 one. I know TEMP1_ADDR should be writeable, and I do change the value, I write the parameters, it tells me they are saved successfully. Then I power off the FC, power it back on, load params and when I go back to check the TEMP1_ADDR value, it is back to 96. I have this page of the arduplane wiki open constantly… sadly it is of little help! As far as I understand what is written in the wiki though, is that the value of the sensor I indicate with the SRC and SRC_ID params will be replaced by the temp value coming from the sensor connected to the I2C bus. Also… not sure what a discrete temperature sensor in telemetry should mean…