Menu

Temp Probe not working

2021-05-26
2021-05-29
  • Clifford de Wit

    Clifford de Wit - 2021-05-26

    Hi Robert

    I cant seem to get the temperature probe to work. I am 100% sure the HW is correct because I used the DS18x20 sample in the onewire library as a test program and it finds the sensor on D13 and displays the current temp :

    ROM = 28 FF D1 4F 68 18 3 59
    Chip = DS18B20
    Data = 1 30 1 4B 46 7F FF C 10 9 CRC=9
    Temperature = 19.00 Celsius, 66.20 Fahrenheit
    No more addresses.

    Code attached

    I get a strange error with Half Stepper dependency when trying to use your test program so I used the one above.

    When I compile and upload firmware version "FIRMWARE OFFICIAL RELEASE 223" the probe always returns 20c and when I enabled Temp debugging I get a message in the log that the says :

    "Probe not found"

    I actually went back to previous Firmware and I get the same issue.

    Any ideas on this or ways I could help debug ?

    Cliff

     
  • brownrb

    brownrb - 2021-05-26

    Did you enable the temperature probe in the management server interface?
    see pg32 of myFP2ESP-224-1
    ENABLING THE TEMPERATURE PROBE
    To enable the temperature probe, you must use the Management Server Interface, page2.

    Paste a copy of your board_config.jsn AND data_per.jsn files

     

    Last edit: brownrb 2021-05-26
  • Clifford de Wit

    Clifford de Wit - 2021-05-26

    Hi

    Yea I read the PDF carefully so made sure it was enabled. I jumped into the code a bit an enabled the debug trace and I can see that as soon as I enable it I get the "Probe not found" error line 91 of temp.cpp.

    Pretty sure the config is correct because I even tried hard coding the pin bypassing the configuration files and still get the error.

    oneWirech1.begin( mySetupData->get_brdtemppin() );    // start onewire;
    //oneWirech1.begin( 13 );    // CdW Mod
    

    It is very strange looks like the scan is not working and does not find the one wire device.

    Attached are the two files.

    Thanks for the help.

    Cliff

     
  • brownrb

    brownrb - 2021-05-27

    Hi Clifford
    I have reviewed the files you posted.
    The board_config.jsn does not look right,
    "brdnum":44
    but you have "brdnum":0

    When you upload new firmware, you also need to upload the sketch data files.
    The board_config file format was changed recently and I think that you may have used an older board_config file or did not upload the new sketch data files? or replaced board_config.jsn?

    I have tested and retested the temp code

    Please try attached test program. The output is on the serial monitor at 5600

     
  • Clifford de Wit

    Clifford de Wit - 2021-05-27

    HI Robert

    Thank for the test program it help debug the issue. I ran it and uploaded and no tep just this error.

    FS mounted
    LoadConfiguration: Persistant SetupData= {"maxstep":80000,"stepsize":50,"delayaftermove":0,"backlashsteps_in":0,"backlashsteps_out":0,"backlash_in_enabled":1,"backlash_out_enabled":1,"tempcoefficient":0,"tempresolution":10,"coilpwr":0,"cptimeout":120000,"rdirection":0,"stepsizestate":0,"tempmode":1,"oledupdateonmove":1,"oledpagetime":2,"tempcompstate":0,"tcdir":0,"motorspeed":2,"displaystate":1,"preset":[0,0,0,0,0,0,0,0,0,0],"wsport":80,"ascomport":4040,"mdnsport":7070,"wprefreshrate":60,"tcpipport":2020,"startscrn":0,"bcol":"333333","tcol":"5d6d7e","hcol":"3399ff","ticol":"8e44ad","ason":0,"wson":0,"tprobe":1,"leds":0,"hpswmsg":0,"fcdownld":0,"oledpg":"111","mspeed":2,"hpswen":0,"pbenable":0,"indi":0,"stallguard":100,"tmc2225mA":300,"tmc2209mA":600}
    data_per loaded
    Open board_config file:/board_config.jsn
    board_config file loaded
    LoadConfiguration: data_var=
    Err: no data_var file. Create defaults.
    data_var loaded
    driver board: start
    driver board: end
    Start temperature sensor
    Temp probe:enabled
    start_temp_probe()
    temp pin not defined.
    temperatureprobestate = 1
    tprobe1 is 0
    set temperatureprobestate to 0
    ++ request for saving persitant data

    Then I cleared the flash, cleard the build rebuilt the code and made sure all the libs were the same as the one in your latest GIT libraray folder.

    I rebuilt and reprogrammed the device and then reuploaded the SPIFF files.

    Now it works.

    Thanks one step closer to production.

    Cliff

     
  • Clifford de Wit

    Clifford de Wit - 2021-05-27

    HI Robert

    Thank for the test program it help debug the issue. I ran it and uploaded and no tep just this error.

    FS mounted
    LoadConfiguration: Persistant SetupData= {"maxstep":80000,"stepsize":50,"delayaftermove":0,"backlashsteps_in":0,"backlashsteps_out":0,"backlash_in_enabled":1,"backlash_out_enabled":1,"tempcoefficient":0,"tempresolution":10,"coilpwr":0,"cptimeout":120000,"rdirection":0,"stepsizestate":0,"tempmode":1,"oledupdateonmove":1,"oledpagetime":2,"tempcompstate":0,"tcdir":0,"motorspeed":2,"displaystate":1,"preset":[0,0,0,0,0,0,0,0,0,0],"wsport":80,"ascomport":4040,"mdnsport":7070,"wprefreshrate":60,"tcpipport":2020,"startscrn":0,"bcol":"333333","tcol":"5d6d7e","hcol":"3399ff","ticol":"8e44ad","ason":0,"wson":0,"tprobe":1,"leds":0,"hpswmsg":0,"fcdownld":0,"oledpg":"111","mspeed":2,"hpswen":0,"pbenable":0,"indi":0,"stallguard":100,"tmc2225mA":300,"tmc2209mA":600}
    data_per loaded
    Open board_config file:/board_config.jsn
    board_config file loaded
    LoadConfiguration: data_var=
    Err: no data_var file. Create defaults.
    data_var loaded
    driver board: start
    driver board: end
    Start temperature sensor
    Temp probe:enabled
    start_temp_probe()
    temp pin not defined.
    temperatureprobestate = 1
    tprobe1 is 0
    set temperatureprobestate to 0
    ++ request for saving persitant data

    Then I cleared the flash, cleard the build rebuilt the code and made sure all the libs were the same as the one in your latest GIT libraray folder.

    I rebuilt and reprogrammed the device and then reuploaded the SPIFF files.

    Now it works.

    Thanks one step closer to production.

    Cliff

     
  • brownrb

    brownrb - 2021-05-27

    Hi Clifford
    The section
    data_per loaded
    Open board_config file:/board_config.jsn
    board_config file loaded
    LoadConfiguration: data_var=
    Err: no data_var file. Create defaults.
    data_var loaded
    driver board: start
    driver board: end
    Start temperature sensor
    Temp probe:enabled
    start_temp_probe()
    temp pin not defined.

    indicates that it found no board_config.jsn file so built one from scratch (based on your choice of drvbrd). then it seems to go haywire with temppinnotdefined. If the board_config was constructed correctly, it should have looked like
    { "board":"PRO2ESP32DRV8825","maxstepmode":32,"stepmode":1,"sda":21,"sck":22,"enpin":14,"steppin":33,"dirpin":32,"temppin":13,"hpswpin":4,"inledpin":18,"outledpin":19,"pb1pin":34,"pb2pin":35,"irpin":15,"brdnum":44,"stepsrev":-1,"fixedsmode":-1,"brdpins":[27,26,25,-1],"msdelay":4000 }
    and temppin set to 13.

    I will take a look
    On the other front, I worked most of today on v225 myFP2ESP and fixed the oled graphics issues (and a few other things) and will look at releasing that shortly).

     
  • Clifford de Wit

    Clifford de Wit - 2021-05-27

    Hi Robert

    Thanks , yea i am sure you spend a fair amount of time on this it is quite a project having work in SW a lot I can appreciate the scale of this project.

    I have picked up a few other small issues you may be able to bat away quickly :

    • The Display Page Option does not seem to work. It always cycles through the same three pages. I tried 001 and 100 and still all three pages.Tried it from the Windows app and the Webpage too.
    • The Page Time on the web page is posting incorrectly if you put in 8 it sets 208 etc
    • I use INDI as and astroberry and I I had some connectivity issues, I found I had to cycle the TCP Server and then the INDI setting and then turn on the TCP server again to get it to work. Seems stable now even after a reboot of the focuser.
    • In the INDI log I am picking up some errors from the focuser, loos like the server is returning values it is not expecting. > * [ERROR] Unknown error: focuser temperature value (P6268#) Attached is the log file.

    I am happy to test a new build if you want let me know.

    Cliff

     
  • brownrb

    brownrb - 2021-05-28

    First, version 225 has been uploaded and fixes most of the issues
    225
    // Correct spelling errors
    // Fix I2C pin number errors in ESP8266 board config files
    // Fix initialization of I2C interface for most boards
    // Fix for OLED_TEXT initialization
    // Fix for OLED_GRAPHIC
    // Additional debug messages added
    // Fix for display page option (Note: Only works with OLED_TEXT)
    // Fix for display page time (Note: Only works with OLED_TEXT)

    https://github.com/brownrb/myFP2ESPFirmware/releases

    I do not have a system that runs INDI so I cannot see what is going on. But it looks like from the log that the responses are not synced with the requests.

    Unknown error: focuser temperature value (P6268#)
    Means that it requested temperature and got position insted (P=position, 6268 is the focuser position, # is end of response)

    In Windows and ASCOM a mutex is used for communication with the controller ensuring that things do not get out of sync.

    In general it should work with the INDI myFocuserPro2 driver, as the protocol is essentially the same.

    The INDI log you provided is not detailed enough. I need a log which has the interface commands and responses to be able to see what is going on.

    Are you running the controller as LOCALSERIAL? or TCP/IP?
    What connection type are you using in INDI - Serial or TCP/IP?

    I am assuming the myFocuserPro2 INDO driver with TCP/IP connection type. I don't think this has ever been tested. Certainly not be me, not saying anything other than interesting - there might be some unexpected things happening there

    You could ask Jaseem or others on the INDI forum how you can get a detailed log? And please look at the beginning of the firmware code line 31 to send an email to me instead so we can better communicate.

    Cheers
    Robert

     
  • Clifford de Wit

    Clifford de Wit - 2021-05-28

    Hi Robert

    Sure sent you a DM.

    Cliff

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.