The Smell of Molten Projects in the Morning

Ed Nisley's Blog: Shop notes, electronics, firmware, machinery, 3D printing, laser cuttery, and curiosities. Contents: 100% human thinking, 0% AI slop.

Month: May 2017

  • AD8310 Log Amp Module: Video Bandwidth Rolloff

    The part I didn’t understand turned out to be the bandwidth of the final output stage = “video bandwidth”, which defaults to 25 MHz. After fixing the input circuitry, a 25 MHz VBW let the output track a 60 kHz input signal just fine:

    AD8310 - modified - 60 kHz 1Vpp
    AD8310 – modified – 60 kHz 1Vpp

    Adding a 56 nF cap across the C6 terminals (just above the AD8310) lowered the VBW to about 1 kHz:

    AD8310 Log Amp module - VBW rolloff cap
    AD8310 Log Amp module – VBW rolloff cap

    Which flattened that sucker right out:

    AD8310 - 1 kHz VBW cap - 60 kHz 1.394 V
    AD8310 – 1 kHz VBW cap – 60 kHz 1.394 V

    The ripple for an absurdly high amplitude 32 kHz signal amounts to 36 mV:

    AD8310 - 1 kHz VBW cap - 32 kHz - VBW ripple
    AD8310 – 1 kHz VBW cap – 32 kHz – VBW ripple

    Firing the tracking generator into the input with a frequency sweep from 100 kHz to 250 MHz shows the low end looks much better:

    AD8310 - 1 kHz VBW cap - 100 kHz 250 MHz - 0 dB atten
    AD8310 – 1 kHz VBW cap – 100 kHz 250 MHz – 0 dB atten

    There’s a slight droop across the sweep that might amount to 50 mV = 2 dB, which I’m inclined to not worry about in this context.

    Applying the attenuators once again produces a scale factor of 23.5 mV/dB across 30 dB of RF, but this time the 60 kHz output makes sense, too.

    Using the typical output curve from AN-691, that 2.0 V output corresponds to -13 dBm, which sounds about right for the tracking generator (which might really be -10 dBm).

    I must calibrate the log amp output to find the actual intercept point (nominally -95 dBm, but could range from -86 to -102) at 60 kHz. The intercept is the extrapolated RF input producing 0 V out, which then acts as an offset for the voltage-to-dBm calculation; you start by finding the slope of the voltage vs. dBm line at some convenient power levels, then solve for dBm with V=0.

    So a cheap AD8310 Log Amp module from eBay can work in the LF band, after you rearrange the input circuitry and tweak the chip’s filters. At least now I have a better understanding of what’s going on …

  • AD8310 Log Amp Module: Corrected Input Circuit

    After puzzling over the AD8310 Log Amp module’s peculiar frequency response, I hacked up the front end circuitry to match the data sheet’s recommended layout:

    AD8310 Log Amp module - revised
    AD8310 Log Amp module – revised

    Given the intended LF crystal-measurement application, a hulking 51 Ω metal film resistor sprawled across the ground plane will work just fine. All three ceramic caps measure a bit under 1 µF; I intended to solder the input caps atop the existing 10 nF caps, but that didn’t work out well at all.

    I should harvest the InLo SMA connector to prevent anyone from mistaking it for an actual input.

    With that in place, the log amp output makes more sense:

    AD8310 - modified - 100 kHz 150 MHz - 0 dB atten
    AD8310 – modified – 100 kHz 150 MHz – 0 dB atten

    That trace tops out at 150 MHz, not the previous 500 MHz, but now the response is flat all the way out. The log amp generates plenty of hash when the tracking generator isn’t producing a valid signal.

    The 60 kHz response looks different:

    AD8310 - modified - 60 kHz 1Vpp
    AD8310 – modified – 60 kHz 1Vpp

    So it’s really the log amp response to the absolute value of the sine wave (or, more accurately, to the sine wave re-zeroed around Vcc/2), with minimum output at the input’s zero crossings. At 500 mV/div, the log amp says the input varies by 42 dB = 1000 mV/(24 mV/dB), which might actually be about right for a zero-crossing (or zero-approaching absolute value of a) signal; logarithms don’t deal well with zeros.

    The AD8310 datasheet  and AN-691 suggest the 2.5 V output corresponds to +10 dBm = 12.5 Vrms input, which flat-out isn’t the case. However, the actual 500 mVpeak = 350 mVrms input is 2.5 mW = +4 dBm, so maybe it’s within spitting distance of being right.

    AN-691 recommends 10 µF input caps for “low frequency” use, showing results down to 20 Hz; 1 µF seems to get the circuit close enough to the goal for use near 60 kHz.

    It also recommends a cap on the BFIN pin (pin 6) to reduce the output stage bandwidth = “video bandwidth” and improve the overall accuracy, which remains to be done. The datasheet suggests rolling VBW off at 1/10 the minimum input frequency, which would be around 3 kHz for use with 32.768 kHz crystals. The equation, with reference to the internal 3 kΩ bias resistor:

    CFILT = 1/(2π 3 kΩ VBW) – 2.1 pF = 18 nF

    For a bit more margin, 1 kHz would require 56-ish nF.

    The PCB has a convenient pair of pads labeled C6 for that capacitor. This may require protracted rummaging in the SMD capacitor stash.

    Rolling off the VBW should reduce the hash on the 100 kHz end of the frequency sweep and filter the 60 kHz response down to pretty much a DC level.

    Applying the 10 dB and 20 dB SMA attenuators to the input from the tracking generator and recording the log amp output voltage produces this useful table:

    AD8310 Log Amp - mods and log response
    AD8310 Log Amp – mods and log response

    With the terminating resistor on the correct side of the input caps, the log amp seems to be working the way it should, with an output varying a bit under the nominal 24-ish mV/dB over a 30 dB range.

    We need caps! Lots of caps!

    A quick search with the obvious keywords suggests nobody else has noticed how these modules work over a reasonable bandwidth. Maybe I’m the first person to use them in the LF band?

  • Monthly Image: Here’s Looking at You!

    A strangely equipped van-like object emerging from Vassar Farms waited entirely too long for me to ride past:

    Vassar Farms - 2017-05-04
    Vassar Farms – 2017-05-04

    The signage on the rear quarter panel read “Apple Maps / maps.apple.com” and a search with the obvious keywords produced a much better picture from the good folks at Adafruit in NYC of what might be the very same vehicle:

    Adafruit - Apple Maps Vehicle
    Adafruit – Apple Maps Vehicle

    The Apple Maps schedule says nothing about being in Dutchess County this month. Maybe they’re lost?

    Not being an Apple kind of guy, let me know if you see me riding by …

  • Kindle Fire Power Button: Some Things Don’t Last

    Once again, the single moving part on my first-generation Kindle Fire stopped working. As before, the switch contacts accumulated enough fuzz & contamination to prevent any current flow, but this time the (soft) solder joints attaching the switch body to the PCB failed:

    Kindle Fire power switch - failed anchor
    Kindle Fire power switch – failed anchor

    My joint cleaning & fluxing wasn’t up to contemporary standards, as shown by the obviously un-fused footprints left in the upper pads:

    Kindle Fire power switch - failed anchor joints
    Kindle Fire power switch – failed anchor joints

    The switch frame seems to be unplated steel, which shouldn’t be an excuse.

    So I dismantled the switch, cleaned the contacts and tactile bump plate, put it all back together, and did a much better job of surface preparation:

    Kindle Fire power switch - rebuilt - right anchor
    Kindle Fire power switch – rebuilt – right anchor

    The other joint:

    Kindle Fire power switch - rebuilt - left anchor
    Kindle Fire power switch – rebuilt – left anchor

    And, for completeness, the switch leads:

    Kindle Fire power switch - rebuilt - switch pads
    Kindle Fire power switch – rebuilt – switch pads

    I don’t like the way the joint on the right looks, either, but we’ll see how long the whole affair holds together.

    This may be the last time I can repair the Kindle, as a bypass cap came loose while I was working on the PCB, the screen has been accumulating dust at an increasing pace, and several latches securing the back of the case have cracked.

    Methinks it’s getting on time for a new pocketable memory device; if only Pixel XL phablets had a bigger screen and didn’t cost night onto a kilobuck.

     

  • Zire 71 Protector: Some Things Last

    This ABS slab emerged from the Thing-O-Matic in early 2012:

    Zire 71 protector in place
    Zire 71 protector in place

    The Zire would power on whenever the switches clicked or that little joystick moved, which happened regularly enough to be annoying.

    Mary made a small case that matched the other pouches I carry around:

    Belt pack - camera case - PDA case
    Belt pack – camera case – PDA case

    She made the case to fit an HP48 calculator, but it was close enough for the Zire.

    Time passed, the Zire died, I started carrying a Kindle Fire in another pocket, but the ABS slab provided a convenient stiffener between some Geek Scratch Paper and the various pencils / pens / markers / screwdrivers / flashlight filling the available space.

    Unfortunately, minus the backup of an electronic slab, the protector finally failed along an obvious stress riser:

    Zire 71 protector - cracked
    Zire 71 protector – cracked

    I cut a similar rectangle from a sheet of unknown flexy plastic, rounded the corners, clipped the pencils & whatnot to it, and maybe it’ll survive for a while.

  • AD8310 Log Amp Module: LF Response

    The label atop a generic AD8310 Log Amp module seemed unambiguous:

    AD8310 Log Amp module - overview
    AD8310 Log Amp module – overview

    Firing the HP 8591 tracking generator into the InHi SMA, terminating InLo (not shown above, for reasons you’ll see below), connecting the Out SMA to the scope’s Trace 1, and the spectrum analyzer’s sweep output to Trace 2 produced an oddity:

    AD8310 Log Amp - 100 kHz 500 MHz
    AD8310 Log Amp – 100 kHz 500 MHz

    The upward-sloping ramp (lower trace) shows the HP 8591’s horizontal sweep, with the tracking generator tuning from 100 kHz to 500 MHz during the 20 ms sweep. The log amp output (upper trace) drops more-or-less linearly with increasing frequency, which seems odd. The tracking generator signal should be pretty much level and the log amp’s output should be more-or-less flat.

    My oscilloscope tops out at 150 MHz. The displayed RF is down by 3 dB = 0.6 div at 1.5 division = 190 MHz into the sweep:

    AD8310 Log Amp - 100 kHz 500 MHz - RF 50 ohm term
    AD8310 Log Amp – 100 kHz 500 MHz – RF 50 ohm term

    However, the RF looks pretty much flat up to 125 MHz and it’s still visible beyond 400 MHz, so I think the tracking generator is doing what it’s supposed to. If the RF were decreasing, then the trace would look different, methinks.

    The response to a 60 kHz sine wave doesn’t look quite right:

    AD8310 Log Amp - 60 kHz 1 Vpk
    AD8310 Log Amp – 60 kHz 1 Vpk

    Eyeballometrically, it might be a log response to the absolute value of the derivative: kinda flat on the ups-and-downs, kinda zero-ish at the tops-and-bottoms. Or maybe it’s the log response to a phase-shifted version of the input, with the lows corresponding to the zero crossings.

    Documentation for the circuit seems nonexistent, because eBay. Fortunately, one can pop the top to reveal the straightforward PCB layout:

    AD8310 Log Amp module - uncovered
    AD8310 Log Amp module – uncovered

    A closer look:

    AD8310 Log Amp module - PCB detail
    AD8310 Log Amp module – PCB detail

    A capacitance meter says input capacitors C5 and C7 are both 10 nF.

    A sketch of the circuitry:

    AD8310 Log Amp module - input circuit
    AD8310 Log Amp module – input circuit

    The datasheet puts the terminating resistor on the other side of the input caps, where it surely belongs:

    AD8310 Datasheet - Basic Connections diagram
    AD8310 Datasheet – Basic Connections diagram

     

    Achtung: the solder blob just to the left of C7 grounds the signal pin on the InLo SMA. Don’t connect anything to InLo which might take offense at having its output shorted to ground; the SMA terminator I used had no effect whatsoever.

    The AD8310 chip (assuming that’s what it really is) has a differential input resistance = 1 kΩ and capacitance = 1.4 pF in parallel with R3, the 52.3 Ω terminating resistor, making the net resistance just under 50 Ω.

    At 60 kHz, the input caps have a reactance of 270 Ω apiece, which means the “terminating” resistor is maybe 10% of the mostly capacitive input impedance seen at the InHi connector. That means the AD8310 inputs see maybe 10% of the input signal.

    In fact, if you regard those three parts as an RC high pass filter and merge the caps into a single 5 nF unit, it rolls off at 620 kHz = 1/(2π · 52 · 5 pF). Obviously, it’ll be a fine differentiator at 1/10 the breakpoint frequency.

    A simulation shows it in action (clicky for more dots):

    AD8310 Log Amp module - input circuit simulation
    AD8310 Log Amp module – input circuit simulation

    The two 1 MΩ resistors provide a balanced DC path-to-ground for R3 to keep the simulator happy.

    The (+) input tends toward 0 dB as C5 tends toward a short, the (-) input tends toward ground as C7 does likewise, but their difference isn’t a constant value. Seeing as how a log amp should respond to small differences, methinks it’s hard at work.

    The AD8310 data sheet says the scale factor is about 24 mV/dB between 10 MHz and 200 MHz, with no frequency dependence worth mentioning. Eyeballometrically, the output has a 240 mV = 10 dB straight-line decrease over the entire frequency range of that scope shot. It drops by 220 mV = 9.2 dB in the decade from 50 to 500 MHz, half of the 20 dB you’d expect from a first-order filter response.

    The AD8310 has an internal 2 MHz high pass feedback loop to suppress low frequency input offset voltages. The doc recommends a 1 µF cap from OLFT to ground for frequencies down in the low audio range. One might solder the cap across the convenient pads labeled C8 below the chip.

    Rearranging the input circuitry seems in order:

    • Move R3 outside C5 and C7, per the datasheet
    • Increase C5 and C7 to 1 µF -ish
    • Add 100nF – 1 µF bypass cap at C8

    I have the uneasy feeling I’m overlooking something obvious …

    Update – The rest of the story: Corrected Input Circuit and Video Bandwidth Rolloff.

  • Verizon FiOS at 1 Gb/s for $70? Really‽

    Jessica: Hi! I am a Verizon specialist, can I help you today?

    You (that would be me = Ed): Verizon has announced gigabit Internet service for $70/month. That isn’t listed as one of the my “upgrade” options. Is it available in this area? If not, why do the 25 and 50 Mb/s services cost 90 and $100/month?

    Jessica: By chatting with us, you grant us permission to review your services during the chat to offer the best value. Refusing to chat will not affect your current services. It is your right and our duty to protect your account information. For quality, we may monitor and/or review this chat.

    Jessica: Hey there! My name is Jessica. Happy to help!

    Jessica: Thank you for being a valued Verizon customer, I will be glad to check the information for you.

    Jessica: For security and protection of your account records, please provide your first and last name as it appears on your account, plus one of the following pieces of information. Either your:

    [redacted]

    You: [redacted]

    Jessica: Thank you for the information, Edward Nisley!

    Jessica: Please give me few minutes to check the information.

    Jessica: I appreciate your patience.

    Jessica: Thank you for safeguarding the account.

    Jessica: Thank you for your years of loyalty to Verizon!

    Jessica: It looks like you currently have just Verizon Fios Internet up to 25/25 Mbps plan.
    Just to confirm, are you looking to make upgrade for just Fios Gigabit Connection?

    You: That’s correct: I do /not/ want phone or TV service.

    Jessica: I have checked the information and it looks like Verizon Fios Gigabit Connection is not available for your location.

    However, you can make the upgrade for Verizon Fios Internet up to 100/100 Mbps and above speed plan.

    You: Which gives me the opportunity to pay twice as much for 10% of the bandwidth: definitely an unattractive offer.

    Jessica: We are offering different speed plan with different prices and great discounts.

    Jessica: It looks like you are currently paying just $45.99/mo. for your Verizon Fios Internet upto 25/25 Mbps plan.

    Jessica: Just to confirm, are you looking to make any upgrade?

    You: I was interested in 1 Gb/s for $70. I’m uninterested in bait-and-switch tactics for lower bandwith at higher prices. Based on the gigabit price, I should be getting 25 Mb/s for $1.75/month … what sort of discount can you offer to make up for that sort of overcharge?

    Jessica: I understand how you feel.

    Jessica: The availability of speed and price vary from location to location.

    You can get our Verizon Fios Internet up to 50/50 Mbps plan at just $59.99/mo. before taxes with new 2 year agreement.

    Jessica: The base price of this plan is $99.99/mo. before taxes. However, you will be getting $40 OFF for 24 months with new 2 year agreement plan.

    Jessica: So, its just $59.99/mo. before taxes.

    The estimated price would be just $62.48/mo. including taxes and fees.

    Jessica: Just to confirm, would you like to go ahead and make the upgrade for this speed plan?

    Jessica: I haven’t heard from you for a few moments. Would you like to continue chatting?

    You: That’s the bait-and-switch tactic I’m /not/ interested in; DO NOT change my service. Verizon tacks on a few bucks a month for a “Municipal Construction Charge” without actually building anything. Let me know when you can offer me a gigabit for $70, then we can talk. Before then, DO NOT CHANGE ANYTHING. Thanks …

    We are sorry, but the agent was disconnected, please wait for the agent to reconnect..

    We apologize for the unexpected delay, an agent should be with you very soon.

    Agent Carl enters chat

    Carl: Hi there! You have reached Carl. How may I help you today?

    You: Do you have access to the previous half hour of chat before Agent Jessica was mysteriously disconnected?

    Carl: It seems that the previous agent lost connection.

    Carl: I am sorry for the inconvenience caused to you. She might have faced some technical issues.

    Carl: Pleasure assured no changes will be made on your account without your consent.

    Carl: I read that you wish to check the availability of Gigabit speeds for your home. Correct?

    You: That’s what I asked, half an hour ago, and was told it’s not available, but I /can/ pay more than that (minus a teaser discount) for 10% of the bandwidth. If that’s still the best you can do, it’s not what I want.

    Carl: The availability of services and plans is address specific. I see that the previous agent informed the Gigabit speed is not available.

    Carl: The prices and promotions are time specific.

    Carl: You get discounts and promotions available at the time of signing up for new services.

    Carl: When you signed up for services 2 year back, you get the promotions available at that time.

    You: OK, we’re going in circles. Let me know when you can deliver what Verizon offers to other FiOS customers. Thanks …

    Carl: Right now, the customer who sign up for new service on a new account for 1st time, they get the offers available right now.

    Carl: You’re welcome.

    Carl: Is there anything else I can help you online today?

    You: Nope, we’re off to a concert. Have a good rest of the evening!

    Carl: You too have a great evening.

    Carl: If you need assistance in the future, visit us anytime on the My Fios App or at Verizon.com. Thank you for chatting with Verizon.