Shop OBEX P1 Docs P2 Docs Learn Events
PropScope tamed — Parallax Forums

PropScope tamed

KenEnglandKenEngland Posts: 3
edited 2013-08-30 06:58 in Accessories
PropScope tamed

There have been a number of posts about the PropScope showing severely distorted waveforms, artefacts and the software freezing every few seconds.

When I received my Propscope, I noticed that after a few seconds use, clean waveforms were shown to have severe ‘ringing’ every half cycle and the software would crash every few minutes.

The suggested solution was to replace the USB lead, but this had no effect.

I was promptly supplied with a replacement PropScope, but unfortunately this was only marginally better than the original. In frustration, I started to delve in to the design.

The propeller microprocessor is designed to work at a maximum of 80MHz (5 MHz crystal times 16). It is also designed to work at 3.3 volts.

The PropScope has a 6.25MHz crystal so that the PropScope works at 6.25 x 16 i.e. 100MHz; so it is over clocked by 25%. The reason for this is to increase the resolution of the PropScope. It also runs at 3.0 volts. That is 10% under voltage. I can’t understand the reason for this unless the designer was concerned about the additional heat generated by over clocking.

Delving in to the datasheet for the propeller chip, section 10.2 shows the results of over clocking tests, and the graph clearly shows the relationship between the ability to over clock and the supply voltage. The lower the voltage, the less ability there is to over clock. Over clocking by 25% whilst running at 90% voltage is, shall we say, optimistic.

Some processors manage it, but on others, one or more cogs fail as the chip temperature increases giving the unpredictable results noticed by some users.

The solution is to replace the 3.0 volt regulator (TPS79330DBVR) with a 3.3 volt one (TPS79333DBVR) (more of this below). This cures the problem, and my PropScope now runs perfectly. There is no hint of the propeller running ‘hot’ so there are no concerns about thermal issues as far as I can see.

Replacing the surface mount regulator is not a job for inexperienced constructors. Unless you have proper de-soldering equipment, it is probably best to sacrifice the existing regulator by cutting through the five legs and removing each separately. In my experience you can save a chip by sacrificing the printed circuit board or save the circuit board by sacrificing the chip, but you can’t save both. You will need an extremely fine soldering iron, a magnifying glass and a steady hand.

Just to repeat, this is not a job for the inexperienced.

Unfortunately, replacing the regulator does have a down side in that it slightly alters the calibration of the PropScope. This is assuming that it was well calibrated before the modification; I did not check. I think most people could live with the PropScope without recalibration as in most cases it is the waveform that is of interest, but if you are using it to make precise voltage measurement, you need to keep this in mind.

This brings me to the firmware documentation. I found three copies of the documentation:

Preliminary - PropScope Firmware Specifications.pdf
Preliminary - PropScope Firmware Specifications.odt
PropScope Firmware Specifications v0.9.docx

These three documents are all slightly different, but for the following, I have assumed that V0.9 is the latest.

I decided I would re-calibrate my PropScope, by re-writing the EEPROM. The first thing to do is to read the existing values and store them very safely. You want to be able to go back and replace them if things go wrong.

I tried several methods of trying to re-calculate the values semi-automatically, but none of these worked particularly well. I ended up with the low-tech method of adjusting each value in turn and then checking the effect using a precision voltage reference. It is worth noting the resolution of the ADC on each of the ranges, as this affects the accuracy that can be obtained:

5V Relay off / 20 2 Volt range +/- 10 volts ADC step 19.5 mV
2V Relay off / 20 1 Volt range +/- 5 volts ADC step 9.8 mV
1V Relay off / 20 1 Volt range +/- 5 volts ADC step 9.8 mV
0.5V Relay on / 2 2 Volt range +/- 1 volts ADC step 2.0 mV
0.2V Relay on / 2 2 Volt range +/- 1 volts ADC step 2.0 mV
100mV Relay on / 2 1 Volt range +/- .5 volts ADC step 1.0 mV

So, for example, on the 5 volt range, if the readings are within 9.75 millivolts (19.5 / 2), you are not going to get it any better.

The table of EEPROM addresses in all three versions of the firmware specification is wrong. The actual parameters are as below:

$FF7F through $FF8E contain "PropScope Rev A " or $50726F7053636F706520526576204120

$FF8F and $FF90 contain the hardware version in a two-byte word, least significant byte first.

$FF91 and $FF92 contain the test version in a two-byte word, least significant byte first.

$FF93 through $FFEE contain four-byte calibration words, least significant bit first,

$FF93 Ideal value for positive scale with 1/20 divider and 1 Vp-p ADC range
$FF97 Actual reading for channel 2 positive scale with 1/20 divider and 1 Vp-p ADC range
$FF9B Actual reading for channel 1 positive scale with 1/20 divider and 1 Vp-p ADC range

$FF9F Ideal value for negative scale with 1/20 divider and 1 Vp-p ADC range
$FFA3 Actual reading for channel 2 negative scale with 1/20 divider and 1 Vp-p ADC range
$FFA7 Actual reading for channel 1 negative scale with 1/20 divider and 1 Vp-p ADC range

