azonenberg changed the topic of #scopehal to: libscopehal, libscopeprotocols, and glscopeclient development and testing | https://github.com/azonenberg/scopehal-cmake, https://github.com/azonenberg/scopehal-apps, https://github.com/azonenberg/scopehal | Logs: https://freenode.irclog.whitequark.org/scopehal
<azonenberg> that will reduce noise and give me 6 dB of 'free' gain
<azonenberg> or more
<electronic_eel> doesn't the input att need to be matched to the 50 ohms, or is that a separate stage after the 50 ohm term?
<azonenberg> right now my schematic has a fixed 12 dB pi attenuator made out of discrete resistors, matched to 50 ohm impedance
<azonenberg> but what i could do instead is have a 50 ohm term followed by a digital attenuator
<electronic_eel> but that digital att would then probably limit the allowed max voltage of the input
<azonenberg> I'm designing for 5Vrms as the max input
<azonenberg> that's pretty standard for 50 ohm systems. Use an attenuating probe if you want to measure something higher
<azonenberg> i guess the quick and dirty option is to have a fixed attenuator that i mux in and out
<zigggggy> i figured it out azonenberg
<zigggggy> spoke with a dev who is the com expert
<azonenberg> :)
<zigggggy> also i understand now what .net is doing
<zigggggy> it creates a wrapper for each com library to handle all kinds of stuff
<zigggggy> so a lot of things are hidden because it's done behind the scenes
<azonenberg> Yeah
<azonenberg> under the hood raw com is not pretty :p
<azonenberg> lots of casting and magic numbers etc
<zigggggy> but in general with COM you get back objects and you have to figure out the type and cast
<zigggggy> and he told me what I should try casting to and now it's working
<azonenberg> Yeah that much i remember
<zigggggy> in C# when you do a cast, the wrapper is actually calling QueryInterface on the com object
<zigggggy> to see if it can be done
<zigggggy> anyways the tlbimp.exe tool is generating the wrapper code in a dll so it doesn't have to use reflection at run time
<zigggggy> which will be a lot slower
<sorear> raw com is basically "what if we designed an ABI around C++ virtual base classes"
<azonenberg> Lol
<zigggggy> but a lot of methods return an IDispatch.. like there is the root com object to the automation tree
<azonenberg> electronic_eel: i may also consider changing the THS4215 to something with a differential output
<zigggggy> and there there is a GetObjects method that returns IDispatch
<zigggggy> the C# wrapper hides this and returns instead an object type
<zigggggy> which for C++ folks is like a void pointer
<zigggggy> internally it's actually a System.___ComObject
<zigggggy> which I think is an instance of this wrapper
<zigggggy> and i have to now cast this to its actual type
<zigggggy> and if i do it right, it wont throw an exception
<zigggggy> and it looks like the wrapper confirms this by calling QueryInterface
<azonenberg> So, the current setup doesn't have as wide a gain range as i would like
<azonenberg> I might consider adding a fixed gain stage after the variable one or something?
<azonenberg> i dont like how i keep amplifying and attenuating over and over again, but i have to make sure i don't exceed safe ranges at various points
<azonenberg> lani, electronic_eel: thoughts?
<azonenberg> lain: *
<azonenberg> Basic rationale of this design: +/- 5V is a pretty standard 50 ohm input range for test equipment, so I want to keep that
<azonenberg> I attenuate by 6 dB (0.5V/V), apply the variable offset, and shift to a 2.5V common mode. So now my signal is 0-5V with a 0V input mapping to 2.5V, -5V to 0V, and +5V to +5V
<azonenberg> (This is necessary because the gain block runs on a single 5V supply)
<azonenberg> The ADL5205 has a 0-23 dB variable attenuator followed by a 14-26 dB variable gain stage, which gives -9 to +26 dB for the gain block and -15 to +20 for the system as a whole
<azonenberg> Which is 0.177 to 10 V/V, again at a 2.5V common mode offset (but now differential)
<azonenberg> Then i have to attenuate more in order to fit the input range of the ADC
<azonenberg> actually i just figured out how to steal 1 dB more, let's see what that turns out to...
<azonenberg> ok reuploaded. So I changed the gain block to have a 2.25V output common mode
<azonenberg> I now attenuate by 8 dB (0.398V/V). 2.25V converts to 895 mV which is almost exactly at the ideal 900 mV common mode input for the HMCAD1520
<azonenberg> i think this can be improved upon, shifting the common mode a different way after the gain block
<_whitenotifier-3> [starshipraider] azonenberg pushed 1 commit to master [+12/-0/±0] https://git.io/JvP7g
<_whitenotifier-3> [starshipraider] azonenberg 73109de - Initial version of AFE characterization board
<azonenberg> What i'm puzzling over right now is how to keep excessively strong signals from overdriving the ADC, which is a 1.8V device that expects a max +/- 1V differential at the input with a 900 mV common mode
<azonenberg> Without also attenuating weak signals excessively
<monochroma> protection diode ?
<azonenberg> Idea; use a LMH6522 to provide a fixed gain stage after the variable stage, and also shift the common mode down from 2.5V to 900 mV
<azonenberg> with single supply, not split
<azonenberg> excessively strong negative inputs will hit ground and clip
<azonenberg> excessively strong positive outputs can then be clipped with a low-capacitance diode to the 1.8V rail
<azonenberg> Let me run the numbers for what happens if i have +2 dB there
<azonenberg> that should allow me to make full use of the VGA's dynamic range
<azonenberg> as i need to go down to -13 dB for the +/-5V input range
<azonenberg> Excellent :D
<azonenberg> At max gain we have 159 mV full scale which is 19.875 mV/div using a conventional 8-div scope scale
<azonenberg> In 8-bit mode this is 619.5 μV/LSB, and in 12-bit mode 38.7 μV/LSB
<azonenberg> Net system gain -13 to +22 dB
<azonenberg> So now i just have to design that 2 dB gain block, then do all of the ancillary stuff like the DAC to set offset, the power supply, the mcu to config it all, etc
<azonenberg> Going to do this board on oshpark i think, absolutely no reason for fancy controlled impedance rogers on a 100 MHz AFE
<azonenberg> although i'd likely use multech w/ custom stackup for the final system because the lvds off the adc is a bit fast
<zigggggy> hmmm
<zigggggy> if you have an instance of a COM object coclass
<zigggggy> and it implements IDispatch
<zigggggy> can you ask it all the interfaces it implements?
<zigggggy> it seems like you can only ask whether it implements a certain interface..
<azonenberg> i'm not aware of any way to enumerate interfaces
<azonenberg> only QueryInterface
<azonenberg> if you have the type library, you can find all of the interfaces that way
<zigggggy> yes but QueryInterface only lets you find out whether it implements a specific interfae, right?
<azonenberg> Correct
<zigggggy> you cant get back a list of all the interfaces it implements
<zigggggy> ?
<azonenberg> Not to my knowledge
<zigggggy> so in the entry point coclass for xstreamdso
<zigggggy> to navigate the automation tree you call the Object property
<zigggggy> and it returns an IDispatch type
<zigggggy> so i need to test all the interfaces it MAY implement?
<zigggggy> because i have no idea what the actual type is
<zigggggy> it can be anything, right?
<azonenberg> Yeah, i think that's how it works
<zigggggy> oof
<azonenberg> hopefully you have some idea of what the likely interface is
<zigggggy> who ever thought this is a good idea
<azonenberg> based on the method you called
<zigggggy> doesnt this break every rule in static typing?
<zigggggy> we should have consistent types
<azonenberg> yes, the problem is that COM basically uses a C ABI and there's no type information at the binary level in C - only at the source level
<azonenberg> i.e. reflection is impossible unless you add metadata yourself to enable it
<azonenberg> heck, MFC and some other microsoft frameworks predate RTTI in C++
<zigggggy> i guess a better design could have been for lecroy to implement a base interface that has a bstr of the type name
<zigggggy> so return that instead of IDispatch
<zigggggy> right?
<zigggggy> or does that go against com design?
<azonenberg> i mean, there is the ole variant type for primitive data of unknown type
<azonenberg> i just dont think there is a clean way of handling objects of unknown type
<zigggggy> hm
<zigggggy> weird
<zigggggy> i mean you're not passing around void pointers everywhere
<zigggggy> we usually design things to keep everything strongly typed
<zigggggy> so its weird how in COM you're dealing with unknown types so much
<azonenberg> i think typically the assumption is you would know what type the method returned and cast to that immediately
<azonenberg> via QueryInterface
<azonenberg> rather than having to test a bunch
<zigggggy> assuming its documented well
<azonenberg> of course :p
<zigggggy> BUT
<zigggggy> whatever happened to self documenting code
<zigggggy> you always know what type you may get in C++
Famine- has joined #scopehal
Famine has quit [Ping timeout: 256 seconds]
m4ssi has joined #scopehal
m4ssi has quit [Remote host closed the connection]
_whitelogger has joined #scopehal
electronic_eel has quit [Ping timeout: 246 seconds]
electronic_eel has joined #scopehal
electronic_eel has quit [Ping timeout: 250 seconds]
electronic_eel has joined #scopehal
<_whitenotifier-3> [starshipraider] azonenberg pushed 2 commits to master [+0/-0/±6] https://git.io/JvXGS
<_whitenotifier-3> [starshipraider] azonenberg 181a53b - Updated probe-characterization with some fab DRC fixes (ground too close to ground SMA pad, right edge not quite vertical)
<_whitenotifier-3> [starshipraider] azonenberg 22cc8ac - Continued design of entry-afe-characterization
<azonenberg> oof... $250 international shipping charges for parts from PMK. That will HURT during prototyping
<azonenberg> Shouldn't be a massive problem for volume production at least
<lain> who the heck are they using
<azonenberg> "air freight"
<azonenberg> what, are they putting a bunch of probe needles and tiny ground springs on a pallet?
<lain> lol
<monochroma> o.o
<monochroma> yeah wtf
<azonenberg> $962 is the total quote including shipping: two five-packs of tips, ten ground blades, ten Z-grounds, ten 7cm flex ground leads
<lain> yeah that's crazy, I usually expect around $100 for boxes air shipped from EU or Hong Kong
<lain> I do have a fedex account that my suppliers use which gets me a slight discount but it's not significant
<azonenberg> well it's apparently not drop shipping from PMK, it's going from germany to the distributor in texas then to here
<lain> huh.
<azonenberg> so maybe they're doing next day air from texas to here or something?
<monochroma> might ask if they can do anything to lower the shipping price because.. yikes
<Famine-> lain, i find i get more of a discount using my suppliers fedex account than i do my own lol
<lain> haha
<lain> yeah, I usually only use mine when they charge extra to use theirs. not sure why some places do that.
<Famine-> holy hell i am dyslexic this morning, measure vref @ 1.2323V adjust my adc code with 1.0332V
<lain> oof :3
<azonenberg> monochroma: apparently most of the shipping cost is on PMK's end and they have no control over that
<Famine-> speaking of fedex, did you know they have like 3 tiers of customer service phone numbers ?
<monochroma> azonenberg: rude :<
<azonenberg> So i'm stuck with it. Good news is the per-probe accessory shipping cost will be ~nil if i'm doing a volume order
<azonenberg> Famine-: that's true of most companies
<monochroma> yeah
<azonenberg> i guarantee when an AWS datacenter network engineer calls comcast about network issues to their customers, they don't get told to press the little button on the back of their modem
<Famine-> azonenberg, true lol
<azonenberg> For a while i had the direct line to a tier 2 support engineer at comcast. that was nice
<Famine-> if you guys don't already have it: 1-866-338-0456
<Famine-> that is the level 2 or 3 fedex number. if something goes really side ways, i can't remember off the top of my head if its ext 00 or 100. but if you ask for a direct transfer to the "manager assist group" you basically skip all the escalation steps
<electronic_eel> isn't the whole point of having an international distributor to reduce shipping costs (and similar friction like customs handling)? I'd have thought that the distributor does a order like once a month or something and combines shipping for lot's of customers
<Famine-> electronic_eel, you would think so
<electronic_eel> I just checked: a parcel, 2kg, from Germany to Seattle, delivered within 3 days, with the lowest tier DHL express account, is 133 EUR.
<electronic_eel> so $250 is really on the expensive side
<azonenberg> electronic_eel: i think the thing is that these guys don't order a lot of just the accessories
<azonenberg> Its a rather specialty item
<azonenberg> its not like buying passives from digikey
<electronic_eel> yes, but why use a distributor if it just drives up the prices, it takes longer and does not really help you?
<azonenberg> Because PMK won't sell to me direct
<azonenberg> so i have no choice :p
<electronic_eel> even if the accessories is a specialty thing, they could just combine it with their next regular order at PMK
<azonenberg> I'm looking at exploring alternative options. I can get the positioners for ~half STI's price from tequipment
<Famine-> bleh i think i need to rebuild my old power supplies, ancient gear really wasn't built for switching noise immunity
<electronic_eel> Famine-: noise coming from the grid? then you could put an external filter in front of it
<electronic_eel> azonenberg: I just had a look through your afe schematics
<electronic_eel> what you wrote about an additional 2db gain block sounds good
<lain> we've got a fun noise on our electricity
<electronic_eel> I'd rethink the TVS diode (TPD1E05) at the input though
<electronic_eel> how about a BAV99 against the -5v and +5v rails instead?
<azonenberg> electronic_eel: basically i need to go down to -13 dB system gain from input to ADC in order to cram a +/- 5V input into the ADC's input range
<electronic_eel> the TPD1E05 is very small and will get easily killed
<azonenberg> I'll try that
<azonenberg> It's after the attenuator which helps
<azonenberg> i.e. the attenuator will limit fault current somewhat
<electronic_eel> I had very good results with the BAV99
<Famine-> electronic_eel, most likely some crap in my lab, but these are ancient supplies. i'll probably end up replacing the cord with a modern IEC connector/filter, should kill some of this 20khz noise
<azonenberg> anyway, given the 35 dB range of the gain stage that puts my max gain as +22 dB unless i add a second variable gain stage after
<azonenberg> Which, for the moment, i don't think is necessary
<azonenberg> electronic_eel: the VAC99 is showing 1V forward, am i missing something or is it really that high?
<azonenberg> i want to clip tighter than that
<azonenberg> i'd be looking at a low capacitance schottky
<lain> we've got loud noise on our mains wiring at 22 kHz (with another peak at 11 kHz). our best guess, based on a long-term analysis and comparison against other data such as weather, is it's a faulty starter for an oil-burning furnace
<lain> it's strong enough that it causes appliances to audibly buzz, which is the only reason we even know about it
<electronic_eel> azonenberg: you mean BAV99 or VAC99?
<azonenberg> Sorry i mean BAV99
<azonenberg> keyboard phase shift :p
<lain> lol
<Famine-> lain, i'll have to get out the diff probe, but through my power supply im looking at ~40mVPP @ 22kHz
<electronic_eel> you can get low-cap schottky, but they will have increased forward voltage in comparison to higher cap schottky. there isn't much difference if you want really low cap
bvernoux has joined #scopehal
<azonenberg> i mean this is only for 100 MHz
<azonenberg> but i still want low C to the extent possible
<electronic_eel> yes, reducing c on the input is important.
<bvernoux> hi
<awygle> what about a pnnp? those are pretty low c iirc
<Famine-> afk
<electronic_eel> you could use the bav99, but don't go to the 5v rails, but below. you'd need a discharge stage even with the 5v rails unless you have a lot of current flowing
<electronic_eel> so it isn't that much more effort
<azonenberg> i considered this with the starshipraider io cells too
<electronic_eel> the discharge could be just some tl431
<electronic_eel> and a cap
<azonenberg> and the 5V rails will have a fair bit of current flowing through the opamps
<electronic_eel> how much current do you estimate?
<electronic_eel> modern opamps are usually not that hungry anymore
<azonenberg> ~25 mA on the +/- 5V rails for each of the two LMH6552s, so that's 50 mA
<azonenberg> then the ADL5205 is single supply +5V... let's see hwo much that uses
<electronic_eel> ok, that should be enough for discharge
<azonenberg> That's 175 mA on the +5V rail, but it's a 2-channel device
<azonenberg> so 87.5 mA per channel
<azonenberg> 14 mA per channel in power-down state
<electronic_eel> the datasheet of the LMH6552 specifies the abs max exactly at +- Vs, no 0.3v over the rails allowed or similar
<electronic_eel> so even a schottky won't be enough to keep it inside the abs max
<electronic_eel> maybe set the rails of the LMH6552 to +-6V and the other stuff to +-5V. then clamp the input to +-5v.
<azonenberg> electronic_eel: that could work. That would allow a much higher Vf clamp too
<electronic_eel> yes, exactly. then the 1v forward of the BAV99 won't matter
<azonenberg> Yeah i'll play around with that shortly
<electronic_eel> if you use somewhat more sturdy resistors on the input you could get a better allowed voltage level until damage
<electronic_eel> you could even look into adding a relay which switches off when a overvoltage is detected
<azonenberg> I have a 2:1 attenuator on the input
<azonenberg> I'm speccing for +/- 5V at the input nominal operating range, but by attenuating and clipping to +/- 5V after the attenuator i will be able to survive +/- 10V without damage
<azonenberg> or even without triggering the protection at all
<azonenberg> you'll just saturate later on and clip before the ADC since the gain will be too high
<electronic_eel> you are designing a entry level scope, the group that this appeals to is probably beginners
<electronic_eel> they are more likely to make mistakes than pros
<electronic_eel> making the afe a bit more robust will help
<azonenberg> Yeah. A comparator triggered relay is probably not a bad idea
<azonenberg> at that point the diodes dont need to be super beefy because they only have to conduct for the time it takes the relay to open
<electronic_eel> yes, exactly
<electronic_eel> and small signal relais for low ghz are cheap, like 2 bucks in lowish quantity
<azonenberg> got one to recommend?
<azonenberg> this is a 100 MHz AFE. even an rf relay may be overkill but i want good signal quality :p
<electronic_eel> don't have experience with one, are right now browsing through mouser
<azonenberg> i had my eye on a $7ish one that looked overkill (7 GHz rating)
<lain> the latest The Signal Path video was fun -- it was a modulator / signal generator thingy, and it passed all self-tests, but the output was nil at low frequencies, increasing to like -20 dBm at its highest output frequencies (3-something GHz)
<lain> when the output should've been 0 dBm
<lain> turns out the reverse power protection relay, the last thing before the output RF connector, was stuck open (failed drive transistor on the coil)
<lain> so what he was seeing at the output was capacitive coupling through the open relay :D
<electronic_eel> lain: yes, saw that video. exactly that kind of protection is what I had in mind here
<lain> :3
<electronic_eel> ARE10A4HC90 looks good https://www.mouser.de/ProductDetail/ARE10A4HC90
<electronic_eel> is about 5$ unfortunately
<electronic_eel> the 2$ ones have a higher insertion loss
<azonenberg> So my PSU now needs +5, -5 (the ADL5205 is abs max 5.4V power so we can't share a supply)
<azonenberg> +6/-6
<azonenberg> 2.5 and 0.9 reference rails
<azonenberg> plus whatever the digital subsystem uses
<electronic_eel> maybe +- 6v and ldos down to +-5V?
<azonenberg> Details of how i generate the rails are out of scope right now
<azonenberg> i'm thinking of system requirements
<azonenberg> Plan right now is to run the first offset stage only at +/- 6
<azonenberg> The second LMH6552 in the common mode shifting / 2 dB gain stage will be +/-5 as i don't need wide rail range
<azonenberg> it's outputting a +/- 1V differential signal on a 900 mV common mode
<azonenberg> so this will save a bit of power
<electronic_eel> is the adl5205 at +5v or is it single supply?
<electronic_eel> * at +-5v
<electronic_eel> looks like single supply only to me
<azonenberg> Yes, single +5
<electronic_eel> so why not +-6v for all the differential stuff and +5v for the ADL5205
<electronic_eel> then you just need -5v for clamping the negative input
<azonenberg> i guess, i was thinking power savings
<azonenberg> The second stage LMH6552 never sees an input below ground, but i dont think it's meant for rail to rail
<azonenberg> so i wanted an negative rail to prevent problems when output gets close to ground
<electronic_eel> yes, the LMH6552 looks like it prefers a negative voltage and not single supply
<azonenberg> Advantage of having the second 6552 powered by +/- 5V: it gives the diode clipper something to dump power into
<electronic_eel> yes. but you could also not provide an acutal regulated power rail for -5v, but just a tl431 that begins to conduct at -5v and then just bias it to -5v with a resistor
<azonenberg> yeah but i need a +5V rail regardless, and a second IC to power the -5V rail no matter what
<electronic_eel> but both ways will work
<electronic_eel> depends on what is easier to create in the power supply section
<azonenberg> yeah i havent even touched the psu design yet
<azonenberg> just figuring out requirements at this point, focusing on the signal path right now
<electronic_eel> since you didn't design that yet this detail can be finished later on
<azonenberg> The relays will have a 12V coil i think
<azonenberg> and be driven directly by the unregulated 12V input, switched by a low side n-fet
<electronic_eel> you can get them with lots of different coils
<azonenberg> no i'm saying, i dont want a 5V coil
<azonenberg> because that would require i either add a 5V rail just for the relay, or deal with cleaning switching transients out of my analog rail
<azonenberg> the 12V rail is already assumed dirty
<azonenberg> and doesnt need an additional regulator
<azonenberg> all i'd need is a snubber diode i think
<electronic_eel> if the relay switches, you won't care about if the rail is clean or not
<electronic_eel> since there is no signal anymore
<azonenberg> i'm thinking about in a 4-channel design
<azonenberg> i don't want an overload on one channel to glitch the other 3
<azonenberg> This is a single channel characterization board for what will eventually be a 4 channel or even 8 channel scope
<azonenberg> My thought is for the full system to have one fpga, one gig-e interface, two hmcad1520s, and 8 copies of this AFE
<azonenberg> you can DNP half of the AFEs and one ADC to cost-down and make a 4ch scope
<electronic_eel> ok, if you already have about 12v as main input, that is then used to create the others, then 12v is probably best for the coils
<azonenberg> That's the idea
<electronic_eel> hmm 8ch, that is something that is really expensive to get in regular scopes
<azonenberg> Yes :D
<azonenberg> You can also switch the 1520 to a 1510 which will give you 8 bit resolution only and save another $40 per 4 channels
<azonenberg> the 1520 can be switched between 8 and 12 bit mode - another thing you don't see in most entry level scopes
<azonenberg> so you can trade resolution vs sampling rate
<azonenberg> on the 8ch variant you'll be able to switch one channel group and the other independently
<azonenberg> as well as channel interleaving
<azonenberg> so you could have one channel at 640 Msps 12 bit plus four at 250 Msps 8 bit
<azonenberg> or four at 160 Msps 12 bit and one at 1 Gsps 8 bit
<azonenberg> etc
<azonenberg> Designing the scopehal APIs for this will be nontrivial
<electronic_eel> how about 8ch 640 Msps 12 bit?
<azonenberg> Not possible. the ADC is fundamentally four 160 Msps 12-bit / 250 Msps 8-bit channels interleaved
<azonenberg> you need all four channels to hit 640 Msps / 1 Gsps in 12/8 bit mode
<azonenberg> i mean, unless you wanted the scope to have a dedicated ADC per AFE instead of one ADC per four AFEs
<azonenberg> but that would result in $800 per scope of ADCs instead of $200
<electronic_eel> yes, I mean dedicated adcs
<azonenberg> It's possible, and could be a new scope with the same AFE
<azonenberg> But it won't be the entry level model
<azonenberg> I'd need a bigger FPGA to handle that many ADCs too, wrt number of I/Os, i think
<electronic_eel> no, but would make it a really interesting thing
<azonenberg> Yes agreed. I plan to have a wide range of scopes
<azonenberg> Lowest cost: 1510 based, 8 bit only, 4 channels. Basically a cheap rigol (in fact they use the same ADC)
<azonenberg> but with a much nicer input stage and FPGA/software of course
<azonenberg> Next model up: 1520 based, 8/12 bit, 4ch
<azonenberg> next up: 1520 based, 8/12 bit, 8ch
<azonenberg> 2x 1520*
<azonenberg> possible next: 8x 1520 based, 8/12 bit, 8ch but with full sample rate on all channels
<electronic_eel> if you don't design it as one board where the parts are DNPed, but separate boards that can be connected with pin headers, then the user would be able to plug together the modules he wants, without you having to build separate models
<azonenberg> midrange: LM97600 based, 7.6 bit 1.25/2.5/5 Gsps
<azonenberg> Could also have a 4x ADC or 8x ADC variant there too
<azonenberg> High end: AD9213BBPZ-10G based, 10 Gsps 12 bit per channel
<azonenberg> eight of those and you're competitive with a lecroy HDO8000A series
<azonenberg> (But you're also talking about $24,000 of ADCs at digikey prices)
<azonenberg> And the 1-2 GHz AFE for that will be nontrivial
<electronic_eel> yeah, gets expensive in that range
<azonenberg> But that is the end goal
<azonenberg> I'm working my way up and hoping to learn and make most of my mistakes on the low cost systems :p
<azonenberg> As far as connectors and such go, i am planning to make the higher end systems modular for sure
<azonenberg> The entry level one I may make less modular because nice impedance matched connectors are expensive, and on a low cost system could amount to a significant fraction of the total board cost
<electronic_eel> and when you look at how long you are working on the z0 probe, it will take some time to get the 2ghz afe into shape...
<azonenberg> e.g. one option would be to have 4x AFE + 1x ADC as a socketed module you can populate one or two of attached to a single FPGA board
<azonenberg> you could then populate each of those with a 1520 or 1510 to trade cost vs bit depth
<azonenberg> and yes i fully expect a 1-2 GHz AFE to be a major project :D
<azonenberg> The 100 MHz one i think i have a good shot of getting right first try
<electronic_eel> yes, usually the scope vendors will then do several revisions for shaving off pennies here and there
<azonenberg> I think the 4x AFE + 4x ADC variant will be a separate design because it needs a bigger FPGA and more pins etc
<azonenberg> i'll probably gang 1x ADC + 1x AFE onto a socketed module and allow 1-8 per scope
<azonenberg> that also allows replacement of one channel if you manage to blow it out
<azonenberg> But i'm trying to be open to cost sensitivity of users
<electronic_eel> 1x adc and 1x afe on a combined module or a module each?
<azonenberg> Combined, probably
<azonenberg> minimizing connectors in the analog path is probably a good thing
<azonenberg> and again, cost
<azonenberg> ideally, in fact, i want to be able to allow users to buy additional channels and expand their scope as they grow
<electronic_eel> but didn't you want to allow to use one adc for several afes to save costs?
<azonenberg> Yes. There will be two configs
<azonenberg> First: 1x ADC + 4x AFE on one board
<azonenberg> second: 1x ADC + 1x AFE on one board
<azonenberg> they will be incompatible due to different physical sizes etc, the host FPGA board will be designed for one or the other
<azonenberg> The 1x ADC + 1x AFE will also have a higher AA filter
<azonenberg> because at 1 Gsps / 640 Msps, you no longer have a nyquist cutoff at 100 MHz
<azonenberg> So it's going to be a higher end instrument with maybe 250 Msps bandwidth
<electronic_eel> yeah, maybe it is going to be challenging to get these two configs work with one set of modules, with socketed filters and everything
<electronic_eel> probably not worth it
<azonenberg> Yeah agreed
<azonenberg> and the more connectors i add the more it will cost
<azonenberg> I dont want to make this out of reach for hobbyists
<azonenberg> the ADC to FPGA board connector is already going to be a Q-strip or similar, those are like $20 per mated pair
<electronic_eel> q-strip?
<electronic_eel> ah, these, yeah they are expensive
<azonenberg> yeah but we're talking ~16 gigabit LVDS pairs
<azonenberg> plus some i2c and slow control signals to the dac, vga, etc
<electronic_eel> have you tried lvds over one set of regular pin headers?
<azonenberg> At 1 Gbps it seems ill advised. This is an entry level scope but i'm not going to be Rigol and cut corners
<monochroma> PCIe and DDR connectors are pretty cheap, and card edge is free ;)
<electronic_eel> it is of course a impedance mismatch, but the connection is short
<azonenberg> monochroma: right angle pcie connector?
<sorear> mm, tunneling
<azonenberg> but also they're BIG
<monochroma> mini-pcie / nvme etc
<azonenberg> The hmcad1520 has eight lanes of LVDS which would mean a pcie x4 connector or similar
<electronic_eel> hmm, if the afe modules were upright, you could plug them into PCIe connectors
<monochroma> i have seen some projects make use of multiple connectors to one board to solve that problem
<azonenberg> m.2 is a possibility i suppose, but you can't easily put a SMA on one
<azonenberg> so you'd have to run cables from the front panel to the adc/afe boards
<azonenberg> say sma to u.fl pigtails or something
<electronic_eel> just the m.2 connector on the end, but a regular sma on the front?
<azonenberg> the issue is m.2s need to mount flat to the host board
<azonenberg> they need a screw etc to hold them down
<azonenberg> they're also 0.8mm thick and typical edge launch SMAs are meant for 1.6
<monochroma> the PCB can stick out past the end of the host PCB
<monochroma> or the host PCB has a cutout
<azonenberg> vertical PCIe connectors actually sound plausible though
<electronic_eel> but isn't pcie 1mm?
<azonenberg> no its 1.6
<azonenberg> you'd likely have to go 2U height instead of 1U
<electronic_eel> ah, mixed that up with mini-pcie
<azonenberg> which i guess isnt the end of the world
<azonenberg> that makes sense for the midrange one-adc-per-afe design
<azonenberg> one adc, one afe, eight pcie x4 slots
<azonenberg> then 64 lanes of LVDS to the FPGA
<electronic_eel> yes, that sounds good
<azonenberg> for the entry level design i think 1U with one q-strip per 4x AFE/1xADC is the way to go
<azonenberg> The high end design could also go PCIe, except you'd be running JESD204B over the connectors instead of LVDS
<azonenberg> Or actually, a proprietary serial interface protocol because you'd have an FPGA on the ADC board
<azonenberg> in order to buffer the data
<azonenberg> (maybe have some additional socketing going on there
<azonenberg> we'll figure that out much later :)
<monochroma> DDR sockets get used a *LOT* for CoM/SoMs
<electronic_eel> sfp+ socket at the end of the module
<monochroma> and are fairly cheap
<electronic_eel> then you could plug in fibre modules and get a 10gps isolated scope
<electronic_eel> to really show lecroy the tail lights
<azonenberg> lol
<azonenberg> sfp+ from module to host board, then isolated power input?
<azonenberg> honestly, compared to the cost of the ADC
<azonenberg> that would add next to nothing
<electronic_eel> yes, something like that
<azonenberg> you'd need to figure out a reference clock but that could probably be run over a second SFP lane or something
<azonenberg> at that point run all of the control plane data over 10g ethernet
<azonenberg> and the root FPGA then just aggregates all of the 10G lanes from the various channels and switches them onto a single 40G link to the host
<azonenberg> at that point, in fact, every channel would effectively be a fully differential measurement
<electronic_eel> you'd already have beefy fpgas on the modules, so 10g ethernet would not be much more effort than using something else
<azonenberg> yeah i mean i'd have a sodimm of ddr3, or maybe two, per module for buffering
<azonenberg> i think two, to keep up with the 120 Gbps of data coming off the ADC
<azonenberg> 1x DDR3 1333 x64 is only 83 Gbps before refresh/address overhead
<azonenberg> 64 Gbps for linear writes is probably doable though
<azonenberg> (actually kintex7 can go up to ddr3 1866 which should definitely be enough)
<monochroma> azonenberg: i forget, have you done a DDR core yet?
<azonenberg> No
<monochroma> exciting!
<azonenberg> honestly, i'd probably use the MIG to start and see how it worked
<monochroma> yeah
<azonenberg> if my goal was to get working quickly
<azonenberg> Anyway enough dreaming of high end gear, let's get the entry level one working first
<azonenberg> (among other things, i'm hoping sales of the probes and entry level scope can be used to fund R&D of the higher end models)
<azonenberg> all of the prototypes aren't free
<azonenberg> electronic_eel: Thoughts on HSP061-2N4?
<azonenberg> after the input attenuator so you'll have a 37.35 ohm series resistor limiting DC fault current
<azonenberg> And it only has to handle the fault until the not-yet-added comparator opens the relay
<azonenberg> Relay has a 100 μs actuation time
<azonenberg> i expect the response time of the comaprator to be quite a bit less than this
<electronic_eel> the HSP061-2N4 limits to gnd, not to -5v
<electronic_eel> I think some regular diode that clamps to the +-5v rails is better than a tvs / zener that has a wider voltage range over that it's breakdown happens
<azonenberg> The HSP limits to whatever "ground" you give it :p
<azonenberg> Look at the datasheet schematic
<azonenberg> it has steering didoes to "gnd" and "vbus" as well as a zener from gnd to vbus
<electronic_eel> yes, but if you give it -5v as gnd, the zener will begin to conduct at about +1v
<azonenberg> Yes so i guess i'd need +/- 2.5V rails for it to clip to
<azonenberg> i'm just not happy with most of the discrete steering diodes i see
<electronic_eel> just use the bav99, it works well
<electronic_eel> bvernoux recommended it some days ago too
<azonenberg> 2 pF o_O
<azonenberg> thats huge
<azonenberg> i mean i guess its ok for 100 MHz?
<electronic_eel> the alternative I use if bav99 isn't good enough: NUP1301U
<azonenberg> i like that more
<azonenberg> max 1A for 1 ms, 4A for 1us, so somewhere in between for a 100us shutoff
<azonenberg> assuming 1A is our limit, ignoring the resistors in the attenuator... 1A through 37.35 ohms would mean we could tolerate ~37V DC input momentarily
<electronic_eel> wouldn't that be 42V as you go into the 5V rail?
<azonenberg> well ah true
<azonenberg> yeah we'd be clipping to +/- 5V rails
<azonenberg> i was thinking ground for some reason
<electronic_eel> 42 is a good number ;)
<azonenberg> And since we can actually handle a bit over 1A
<azonenberg> we could probably test to +/- 50V as the "no permanent damage" threshold?
<electronic_eel> yes
<azonenberg> The bigger issue is the resistors in the frontend
<electronic_eel> and then you'd match common specs for commercial test gear with 50 ohms input
<azonenberg> 150 ohms to ground with 50V = 0.3A = 13.5W in the 150s
<azonenberg> 1A through 37 ohms is 37W
<azonenberg> For up to 100 us
<electronic_eel> melf thick film?
<electronic_eel> don't know about their rf properties though
<azonenberg> 100 MHz is hardly RF :p
<azonenberg> So RC0402FR-0736R5L for the sake of discussion is rated 1/16W continuous duty
<azonenberg> they can handle 2.5x that for 5 sec
<azonenberg> no mention of pulse performance
<electronic_eel> there will probably be hot spots in pulse applications
<azonenberg> CRCW120637R4FKEAHP is 3/4W continuous rating, 1206
<azonenberg> listed as "pulse withstanding"... lets see how much of a pulse
<azonenberg> ooh they have graphs :D
<azonenberg> 30W for 1 ms, 100W for 100 us
<azonenberg> So we'd be fully within specified limits
<electronic_eel> that seems good
<electronic_eel> didn't find the thick film melfs I was thinking about in the correct resistance values
<azonenberg> So basically as long as we are able to keep the comparator response time to not much more than ~50us we're golden
<electronic_eel> 50µs looks like it is not hard to do
<azonenberg> yes, easily
<electronic_eel> basic comparators usually react in the 100ns range
<azonenberg> Yeah
<azonenberg> i'm more worried about the relay driver fet etc
<azonenberg> but i dont think it'll be that hard
<azonenberg> the diode and resistor can handle this power for close to 1 ms
<azonenberg> we're just over the 1 ms power limit and well below the 100us
<azonenberg> so a few hundred us should be safe
<electronic_eel> why should the relay driver fet be a problem?
<electronic_eel> just a basic n-fet
<electronic_eel> and a freewheel diode
<azonenberg> yeah i just mean i expect a high capacitance power fet to react slower than the signal path of a comparator
<azonenberg> i dont think it will be a problem
<electronic_eel> don't need what is marketed as "power fet" here, it is just a few ma
<azonenberg> True
<azonenberg> the one i was thinking of is pretty small
<azonenberg> anyway, one potential issue: NUP1301U at 1A has 3V forward voltage
<electronic_eel> bss138 would be my first pick
<azonenberg> So we will be momentarily outside the absolute max of the comparator input
<azonenberg> I think the ESD diodes should be able to handle a 150μs transient of 3V though
<azonenberg> s/comparator/offset amplifier/
<electronic_eel> comparator? you mean the diff opamp for the offset stage, right?
<azonenberg> yeah
<electronic_eel> yes, the esd diodes should be able to help.
<azonenberg> So i think this will work nicely
<electronic_eel> also the current has a rise time and the esd diodes are very fast, so they begin to conduct before you get to the full 1A
<electronic_eel> so the time the esd diodes of the opamp will be used is shorter
<electronic_eel> I think this will work
<azonenberg> My power supplies max out at 32V
<electronic_eel> supplie_s_ is the key here
<electronic_eel> put them in series
<azonenberg> once all other testing is done (in case it dies) i intend to test +/- 32V overload at the input
<azonenberg> They are dual channel, just need to check if they're rated for going that high wrt ground
<electronic_eel> you can also send me a test board and I can do some testing
<electronic_eel> I got multiple single power supplies that go to 56v and a big one that goes to 60
<azonenberg> yeah i dont see any limits in the manual re series connection
<azonenberg> Which means i can go up to 64V with two lanes in series
<azonenberg> thanks to scopehal i can script the power supplies delivering pulsed output of various voltages
<electronic_eel> also I'm currently building a power switch for them to avoid the relay chatter I currently have
<electronic_eel> switching them on the regular way charges the output cap, so has a slower risetime
<azonenberg> My thought is to hook up a 10x passive scope probe to some of the test points on the DUT
<azonenberg> then record transients as the input power is turned on
<azonenberg> see how high we get at various spots
<azonenberg> and for how long
<azonenberg> then verify RF performance again after the pulse
<electronic_eel> turning on the supply the regular way usually results in a slowish ramp-up
<azonenberg> i'd be doing lower level transients by manually touching a wire to things
<azonenberg> but 50V is a bit high for me to be comfortable holding a wire live :p
<electronic_eel> that gives chatter
<electronic_eel> best way is to use a fet with a proper driver to switch it on
<azonenberg> true. well if you want to build a proper test rig for this, i'd love any data you can collect once i've done my verification
<azonenberg> random thought: how much voltage can SMAs handle? :p
<electronic_eel> I want some better test method for some other project, so I'm currently working on such a switch
<electronic_eel> the design I have in mind is maybe a bit overengineered, but I want to have some fun
<electronic_eel> aren't smas usually rated for 500v?
<electronic_eel> or was that bnc?
<awygle> depends on the cabling i think
<azonenberg> anyway, however high the thing ends up being able to handle
<awygle> 100VRMS for the connector
<azonenberg> realistically it would take some serious carelessness to hit that
<azonenberg> especially with a 10x probe
<awygle> or wlel no that's the dielectric withstanding ovltage
<awygle> 375 VRMS rated
<electronic_eel> if the afe blows at 375 I wouldn't have a problem with it
<electronic_eel> the current will probably weld the relay open at that point
<electronic_eel> and a lot of stuff will end as black dust on the board
<azonenberg> Lol
<azonenberg> If you manage to put 375V into a 50 ohm input you're really screwing up big time
<azonenberg> like, thats higher than both us and eu mains
<azonenberg> so you'd need an active step-up from mains
<awygle> seems fairly easy to do with a big amplifier
<awygle> guess that's why TWTAs use, well, Ts
<azonenberg> yeah well again, this is an entry level hobbyist scope :p
<azonenberg> presumably someone using it for more serious work has some idea of what they're doing and has a proper HV probe
<electronic_eel> you could get 375 if you miswire a 3 phase system
<azonenberg> again, so far outside the norm of this sort of test equipment i'm not worried
<electronic_eel> yes
bvernoux has quit [Quit: Leaving]
<azonenberg> electronic_eel: random thought: should i put a resistor or something in parallel with the flyback diode to provide faster relay coil shutoff?
<electronic_eel> ah! no, a z diode
<azonenberg> in series*
<electronic_eel> in series
<azonenberg> got any references for that?
<electronic_eel> what is the max vds of the fet?
<azonenberg> tentatively planning to use the SSM6N58NU which is 30V
<azonenberg> (and 1.8V gate drive, which is why i like it)
<electronic_eel> the higher with the vds you can go, the higher you can allow the voltage spike to go
<azonenberg> why is higher voltage spike good?
<electronic_eel> that means more energy is taken out of the field
<electronic_eel> which means faster decay
<azonenberg> so my plan is to use a low side n-fet
<azonenberg> one end of the coil will be tied to +12V, the other through the fet to ground
<azonenberg> if my understanding is right, when i open the circuit that node will try to go negative?
<azonenberg> the high side won't be able to move much because of all the decoupling capacitance on the +12V rail
<electronic_eel> the coil wants to keep the current flowing when you shut off the fet
<electronic_eel> to oppose the rising resistance of the fet, the voltage over the fet will rise, rise above the +12v rail if you let it
<azonenberg> ah so its trying to go positive not negative
<electronic_eel> so the basic solution is to have a diode with anode to the fet and cathode to +12v rail
<electronic_eel> that will discharge it to the positive rail
<electronic_eel> but as the rail is just +12v it will be a bit slower
<azonenberg> and higher Vf on that diode is a good thing?
<azonenberg> because more voltage drop = more current = faster shutdown
<electronic_eel> yes, faster shutdown
<electronic_eel> you put a zener diode in series so the voltage can go way above the rail
<azonenberg> So, given that the fet is rated for 30v and our supply is 12V
<electronic_eel> but you have to keep it well below the vds max of the fet
<azonenberg> how does a 10V zener sound?
<azonenberg> that provides ~8v of headroom for the fet
<electronic_eel> yes, that should work
<azonenberg> and then any old rectifier diode in series with it
<electronic_eel> I usually use bss138 for this kind of stuff, that is 50v and can be switched with 3.3v
<azonenberg> i have a bunch of the ssm fets handy, because they're compatible with 1.8v fpga gpios
<azonenberg> i use them for switching LEDS and stuff but they're overkill for that
<electronic_eel> the comparator you use won't be 1,8v, right?
<azonenberg> It's 1.8V logic level gate nominally, 1V Vgs(th), but Rds(on) continues dropping as you go higher, the datasheet curves go to 4.5V
<azonenberg> absolute max Vgs is 12V
<azonenberg> gate leakage current is specified at 10V
<azonenberg> so i figured i'd use a 5V comparator
<electronic_eel> 5v? wouldn't it be better to use +-6V for the comparator?
<azonenberg> 5, 6, whatever - doesnt matter
<azonenberg> i'll be greatly attenuating the input with a resistive divider
<azonenberg> (since i need to have 50V input not go out of range)
<azonenberg> so probably a 10:1 divider or something
<electronic_eel> I mean dual supply, because the sensed voltage can go negative too
<azonenberg> oh. yes +/- 5V
<azonenberg> some sort of window comparator
<azonenberg> i havent picked it out yet
<electronic_eel> yes
<electronic_eel> so if it has a push-pull output it will drive the gate between +- 5v
<electronic_eel> your SSM6N58NU would be ok with that, but you could also use lot's of other fets which would allow higher vdsmax
<electronic_eel> relais switchoff time matters here
<electronic_eel> I don't know how sensitive these rf relais are with this, but I could easily measure the difference in the drive circuit with a regular power relais
<electronic_eel> don't remember the exact numbers, but I remember playing with this and since then always using the zener solution
<azonenberg> oh i'm definitely using the zener option
<azonenberg> 10V above 12V should be ok, i think
<electronic_eel> a open collector output comparator would be ok too, since we only care about fast shutoff
<azonenberg> But without spice models for the zener and knowing the exact coil inductance of the relay it'll be hard to know
<azonenberg> I was thinking of doing that anyway because instead of a window comparator
<azonenberg> i might use two separate open drain/collector comparators
<azonenberg> in a wired-OR
<azonenberg> depends on what i can find that looks good and is priced right
<electronic_eel> lm311 is cheap and one of the faster of the cheap ones
futarisIRCcloud has quit [Quit: Connection closed for inactivity]
<electronic_eel> if you want to go faster, the allowed vcc is often the limit. which would mean an extra +- 2.5v supply
<azonenberg> I'm eyeing the LM393
<azonenberg> Sub microsecond propagation delay, two elements in a nice small 8 ball WLCSP
<azonenberg> and fairly cheap
<electronic_eel> the 393 is the most common one and really cheap, the 311 is a slight bit faster
<electronic_eel> but I think in this application both should be fine
<azonenberg> yeah comparator speed won't be our limiting factor
<azonenberg> not when the relay takes 100us to turn off, plus however much the snubber adds
<azonenberg> 300-700ns is... insignificant
<electronic_eel> how about a ADCMP582? 180 ps propagation with 10 ps jitter. seems like it might nearly meet the specs we need ;)
<azonenberg> at that point why not go with a HMC675?
<azonenberg> gotta go fast <sonic/>
<electronic_eel> yeah, you are right, that is the better choice for our relay
<azonenberg> Lol
<electronic_eel> do you know any relais with cml input stage?
<electronic_eel> or maybe pecl?
<azonenberg> lool
<azonenberg> in all seriousness, i'm using the hmc674/675 in the input buffer for FREESAMPLE
<azonenberg> Which is the highest bandwidth piece of test equipment i've designed to date (not finished, sch is ~done but layout is far from complete)
<azonenberg> are you familiar with it?
<azonenberg> it's been on hold for a while while i finish the probes and some other stuff
<azonenberg> i might redo the stackup and some other bits now that i've got Sonnet, that was the other reason i stopped layout - i wanted to make sure i had proper connector matching etc
<electronic_eel> is that your high ghz sampling scope?
<azonenberg> Yeah
<electronic_eel> I would love to have something like this to get eye diagrams for high speed signal lanes
<azonenberg> 10 GHz / 1 Tsps is the target
<azonenberg> But i want to be very careful on the layout
<electronic_eel> regular scopes in this bw region tend not to be in hobbyist price ranges
<azonenberg> and get a bit more experience at these frequencies
<azonenberg> Yes, thats the idea
<azonenberg> It will integrate with scopehal, btw, using glscopeclient as the UI
<azonenberg> the only difference is instead of the eye being the output of a protocol decoder, it will be the native instrument output
<azonenberg> specans will work the same way, they'll plug in as the source of a spectrum channel, instead of being the output of a fft decoder
<azonenberg> you can then run a waterfall decode on that spectrum, etc
<electronic_eel> I just had a short look through the schematics you posted for freesample
<electronic_eel> my first thought was that the jitter for the delay lines and comparators added could become a problem for the resolution
<azonenberg> So, the coarse delay line is only used in no-PLL mode
<azonenberg> for when you have a nonperiodic trigger of some sort that you can't lock the PLL to
<azonenberg> Jitter for the HMC856 fine delay is much smaller, Rj 200fs and Dj 2ps
<azonenberg> then iirc i'm using a lmk04806 as the pll to jitter clean the CDR or external clock. That has sub picosecond jitter
<electronic_eel> I haven't looked at the datasheets in detail - could the deterministic jitter be cal'ed out in this application?
<azonenberg> Very possible
<azonenberg> that being said, 1 Tsps is massive overkill for a 10 GHz analog bandwidthn
<azonenberg> it'll just make the eyes look prettier
<azonenberg> let me put it this way, if i have 10 bit vertical resolution and 1ps per sample horizontally, I can make a *full 1080p* eye pattern of a 1.25 Gbps data stream
<azonenberg> 1 UI with +/- 0.5 UI on either side comes out to 2 UIs = 1600ps = 1600 pixels x 1024 high, add in UI chrome and scales etc and you're comfortably at 1920 x 1080
<azonenberg> When you're sampling at 100x Nyquist you can afford a bit of jitter :p
<azonenberg> anyway basically right now freesample is on hold until i can be certain the layout is solid
<electronic_eel> how do you want to characterize the layout and the input stage?
<electronic_eel> do you have some 10 GHz gear to compare it with?
<electronic_eel> unfortunately 10 GHz VNAs aren't sold for peanuts
<azonenberg> That's another big open question :)
<azonenberg> But basically, my design splits the input and feeds it into the comparator almost instantly
<azonenberg> it was intended to be as "correct by construction" as i could make it
<azonenberg> basically, the AFE is a single splitter, a SMA, and a very short piece of transmission line
<azonenberg> there's very little room for anything to distort the signal other than the connector which you can simulate the match of
<electronic_eel> could you ask someone who has the necessary gear? like maybe shariar from the signal path?
<electronic_eel> maybe he is interested in making an oshw design in this speed range
<electronic_eel> and helping with a few measurements
<azonenberg> Well i have a ways to go before i move up
<azonenberg> i think i want to put freesample on ice for a bit and get more practice at lower and midrange
<electronic_eel> yeah, I think this is the reasonable approach
Degi has joined #scopehal
<azonenberg> o/ Degi
<azonenberg> electronic_eel: degi is interested in a hmc based scope too
<Degi> hi
<electronic_eel> hi
<azonenberg> Degi: so, the design we had in mind for the entry level scope is 1G ethernet, using an artix7 (vivado to start, moving to prjxray + symbiflow once it matures enough)
<azonenberg> Two socketed AFE+ADC boards, each with 4x AFEs and one HMCAD1510/11/20, for a total of 8 channels
<azonenberg> each board would have switchable 1/2/4 interleaving and 8/12 bit resolution independently