Navigating between oscilloscope-land (Volts) and RF-land (dBm)

Have you ever been annonyed by the dBm and V units when you try to measure output from your benchtop signal generator (or arbitrary waveform generator, or ARB) with a spectrum analyzer, or measure a RF signal (sine) generator with an oscilloscope?

TLDR

For $50\Omega$ systems only. The fastest way is to work with squared voltages in linear scale with the provided ‘magic’ scaling factor (10 for amplitude and 20 for rms) and not mess with factorization in the log (dB) or anti-log ($10^{\frac{\mathrm{dB}}{10}}$) process:

P[\mathrm{mW}]=10V_{pp}^2=20V_{rms}^2
\mathrm{dBmW}=\mathrm{dB}\left(10V_{pp}^2\right)=\mathrm{dB}\left(20V_{rms}^2\right)

This happens a lot during calibration. An oscilloscope needs a 500Mhz signal at $600mV_{pp}$ to test if the front-end rolls off too early (i.e. have a lower bandwidth than advertised), yet my \$12k RF signal generator (20Ghz sweeper) only does dBm, and in coarse increments of 0.1dBm.

  • Decibel is supposed to be a dimensionless quantity, aka just a ratio.
  • The confusion came from people in each field abusing notations by skipping the reference quantity suffix after dB. e.g. RF people write dBW and dBmW (a dimensioned quantity with loaded assumptions of a $50\Omega$ scaling) as dB and dBm (which would naturally read as a dimensionless ratio)
  • When RF people talk about decibels, especially when they abuse notations by not mentioning the reference (basis) quantity, you can be pretty sure that they are talking about ratios between power quantites (dBW), not voltage quantities (such as dBV).
  • There’s no such thing as a $20log_{10}$ decibel unit. It’s always $10log_{10}$ dimensionless. The factor of 2 came from the square (power of 2) factoring out of logarithms as a multiple of 2 when ratios of power are expressed as ratios of voltages.
  • Always work in power ratios to avoid the confusion. dB is dimensionless but often the unspoken rule is that it’s a ratio of power quantities. Routines or formula like mag2db really mean magnitude_squared_in_dB because it’s doing $10log_{10}(A^2)$.
  • The other advantage of actually squaring the term first before taking the log is that you do not have to check the input for negative values as the squaring operation made it absolute value (square). If you are doing a logarithm, an extra multiplication (over an addition) is insignicant in terms of computational burden.
  • $V_{rms}$ maps directly to power quantities, scaled by the impedance (which is typically $50\Omega$). Everything else involves an extra crest factor (which is $\sqrt{2}$ for sinusoids)
Continue reading

Loading

TL866CS and TL866A recovery mode

I was playing around with my TL866 programmer trying to refresh the firmware and needed to get to the recovery mode. However, it seems like the recovery mode info on http://www.autoelectric.cn/en/note.html is incorrect for 2014 design (the one I have). I tried the 240\Omega as recommended with a decade box and it doesn’t work .

Usually my guess that if somebody is going to set a recovery mode in a micro-controller to be enabled with some hardware path to the power supply rail with a small resistor, it’s just saying that he wants you to pull the pin high.

The said pin is a digital I/O line so I took it as a GPIO pin used for input (I might be wrong)

I measured the voltage of the said regulator with a decade box. Interesting that if I flip the resistance while the unit is on, it occasionally remembers the last state when I plug it in again! (EDIT: There is a Schmitt Trigger buffer in between. The buffer type says ST for RC1. Doh!)

Here are some of my measurements with a decade box:

Continue reading

Loading

54855A/54854A Oscilloscope won’t power on

Recently I got a 54855A oscilloscope sent back to me for service under the 1 year warranty I underwrote for most of the unit I’ve sold direct. The unit would not turn on at all after sitting for a long time.

I looked up the forum and it turns out other people had this problem with a certain generation of Infiniiums and sometimes changing power supply or motherboard would disturb the setup a little bit and the unit might power on again. When I tried to do that, the unit does boot a quite few times but the problem randomly came back again. This is frustrating as it’s a heisenbug. I almost thought I was done when the unit worked consistently for a week then it comes back. It just looked like something component was acting borderline and disturbing the setup and got it to click.

In the past I had 54830s that’s ‘fixed’ by changing either one of the motherboard or power supply, but turns out that those were flukes, but I didn’t get lucky with 54850s this time.

The customer gave me time to troubleshoot deeper instead of just getting something to work as a fluke by just blindly changing modules which might break down again at a random time if it’s a gravitating aging problem (i.e. if you figured out a problem, it tends to be a wave of manufactured gears that’ll trip on the the same issue as they age). So I spent a whole month troubleshooting through reverse engineering the circuit and nailed down the cause and the fix.

There’s a lot of mixed info going on in the forum with different modes of failure, but those might not be the real cause, as replacing components disturbs a set up that wasn’t supposed to be in that state in the first place and the unit is prone to get trapped into a bad state when the unit ages. The real fix is to plug the path to the bad state in the first place instead of rocking the boat hoping the new combination doesn’t trigger the bad state.

Continue reading

Loading

All in 1 Mini Card Reader Manufacturing Flaw (Bad USB connector)

Recently, I’ve bought this CF card reader on eBay but it doesn’t detect at all.

Picture 4 of 7

I looked closely into the connector with a loupe and realized that the mini USB conductor was molded incorrectly. The center middle pin was pushed down because extra plastic was deposited above it:

The seller refunded in full but I figured that if the connector is malformed at the molding stage, buying it from another seller is not going to make it work, and the other form factors/connector configurations are inconvenient, so I tried my luck and see if there are exact matches for the connector they’ve used. Turns out it’s a 56 cents connector (price for 1 piece) available in Mouser (UJ2-MBH-1-SMT-TR):

In bulk, this connector can be bought for $0.22. For something that’s selling for $5/pc, the Red Chinese manufacturing had to go cheap to shave a few cents that ended up turning finished products into total trash. Most people are not electronics/troubleshooting savvy enough to figure out this shit, and the labor cracking the piece up and the SMD rework can easily buy 20pcs new. I just happened to have the tools (Metcal hot tweezers) so I can desolder the bad connector in seconds, but average users do not have that luxury so the neutered USB card readers go straight into trash.

We need more products NOT made in China!

Loading

Are powered USB hub bus-powered?

I’ve bought many powered USB hubs, even the expensive industrial version like Startech, but they never work reliably when I connect multiple devices that draws quite a bit of power. The behavior is the same (erratic when too many power drawing devices are active within one hub) whether I supply the hub with external power or not.

I suspected the USB hubs wasn’t wired in a way that the USB hub controller understands that I want to have the hub self-powered (powered from an external source like a wall wart instead of drawing the 5V from the USB upstream cable). So I opened up my StarTech and it looked like this:

Love that it’s made in Taiwan and they cut no corners in power management.
10 ports means 3 x 4-port hub chained and they do not share power converters.

On the top left corner, there’s a jumper to set the USB hub to use self-powered instead of bus-powered (default out of the box). I switched the jumpers and the board no longer takes power from the upstream bus and the lights won’t light up until I have the local power connected, which confirms it’s working as a self-powered hub.

Loading