$FFAB Ideal value for positive scale with 1/20 divider and 2 Vp-p ADC range
$FFAF Actual reading for channel 2 positive scale with 1/20 divider and 2 Vp-p ADC range
$FFB3 Actual reading for channel 1 positive scale with 1/20 divider and 2 Vp-p ADC range

$FFB7 Ideal value for negative scale with 1/20 divider and 2 Vp-p ADC range
$FFBB Actual reading for channel 2 negative scale with 1/20 divider and 2 Vp-p ADC range
$FFBF Actual reading for channel 1 negative scale with 1/20 divider and 2 Vp-p ADC range

$FFC3 Ideal value for positive scale with 1/2 divider and 2 Vp-p ADC range
$FFC7 Actual reading for channel 2 positive scale with 1/2 divider and 2 Vp-p ADC range
$FFCB Actual reading for channel 1 positive scale with 1/2 divider and 2 Vp-p ADC range

$FFCF Ideal value for negative scale with 1/2 divider and 2 Vp-p ADC range
$FFD3 Actual reading for channel 2 negative scale with 1/2 divider and 2 Vp-p ADC range
$FFD7 Actual reading for channel 1 negative scale with 1/2 divider and 2 Vp-p ADC range

$FFDB Ideal value for ground voltage for all ranges
$FFDF Actual channel 2 reading for ground voltage with 2 Vp-p ADC input range
$FFE3 Actual channel 1 reading for ground voltage with 2 Vp-p ADC input range
$FFE7 Actual channel 2 reading for ground voltage with 1 Vp-p ADC input range
$FFEB Actual channel 1 reading for ground voltage with 1 Vp-p ADC input range

The main changes are that channels 1 and 2 are reversed, the addresses are incorrect in two of the documents and the divider is /20 not /10 as shown throughout the documentation. Also, for completeness, where the documentation describes the operation of the AC / DC relay, the operation is actually the reverse.

Returning to the table above, the only parameters that seem to have any effect are the 12 marked ‘Actual reading for channel x’ excluding the readings for ‘ground voltage’ which also do not appear to do anything. However, for safely, I set the ground voltage parameters to the midpoint of the new positive and negative values.

As a rough guide, I detail the adjustment that I ended up with:

' 5 volt range 2 volt divide by 20
CH1_20_2V_plus := CH1_20_2V_plus + 2000
CH2_20_2V_plus := CH2_20_2V_plus + 2750
CH1_20_2V_minus := CH1_20_2V_minus + 1000
CH2_20_2V_minus := CH2_20_2V_minus + 1250

'1 and 2 volt range 1 volt divide by 20
CH1_20_1V_plus := CH1_20_1V_plus + 2750
CH2_20_1V_plus := CH2_20_1V_plus + 2250
CH1_20_1V_minus := CH1_20_1V_minus + 1000
CH2_20_1V_minus := CH2_20_1V_minus + 0000

'0.5 and 0.2 volt range 2 volt divide by 2
CH1_2_2V_plus := CH1_2_2V_plus - 8750
CH2_2_2V_plus := CH2_2_2V_plus - 8250
CH1_2_2V_minus := CH1_2_2V_minus + 9250
CH2_2_2V_minus := CH2_2_2V_minus + 9000

CH1_20_1V_ground := (CH1_20_1V_plus + CH1_20_1V_minus) / 2
CH2_20_1V_ground := (CH2_20_1V_plus + CH2_20_1V_minus) / 2
CH1_20_2V_ground := (CH1_20_2V_plus + CH1_20_2V_minus) / 2
CH2_20_2V_ground := (CH2_20_2V_plus + CH2_20_2V_minus) / 2
CH1_2_2V_ground := (CH1_2_2V_plus + CH1_2_2V_minus) / 2
CH2_2_2V_ground := (CH2_2_2V_plus + CH2_2_2V_minus) / 2

Just to stress again, if you are going to mess with the EEPROM, make sure you take a copy first and keep it securely.

My PropScope is now working perfectly. If anyone knows a more streamlined approach to calibration, I would be interested, but I am happy with the accuracy I have achieved.

