Topics

Relative Power indication on Nextion display

Mike WA0YCN
 

I’m running the basic CEC software (not _S version) using the LM358-based S-meter sensor Ian offered on his site to drive the S-meter function on the Nextion display. To attempt relative power indication, I Incorporated the concept from his “simpler” version (without the LM358), tapping off the antenna connector to provide input to the IC to approximate power level.

My hybrid version is producing appropriate output on the A7 line during both receive and transmit.  However, while the Nextion display works fine during receive, it does not show any indication of the value (on A7) during transmit.  Does the CEC software turn off the “meter” feature during transmit?  If so, is there a setting to change that, or a compile time declaration to make it active?

Thanks.

Mike WA0YCN
 

Is anyone using the Nextion meter for relative power and not just S-meter function?  I’m not seeing a place in the code to disable it during transmit, but even with voltage on A7 not getting any deflection.

Thank you.

Mike

Dan YO5RXM
 

Hi Mike, I am building now a SWR Bridge from Kits and Parts to display the output power on LCD and I have the same issue, on RX voltage on A7 is indicated on my 16x2 as expected, on TX there is no indication regardless of the potential of A7. I am looking into the code but I am a little overwhelmed, but I don't loose hope just yet. Maybe someone could help us. Thank you!

Mike WA0YCN
 

Dan,

I’m getting inconsistent results on the receive side as well. Sometimes it works, sometimes not. I wonder if there is a code path that latches The A7 port - to zero during transmit, high during receive. 


Mike

Dan YO5RXM
 

Hi Mike, 
I took some time this weekend to look into the code. Indeed, the analog pin A7 is read only during RX, in a process called idle_process() .With a very simple code change I was able to read the analog pin during TX. but only for PTT and TX from CAT. It does not work when keying down (I don't know why, I wasn't able to figure it out).
So now I am using A7 for both S-Meter (during receive) and for FWD/REF during TX. 
The code change as follows:
ubitx_20.ino, line 1515, insert the following lines between  " } //end of check TX Status" and   "//we check CAT after the encoder as it might put the radio into TX"

  else
  {
    if (beforeIdle_ProcessTime < millis() - 250) {
      DisplayMeter(2, analogRead(ANALOG_SMETER)/50, 13);  //calibrated so that 2,5V is full scale of display meter, change according to the input voltage on pin 7
      beforeIdle_ProcessTime = millis();
    }
  }
 
      
 

Dan YO5RXM
 

PS: I am using CEC firmware version 1.20.

Mike WA0YCN
 

Dan,

Thanks for the info.  To this point, I have only used .hex files in the Raduino.  I need to successfully compile and build a version, and will definitely include your code.  When I do, I'll see if I can figure anything out about it not displaying for CW.

I'm still experiencing infrequent times where the S-meter is frozen mid-scale.  Have you run into that?

Regards,

Mike

Dan YO5RXM
 

Hi MIke, 
Well sort of. In ubitx.h file there is a setting for SMeterLatency, which is by default 3. I changed it to 1 (this means 0.25 sec latency instead of 0.75) and now S-Meter seems more "fluid".
The setting is line 56:
#define SMeterLatency   3               //1 is 0.25 sec