Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Bondematt
Jan 26, 2007

Not too stupid
Just think of scratched off traces and jumper wires going in random directions as adding personality to the board.

Adbot
ADBOT LOVES YOU

Splode
Jun 18, 2013

put some clothes on you little freak
If you put zero ohm resistors in line with all your traces and testpoints everywhere you're pretty unlikely to have a completely unusable board. The only mistake that really sucks is getting a footprint totally wrong, and even then if it's just for one part you can probably make it work by just sticking the part on upside down with glue and running flying leads to the pads.

Rescue Toaster
Mar 13, 2003

cruft posted:

And then there's me, on month, like, 4 of putting off ordering a PCB because I'm afraid I might have goofed something up in my design.

The first time is always scary, I suppose.

Just ten years ago I would have spent like $100 on the same PCBs that now cost literally $2. The only reason to be that careful these days is so you don't blow an indefinitely-backordered STM32 or something. For real prototype boards I'll put space for a 0 ohm 0805 resistor in the separate V+ of the main chips, so I can leave some disconnected, monitor current, replace with a small current limiting resistor when doing initial bring-up, etc...

PDP-1
Oct 12, 2004

It's a beautiful day in the neighborhood.

Splode posted:

The only mistake that really sucks is getting a footprint totally wrong

If you have the parts on hand, most PCB CAD packages can print out the layout at a pretty accurate 1:1 scale on paper. I've caught more than one mistake by putting a chip on the paper footprint, yelling "oh poo poo!", and running back to the CAD software to fix it up.

I've also been using more of the SnapEDA/SymacSys/etc stuff from the Digi-key/Mouser/etc sites. Sometimes I'll tweak a symbol from them around just so it matches the general 'style' of the rest of the schematic but having the footprints and 3D models available is pretty nice. Haven't really had one be wrong yet either.

Splode
Jun 18, 2013

put some clothes on you little freak

PDP-1 posted:

If you have the parts on hand, most PCB CAD packages can print out the layout at a pretty accurate 1:1 scale on paper. I've caught more than one mistake by putting a chip on the paper footprint, yelling "oh poo poo!", and running back to the CAD software to fix it up.

I've also been using more of the SnapEDA/SymacSys/etc stuff from the Digi-key/Mouser/etc sites. Sometimes I'll tweak a symbol from them around just so it matches the general 'style' of the rest of the schematic but having the footprints and 3D models available is pretty nice. Haven't really had one be wrong yet either.

Yeah I have not had any issues with snap eda either. Wurth electroniks also supplies bang on footprints.