Comments

  • David CarrierDavid Carrier Posts: 294
    edited 2012-06-15 10:31
    The Propeller is specified to run from 2.7 to 3.6 VDC from DC to 80 MHz between -55 and +125 °C, (see page 25 of version 1.4 of the Propeller Datasheet) which means that at any combination of extremes of frequency, temperature, and voltage, it will run. Anything outside that range would need to be qualified by the developer. The PropScope is specified to work over a more limited temperature range of 0 to 70 °C. It runs the Propeller at 3.0 VDC and clocks the Propeller at 100 MHz. In this case, we have qualified the Propeller at 100 MHz over the more limited temperature range of 0 to 70 °C at 3.0 VDC. (See page 31 of the same datasheet.)

    The ADC can run from 2.7 to 3.4 VDC, but it is characterized at 3.0 VDC. (Seep age 5 of the LTC2286 datasheet, especially note 8.) This means that it will run fine in the temperature range, but the characterizations they give are only valid with a 3.0 supply. At 3.3 VDC, the measurements may not be as accurate.

    Our research is showing that the problem that we are having is that, because the FT232R USB to serial converter does not specify any rate of data throughput, some of them have higher rates than others. The current PropScope software and firmware combination communicates using 1 megabaud, 2 stop bits, 8 data bits, no parity, and no flow control. With flow control, when the transmission rate is to high for the converter, it halts the incoming data transmission until it can catch up. Without flow control, as in the case of the PropScope, it ignores incoming data until it can catch up. This causes holes in the data stream that are causing glitches in the PropScope software display. We are currently working on a fix for this situation, and will let you know as soon as we have a resolution.

    As far as the PropScope you have modified, I like to see that you are digging into the hardware. If you would like, I could send you an extra PropScope mainboard that you can keep unmodified, and you can use your current one as a platform to experiment with. Just send me a private message on this forum or an email to dcarrier@parallax.com. Also, if you have difficulty reworking the surface-mount regulator, you can remove or disconnect it and supply power through the 3.0 volt output of the expansion connector. You can draw power for the regulator from the 5 volt output.

    Thank you for your feedback on the firmware documentation. The latest version is 0.9. I was aware of the swap between channels, but I did not know that it had the division incorrectly. The documentation is for developing custom firmware, as opposed to documenting the firmware that the PropScope software uses, so it documents all of the calibration information that is available, even if the firmware attached to the PropScope software doesn't use it.

    — David Carrier
    Parallax Inc.
  • KenEnglandKenEngland Posts: 3
    edited 2012-06-15 13:11
    Hi David

    Many thanks for your reply.

    Thank you for the link to version 1.4 of the Propeller Datasheet, my latest copy was 1.2. I think the graph on page 31 shows that at 100MHz and 3.0 volts you are close to the limit as I assume the 70 °C will refer to the die temperature and not the surrounding ambient temperature.

    I also appreciate that running the LTC2286 at 3.3 volts is close to the 3.4 volt limit and that this may affect its performance.

    I am interested in your comments about the FT232R USB to serial converter. I cannot see how my modification would have affected the FT232R as it runs from the 5 volt rail. I wonder if there are two different problems, one with the propeller and the other with the FT232R.

    I meant to mention supplying the 3.3 volts via the expansion connector in my original post. I actually did this exactly as you suggested as a proof of concept before fitting the new surface mount regulator. I used a 3.3 volt 100 ma discrete 3 pin regulator to prove it worked. I actually fitted this on the user end of the expansion socket, but it could, no doubt, be fitted permanently on the inside of the case by connecting it to the pins. I just didn’t think it would be very neat, but then again, who is going to see it!

    My comments on the firmware documentation were not intended as criticism, but purely to help others who are delving into the innards of the PropScope.
  • KenEnglandKenEngland Posts: 3
    edited 2012-06-16 02:48
    I attach the test program I used to diagnose the problem with my PropScope.

    At 3.0 volts, cog 7 failed spectacularly and was not even able to calculate 1 + 2 + 3.

    When I replaced the regulator with the 3.3 volt one everything ran fine, even during extended testing.

    I would suggest that you try the program before attacking a PropScope with a soldering iron. If the program runs, leave well alone.
  • David CarrierDavid Carrier Posts: 294
    edited 2012-06-18 17:37
    Your PropScope definitely has something wrong with the hardware. I didn't even notice it when I read your original post, but changing the voltage yo are running the Propeller and ADC at wouldn't affect the calibration values. (The ADC has a built-in band-gap voltage reference.) A few manufacturing runs ago, we accidentally built some PropScopes with incompletely tested Propellers, and you probably received one as a replacement.

    We have recently been analyzing our returned PropScopes, and part of that analysis was to test the Propeller microncontrollers on them, to make sure that they hadn't been damaged. A couple of the returned PropScopes had bad cog RAM, which is not indicative of damage, but would have been that way when the Propeller shipped. (Bad cog RAM can cause the cog to fail with very simple tasks which happen to set the bad bit to the non-working state, even though it will work fine on more complex tasks that leave the bad bit in the working state.) The majority of the PropScopes had communications problems unrelated to the Propeller's operation, which is what I had explained in my previous post.

    When We get the PropScopes back in stock, I'll personally test a brand new one to make sure that you don't get another bad one in a row.

    — David Carrier
    Parallax Inc.
  • DB_CooperDB_Cooper Posts: 3
    edited 2012-07-02 13:38
    I returned a Propscope several months ago featuring this problem as well. I am curious to know what issues you found with it. Do you track them by RMA? Mine was #8056. Was this the memory problem or processor problem. I am relatively sure it was not the serial controller.
  • blittledblittled Posts: 681
    edited 2013-08-30 06:58
    In the first post it was stated

    $FF93 through $FFEE contain four-byte calibration words, least significant bit first

    Is least significant BIT correct or should it be least significant BYTE?
Sign In or Register to comment.