Power Expander status port

Has anyone successfully used the status port on a power expander with a cortex?

Background

I have at least two, perhaps more, power expanders that when the status port is connected to the cortex the led on the power expander flashes red indicating a blown PTC. Others (here and here) have reported this problem in the past but I thought I would look into why this is happening a little more.

The PIC inside the power converter monitors both input battery voltage and also the voltage at the output connector going to the motors. The way this is done is by first reducing the voltage into a range that the PIC can handle using a potential divider and then converting this to a digital value within the PIC. The (partial) schematic for this is as follows. The full schematic is here, it’s not an official one, just hacked out from observations.

power_expander_schematic_part.jpg

The resistors R5 (50K) and R6 (25K) form a potential divider such that there is approximately 2.5V on pin 10 of the PIC when the battery voltage is 7.5V. This voltage is then fed through a 330 ohm resistor to pin 3 of the status port.

The cortex analog inputs (according to the wiki) have a 10K series resistor and then a 20K pulldown to ground. When the status port of the power expander is connected to the cortex this additional 30K is placed in parallel with R6 (ignoring the 330 ohm series resistor) giving an equivalent resistance of approximately 13600 ohms (there’s also a 470K pullup but we will also ignore that for now), this reduces the voltage on pin 10 to about 1.6V which is presumably the cause of the red flashing LED as it translates to a battery voltage of 4.8V. The wiki also has the conversion factors for converting the power expander status voltage to battery voltage. This is given as Vd / 45.6, where Vd is the digital value read from the analog input (apparently as a 10 bit value). 1.6V on a 10 bit scale is a value of 328 so the calculated voltage is about 7.2V, close enough.

The status port also has a 5V input from the cortex which is fed via a 100K resistor to pin 13 on the PIC. It would be possible for the firmware in the PIC to detect this input and change the thresholds for low voltage detection accordingly.

So there are two possible solutions.

  1. Change the firmware in the PIC.
  2. Reduce the values of R5 and R6 so as not to be affected by the input impeadance of the cortex.

As the cortex is reading the correct battery voltage according to the scale factor published on the wiki I would guess firmware is the issue.

Hopefully someone from VEX can comment on this.

1 Like

Yes, we are using it right now on our Cortex. We have it displaying the voltage of the battery on our LCD Display. Yes, the two years we have used it (Clean Sweep and Gateway) it has flashed red. At the World Championship in Clean Sweep someone from VEX (not remembering who - it was awhile ago…) said it was alright, and normal. I guess that’s just what it does when connected to the Cortex via the Status port. If you’re doing that, you’re pretty much always going to be using it to get the voltage anyway, so the light showing flashing red and nothing else shouldn’t be a problem.

~Jordan

1 Like

The above are possible solutions for Vex to implement as rolling change.

User-implemented solution brainstorming:

  1. use LCD to show the power expander battery voltage (per Jordan)
  2. Implement your own LED flashing code on Cortex, using yet another digital out port. Tape over the Power Expander LED…
  3. Hack the 3pin feedback cable to include an additional 30k? pullup. This would probably be legal for VRCC, but not highschool. Is there some value of pullup that will both let the Power Expander LED feedback work correctly, and allow Cortex analog input to convert to correct voltage?
1 Like

jpearman,

If you have a Power Expander and you are having problems using the Status port.
You will have to get an RMA number and we can fix/ upgrade the unit.

-Eli

Eli

Thanks, I need to check the two other units we have but that will have to wait until after next weekends competition.

Can you please give us some details on what the required change is, is it a hardware rev or a firmware upgrade? Was there a date when this change was applied to shipped units? If it is a firmware upgrade can you please just make the hex file (or better still the source code - no way that will ever happen I know) available so those of us with the tools can just upgrade ourselves.

1 Like

I wonder if there would be the same problem when using the Power Expander with the VEX Pro?

I know I really don’t need to use the Power Expander, but since I have it, I thought I could use it with my VEX Pro. There really isn’t any information about the ports of the VEX Pro on the VEX wiki like there is for the Cortex though. The only thing I know for sure is that they both have 12bit high resolution Analog ports.

I guess I’ll just have to try it and see if I get the flashing red LED - I figure I probably will. I wonder why it wasn’t mentioned, but I’m guessing it’s because everybody would have wanted their Power Expander fixed or upgraded. It would have been nice to know though. If it hadn’t been for this post, I would have assumed that it worked the same no matter which micrcontroller it was connected to.

Right now AURA had pretty much assumed that all power expanders had an issue when you used the status port, when ever we plug in the status port the LED flashes RED, we don’t have a problem with this and don’t intend to RMA as it takes to long from NZ but maybe its something VEX should look into if they are not already aware of it because as far as we can tell its a fairly wide spread defect

The flashing red led does not stop the power expander working other than the indication of tripping the PTC. Unfortunately having trained the students to check this LED before every match it’s going to be confusing for them. For now we are not going to implement the status check I had also been asking them to incorporate into the software all year.

I’m hoping it’s a firmware update, if that’s the case then it’s well within the capability of college students to install, however, I doubt VEX will release the firmware.

One solution is to use a resistor in the signal line going to the cortex as jgraber suggested (although not legal for high school, perhaps it is for college). I tried a 100K and it more or less works. The code in the cortex needs re-calibration as now the input analog level is lower but thats not a big deal. The power expander will also have a different threshold for detecting PTC failure but at least the led starts out green.

1 Like

I wanted to post a conclusion to this thread for others who may have this issue.

I finally received a “new” version power expander (they were on backorder for weeks) and had a look at the differences. The new one is marked POWER EXPANDER A2 where as the old one was just marked POWER EXPANDER. Plugging the status port into the cortex does not cause the red flashing led issue that the old unit has.

I should add that since the original post the wiki has been updated and says that there are in fact a total of five different versions (no rev, NC1, A, A1 and A2). It also gives revised conversion factors for the new A2 version, although still off by a factor of 4, it should be V = analog value/280 (for ROBOTC anyway).

The difference between the two versions I have is trivial, a change of a single resistor value from 25K to 150K. As far as I can tell there is no change to the firmware (unfortunately the code protection bit is set in the PIC so no firmware downloading), I have tested both and they now behave the same.

power_expander_schematic_partA2.jpg

My original post noted that the problem was related to the 30K input resistance of the cortex in parallel with the R6 resistor. Now that the value of R6 has been increased to 150K, the additional 30K in parallel gives a combined resistance of 25K (using 1/Rt = 1/R1 + 1/R2), back to the expected value by the software in the power expander.

Don’t try replacing this resistor at home unless you have the tools and experience to rework 0603 SMT components.

1 Like