The only thing I encourage people to do with snap eda is double check that the footprint is for that exact part, as sometimes there can be data entry errors (and it's a footprint for a different part) especially when it's linking from Digi-Key.

The biggest gotcha when doing footprints yourself is some rear end in a top hat at the manufacturer putting a bottom view pinout on the sheet.

Charles Ford
Nov 27, 2004

The Earth is a farm. We are someone else’s Ford Focus.

Splode posted:

The biggest gotcha when doing footprints yourself is some rear end in a top hat at the manufacturer putting a bottom view pinout on the sheet.

My favourite is when there's a diagram of the footprint, and it's got some weird shape, and they give you all the dimensions...but you need to keep doing mental arithmetic o get to the values you'd need to actually put it into a footprint editor.

That or the ones where they specifically omit whether it's top or bottom view of a non-symmetrical part, or it's a weirdly shaped part and they don't bother noting which pins are which.

Splode
Jun 18, 2013

put some clothes on you little freak
I've sought out alternative ICs because a datasheet like that has just pissed me off too much.

PDP-1
Oct 12, 2004

It's a beautiful day in the neighborhood.
I've bought alternative parts because the manufacturer doesn't have a 3D model.

The melding of PCB and 3D CAD is so powerful that I'm just not gonna buy your part if I can't drop a .step or whatever file into a design, project whatever part needs a hole onto the front panel, tolerance that hole out a bit, and send the panel off to get waterjetted/silkscreened and sent back in the same amount of time it takes the PCB to get here.

Rescue Toaster
Mar 13, 2003
The quality of drawings for 'physical' parts like switches/jacks/connectors is loving awful. I was doing a front panel for a barrel jack and had to add together like 6 dimensions and then subtract 4 others to get the distance from the edge of the PCB to the pin that I actually needed. gently caress you, rear end in a top hat.

Pollyanna
Mar 5, 2005

Milk's on them.


Can’t wait to do anything more complex than laser cut a blank 6HP panel!!! :v:

BattleMaster
Aug 14, 2000

Charles Ford posted:

I did once try something a little more ambitious, when I was around 12 years old:



It's an attempt to build a Z80 computer, entirely on stripboard. There's buses and things in there, in the mess of wires. It had a separate I/O board meant to drive the keyboard recovered from an old trashed BBC Micro. It didn't work at all, but I borrowed an ICE from my dad's work (an old one - it was a long, narrow box filled with PCBs that ran the full length of it, with a pile of ribbon cables that ran out to a "pod". You could swap out the pod and its interface board inside the box for different CPUs, and it had an extremely delicate connector on a ribbon cable that came out of the pod that would plug into the CPU socket on your system. You then controlled it via a command line interface on an RS232 port on the back of the box). It told me multiple lines on all of my buses were tied together, after which I was filled with a kind of despair and never tried it again.

Man this hit me in the feels. It's a cool project and I'm actually sad it didn't work out.

I would blow Dane Cook
Dec 26, 2008
Has anyone got any recommendations for Nixie tube clock kits and nixie tube suppliers?

Pollyanna
Mar 5, 2005

Milk's on them.


Any tips for connecting two circuit boards? I want to draw up a circuit around an Arduino Nano on stripboard, then wire that to some PCB-appropriate components on a separate perfboard and mount it with some standoffs. Each half is pretty easy to do on their own, but connecting the two escapes me.

I could just solder some wire between the copper pads, but that sounds janky and difficult to work with. I could Frankenstein the boards in a perpendicular orientation somehow with some card-style terminal but that blows up the footprint. Maybe some combination of headers and screw terminals???

I’ve also got to add a shrouded power header in a position that isn’t impossible to get to and that suuucks cuz the copper tracks are on the side I need the header on unless I mount the boards all weird and :bang:

I would blow Dane Cook
Dec 26, 2008
How many wires are you looking to connect?

Shame Boy
Mar 2, 2010

Pollyanna posted:

Any tips for connecting two circuit boards? I want to draw up a circuit around an Arduino Nano on stripboard, then wire that to some PCB-appropriate components on a separate perfboard and mount it with some standoffs. Each half is pretty easy to do on their own, but connecting the two escapes me.

I could just solder some wire between the copper pads, but that sounds janky and difficult to work with. I could Frankenstein the boards in a perpendicular orientation somehow with some card-style terminal but that blows up the footprint. Maybe some combination of headers and screw terminals???

I’ve also got to add a shrouded power header in a position that isn’t impossible to get to and that suuucks cuz the copper tracks are on the side I need the header on unless I mount the boards all weird and :bang:

Pin headers and sockets are the easiest way to go yeah, though you'll probably have to start with laying out the headers on the perfboard to match whatever the stripboard has, then build the rest of the circuit around that.

Pollyanna
Mar 5, 2005

Milk's on them.


I would blow Dane Cook posted:

How many wires are you looking to connect?

I don’t have the schematic on me but it’s a good few unique connections.

First, from power to stripboard (which has the Arduino and a power shroud).

Power:
- 12V
- GND

Then, from stripboard to perfboard (which has a screen, a rotary encoder, and three TRS jacks).

OLED:
- GND
- 5V, from Arduino
- Arduino pin A4
- Arduino pin A5

Rotary encoder:
- GND
- VCC (5V from Arduino? 12V from power?)
- Arduino pin Dn
- Arduino pin Dn+1
- Arduino pin Dn+2

Audio In:
- GND
- Arduino pin A0 (tip)

Audio Thru:
- GND
- Audio In tip (tip)

Trigger In:
- GND
- Arduino pin Dn+3

Something about the layout makes this complicated to my dumb rear end, I can expand on this when I get home.

Shame Boy posted:

Pin headers and sockets are the easiest way to go yeah, though you'll probably have to start with laying out the headers on the perfboard to match whatever the stripboard has, then build the rest of the circuit around that.

:shepface: Gotcha. Fun. Lemme investigate my options, I think I don’t actually have any appropriate headers and will need to do some hosed up pin reorganization to handle the OLED header.

csammis
Aug 26, 2003

Mental Institution
Buy a variety pack of JST-PH headers and sockets, a reel of 1000 pins, a crimper, and never want for connectors again!

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
Also a set of each combination of male/female ended jumpers. They cost like, $2 for 100 packs, I go through them like candy.

Pollyanna
Mar 5, 2005

Milk's on them.


Am I gonna have to wait on another 5+ day Digikey package for that poo poo thooooo god I’m surprised how hard it is to get electronic components IRL instead of Amazoning it all.

Will do!

Shame Boy
Mar 2, 2010

Arrow for a while had pretty good deals on like next day or two day shipping if you bought like $50, not sure if they're still running that but might wanna check just in case. For a while it was straight up free, though I think they've eased back from that.

Shame Boy
Mar 2, 2010

Arrow's current homepage shows this image which is hurting my head:



Like could you not have found a DIP-8 for that stock photo, what the hell??

BattleMaster
Aug 14, 2000

I believe that stock photographers hire people who understand the subject matter specifically so they can do things wrong to bug people who are savvy enough to notice

Shame Boy
Mar 2, 2010

Pollyanna posted:

get electronic components IRL instead of Amazoning it all.

Also just to note, this used to be specifically what RadioShack's niche was. I remember as a kid when we needed some particular thing to fix something, just going into RadioShack and going through their enormous drawers of switches and capacitors and stuff like that, it was fantastic. Like an Ace Hardware but for electronics stuff.

Then they decided they wanted to sell cell phones instead and whelp.

e: Though right at the end of their life they were trying to go back and sell stuff to arduino dorks again but it was too little too late. However that did mean that I got some fuckin' great deals on a bunch of random spools of wire and connectors and switches and stuff when they were doing the going out of business 90% off sales which was excellent.

Pollyanna
Mar 5, 2005

Milk's on them.


That’s pretty lame. I don’t wanna wait for Amazon to drop off a package I want it now :mad:

Maybe I’ll make do with those funny looking red and blue rings and stuff.

BattleMaster
Aug 14, 2000

I get Digikey orders the next day if I order earlier enough in the day and I live in Canada. I don't know what magic they work to get stuff across the border that fast especially for $8 or free if the order is big enough but it's impressive.

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
Digikey is ironically better for Canadians than Americans.


Literally the one time we don't get hosed by shipping.


Lately I've been finding Mouser better in all respects though.

cruft
Oct 25, 2007

Shame Boy posted:

Arrow's current homepage shows this image which is hurting my head:



Like could you not have found a DIP-8 for that stock photo, what the hell??

This image needs to be the thread title, somehow.

e: Oh, poo poo, I didn't even notice the chip was too big, I only saw that pin 1 was on the wrong end.

longview
Dec 25, 2006

heh.
Is there such a thing as a fully static 8 bit flash ADC?
I'm wanting to design a circuit that will sit next to a highly sensitive antenna input and putting a clock in there might cause issues.

I might be able to make do with two static 4-bit converters + some analog and ROM trickery.
I know about the LM3914/15, is there a 16-output version of that for example?

Doesn't matter if it's obsolete, this is just a one-off design.

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe
I've only ever seen "fully static" mean that the clock can go down to 0 not that there is no clock at all. As in there's no dynamic logic. Maybe "asynchronous ADC" would be a better search term.

I'm not sure you'll get less noise with all 8 outputs switching as fast as they can, say if you were right on the boundary betwern code 10000000 and 01111111. At least if it's clocked you can limit/control their switching frequency. Of course I also don't know exactly what youre trying to do so I could be way off.

longview
Dec 25, 2006

heh.
Fair enough, I figure a "fully static" flash ADC would be one that's just a pile of comparators and some logic (think LM3914 with a priority encoder). Probably not the most useful thing since it would be hard to know when to sample the data in a coherent state.
Seems 8 bit flash ADCs use some kind of pipeline design to work out the last 4 bits so that needs a clock. Not surprising given that's a lot of comparators to control.

I want to control a couple of digital attenuators for an RF input overload protector, and the most practical place to put the control of these is inside an assembly right by the antenna input (with crazy high sensitivity).
Basically take a power measurement, if it's above a threshold, set the attenuators to eat the excess to prevent overloads later in the signal chain,
The attenuators have to be inside a shielded enclosure, and it's easier if the control logic is too but I don't want to risk putting a high speed MCU in there.

A backup strategy would be to just output the power measurement and put in a shift register (maybe an old school 4000 series to dull the edges a bit; 4094 or 4015 could work).
I can run the control lines and analog power measurement through a filtered D-Sub connector and do the logic in a microcontroller somewhere else. (Ensuring that the clock slew rate is just barely fast enough to work)
With that design I could also be more clever about the control scheme since changing the gain at all will likely inject audible artifacts when the attenuator switches operate (due to charge injection, if nothing else), so I could ensure it minimizes the number of state changes.

Rescue Toaster
Mar 13, 2003
There are definitely 8 bit flash ADCs that have a full 256 comparators. But they still have a clock on the decoders and output because as you say, you have to know when to sample otherwise the output bits could be mid-transition and you'd have to worry about metastability poo poo on your inputs.

Foxfire_
Nov 8, 2010

How fast do you need it to react? Digitizing it at all seems like it'd be prone to not switching the attenuators in time to stop a too-big signal from destroying whatever amplifiers are next.

Instead of digitizing the measured power voltage and doing the comparison there, if the power level to switch at doesn't change much, you could use a digipot to generate a trip voltage, then a comparator against measured power voltage to generate a panic/don't panic signal. The digipot can be unclocked except when you're changing the trip point.

Charles Ford
Nov 27, 2004

The Earth is a farm. We are someone else’s Ford Focus.

Rescue Toaster posted:

There are definitely 8 bit flash ADCs that have a full 256 comparators. But they still have a clock on the decoders and output because as you say, you have to know when to sample otherwise the output bits could be mid-transition and you'd have to worry about metastability poo poo on your inputs.

Obviously this is why you want your asynchronous ADC to use a Gray code! It's perfect!

longview
Dec 25, 2006

heh.

Foxfire_ posted:

How fast do you need it to react? Digitizing it at all seems like it'd be prone to not switching the attenuators in time to stop a too-big signal from destroying whatever amplifiers are next.

Instead of digitizing the measured power voltage and doing the comparison there, if the power level to switch at doesn't change much, you could use a digipot to generate a trip voltage, then a comparator against measured power voltage to generate a panic/don't panic signal. The digipot can be unclocked except when you're changing the trip point.

Not a bad idea, in this case I'm not concerned about damage with this circuitry, just maintaining linearity. This is a 10 kHz - 30 MHz communications receiver (that I might extend to 60 MHz as part of this redesign).
Because the bandwidth is so large I can't just do the normal thing and use a PIN diode as a variable resistor (though I could use diode switches to enable attenuators).
The response should basically be a compressor with peak-hold and some decay time constant, and a few ms response time is fine.
The damage-protection will be elsewhere, likely a set of gas discharge tube and varistor first, then some diode clippers and maybe even a fuse.

The key thing I want to solve is the classic tradeoff between sensitivity and dynamic range, I want to make my receiver input highly sensitive. Some rough estimates suggest the post-filter LNA can achieve better than 0.5 dB noise figure by using a 1:16 impedance transformer on the input and a high performance opamp as the amplifier.
If some really strong signal appears on the input, then I need to drop the gain to ensure the LNA remains linear, and using front end attenuators is how I want to do it (I already have AT-210 attenuator ICs in stock).
I consider this to be a somewhat exceptional case, so there will be a manual "auto attenuator" switch on the front panel that will enable this circuitry.
If the input saturates and the switch isn't pressed then performance will degrade but that's fine, operator (me) error basically. I might be able to detect this case signal a front end overload to the operator somehow.

If I were using a dual gate FET for the LNA then I could just drop the gain in that but I'm pretty sure the opamp LNA will be the most optimal wrt. linearity and noise. Unfortunately closed loop opamp circuit don't really lend themselves to variable gain applications.
Comedy option: use a digipot in the feedback loop of the LNA to make it variable gain.

silence_kit
Jul 14, 2011

by the sex ghost
I'm not familiar with using these types of products so I can't provide advice on device selection, but why can't you use an RF power detector chip instead of an analog to digital converter to sense the overload condition? Analog Devices has a lot of products in the RF Power Detector category.

longview
Dec 25, 2006

heh.
I am planning to use one, the AD8307 (very versatile part). The problem is the attenuators are digitally controlled so I need something digital somewhere in there to control them.
So the idea was to digitize the power detector output, not the actual RF (that would be technically possible but silly in this case),

And as mentioned above, voltage variable (i.e. analog) attenuators won't really work for various reasons. I know ADI makes some ICs for that but they can't handle the power I need.

ANIME AKBAR
Jan 25, 2007

afu~
It ought to be possible to do a MCU-based solution which doesn't contaminate the RF signal. Just use a MCU which has a very deep sleep mode (as in, every clock and oscillator is off) which also maintains its GPIO states during that sleep mode. Only wake it up when the power alarm trips, do its thing to update the attenuator (I'm assuming it doesn't matter if it generates some RFI during that time), then immediately go back to sleep again. IIRC most of the old Atmel AVRs can do this, like <50 lines of C code.

If you don't have experience with any MCUs that have that sort of feature, then you could instead use the power alarm signal to drive the MCU's reset line, and use an external register chip to save the states of the attenuator.

ANIME AKBAR fucked around with this message at 14:38 on Sep 3, 2022

silence_kit
Jul 14, 2011

by the sex ghost

longview posted:

And as mentioned above, voltage variable (i.e. analog) attenuators won't really work for various reasons. I know ADI makes some ICs for that but they can't handle the power I need.

Hey check this out. This is kind of cool. Maybe it is the wrong technical option. It's large, it pushes too much RF complexity onto the system designer, it has too much DC power consumption . . .

You mentioned earlier that using a PiN diode as a variable resistor could be an appealing technical option, but is too narrow band for your application. In the link below, to get the broad bandwidth, it looks like people have used them as voltage variable resistors inside of a pi attenuator circuit. As you are well aware, a discrete PiN diode-based attenuator would probably have better linearity/power handling capability than a similar FET-based IC device.

https://www.skyworksinc.com/-/media/C069BA8E052F440388E14B0F804D0EF0.pdf

The excess loss of the attenuator demonstrated in link above seems pretty high when compared to most digital attenuator products, and so might be wildly inappropriate for the high sensitivity mode of operation in your receiver, but maybe the excess loss of the circuit could be improved by trading it off with other properties of the circuit, like DC power consumption & bandwidth.

silence_kit fucked around with this message at 16:57 on Sep 3, 2022

SnoPuppy
Jun 15, 2005
Some thoughts:
Could you use a directional coupler to provide some level of isolation, then low pass that to your ADC (if the detection time is in ms)?
The lowest frequency might prove to be challenging for a directional coupler though.

Can you measure after the LNA, if you’re not concerned about damage?
As the output approaches the region where it would be non-linear, you could then turn down the input.

And one thought about your attenuator - if it’s resistive, will this be low enough noise to avoid swamping the NF of your LNA?

Adbot
ADBOT LOVES YOU

longview
Dec 25, 2006

heh.
Yeah that Pi attenuator circuit is nice, I've used it for one design where the same exact components seemed to work fine from at least down to 100 MHz to over 2 GHz.
The more or less linear in dB response is useful as well, though the high-attenuation range is usually not very flat vs. frequency which is worth keeping in mind.

It's not suitable here here since PIN diodes only work as resistors down to around 1 MHz (and IIRC, it usually takes some extra care to use them below maybe 10 MHz). - that's what I meant by it not being broad band enough.
Something something ~1 µs charge recombination time, it basically starts acting like a normal diode at those time scales.
And this thing needs to work down to at least 15 kHz to not be worse than the original RF design. This also limits the auto attenuator control bandwidth somewhat, if I have a e.g. 100 kHz gain control loop it will just regulate away the RF.

To be fair it's not like I expect full RF performance at 15 kHz, nor do I need it.
Sensitivity and power handling will degrade from around 100 kHz and down due to the transformer "amplified" LNA design, where the transformer will saturate way quicker and provide less signal below around 100 kHz.
I'm handling that in part by AC-terminating the secondary of the transformer, basically leaving it unloaded at the lowest frequencies, this at least makes it not attenuate as much at these frequencies. This is a compromise design but it should have great performance at higher frequencies.

The reason I don't need full performance is that the atmospheric noise floor increases inversely with frequency, so at very low frequencies I can have very low sensitivity (and I use active (fiber optic output) antennas down there anyway so the signal is pre-amplified).

I'll also mention I'm basically building my own communications receiver into the chassis of a ITT Mackay 3021N marine receiver from the 1970s (schematics can be found on google for the 3021A variant). I've already replaced the power supplies, "Scan-Tune Logic" board (tuning knob decoder), synthesizer (distilled down to a single board with two DDS generators), demodulator (DSP card), and audio output board (DSP with RNNoise noise reduction).

The final circuitry to replace is the 1st and 2nd converters, the IF amp, filter boards, and AGC amplifier. This will likely be distilled down to 1st converter, and 2nd converter+IF amplifier+DSP IF filters+AGC board.
At that point I will have complete board set with no original electronics remaining except the preselector.

SnoPuppy posted:

Some thoughts:
Could you use a directional coupler to provide some level of isolation, then low pass that to your ADC (if the detection time is in ms)?
The lowest frequency might prove to be challenging for a directional coupler though.

Can you measure after the LNA, if you’re not concerned about damage?
As the output approaches the region where it would be non-linear, you could then turn down the input.

And one thought about your attenuator - if it’s resistive, will this be low enough noise to avoid swamping the NF of your LNA?
I don't think there's any benefit to using a directional coupler here - the AD8307 has a dynamic range and noise floor such that it can usually just be resistively coupled to a 50 Ohm line through e.g. 1 kOhm, which doesn't really cause any losses in the signal being measured.

Measuring after the LNA is definitely possible, though I prefer to put the power measurement before the attenuators when possible. Since I plan to use precision attenuators it means there's no feedback loop to worry about at all, just measure, filter, and work out the attenuation to reach the target power level.

I can't see how I'd maintain the noise figure with front end attenuation present, if I add 10 dB attenuation in front of a more or less perfect amplifier then surely my system noise figure is now close to 10 dB.
Put plainly an input signal 10 dB above the LNA input noise floor will now be 0 dB above it instead - so the attenuator is a compromise solution to prevent saturation (which is usually a worse deal than accepting an increased noise figure).
To be clear my plan is to use RF relays to enable the path through the automatic attenuators based on a switch (which is already there so I have to do something with it!), normally these won't be in circuit at all.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply