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
Splode
Jun 18, 2013

put some clothes on you little freak

Dominoes posted:

Same experience with Forseti with JLC, to SE USA. About 1 week order to ship, including SMT assembly. 3-4 days transit time.

Assembly in a week? Holy smoke PCB way took a month to assemble. I might need to give that a try.

Adbot
ADBOT LOVES YOU

Dominoes
Sep 20, 2007

I speculate it depends on how complicated the boards are.

csammis
Aug 26, 2003

Mental Institution
OSH Park has maintained good fab and shipping speed too when last I ordered boards (April/May). Waiting months for a board seems fairly out of line.

Dominoes
Sep 20, 2007

Looking for wisdom on allowing you to switch between wall power, and batteries. From what I gather, the simplest soln is to wire a schottky diodes to each source, and put them in ∥ . The higher voltage wins, so this works if your wall voltage is higher than the battery. If not, you can use a mosfet to deal with it. Any wisdom on choosing the specific diode model?

I found this advertarticle describing an approach that uses a IC, which mitigates voltage spikes. I'd just roll with this, but it's dated 2002, and I'm wondering if there are any improvements in recent tech that would help.

Related: I'd like to use USB-C for power. From what I gather, assuming a standard phone charger, I can wire B9, A4, B4, and A9 to 5V power, and B1, A12, B12, and A1 to GND, and things should be good. (Ie outside 4 pins to gnd, next 4 in to 5V) Are there any fine points I'm missing? Thank you.

Dominoes fucked around with this message at 01:21 on Jun 7, 2020

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe
You should be sure you're comfortable with the voltage drop. You can always use a higher-current-rated diode than necessary to get the drop down but you'll still drop hundreds of millivolts. The premium solution is to use an ideal diode IC. The application you're looking for is called "diode-or" and the datasheets will include application schematics like this:



This will take up to 5A from either input and drop practically nothing, so your nice regulated 5V rail stays nice over temperature and load.

Dominoes
Sep 20, 2007

Thank you. I'll go with something like that. Simple, but not too simple. It looks like based on availability and price, the TI LM2113 or 2115 are what I'm looking for. From the datasheets, it looks like the main diff is the 113 has a 120mΩ switch , while the 115 has a 84mΩ switch. For powering a low-current IC, does it matter which I use?

I think this'll work:

Dominoes fucked around with this message at 03:56 on Jun 7, 2020

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
There's a single P-MOSFET and diode solution. Better / cheaper / easier

Dominoes
Sep 20, 2007

Nice.

Unrelated: Forseti - what luck have you had with the quick refreshes on the EPD? I'm running into trouble, mainly since the HAL drivers I'm using are rough / sparsely maintained, and I'm trying to patch them to work better and have a clearer API. Wondering if you've been using quick refreshes, and what your render workflow looks like. Using full refreshes is comparatively easy, but unsuitable for many applications.

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe

Dominoes posted:

Thank you. I'll go with something like that. Simple, but not too simple. It looks like based on availability and price, the TI LM2113 or 2115 are what I'm looking for. From the datasheets, it looks like the main diff is the 113 has a 120mΩ switch , while the 115 has a 84mΩ switch. For powering a low-current IC, does it matter which I use?

No. You're going to be drinking less than 100mA I'm sure. So you'll drop less than 10mV either way. A factor of 20 better than the a schottky diode.

ante posted:

There's a single P-MOSFET and diode solution. Better / cheaper / easier

I can't figure out what you're suggesting if the goal is to drop neither the battery nor the USB supply through a diode. That doesn't have to be the goal; ideal diode ICs are kind of baroque, but an ideal diode would at least need some sort of comparator.

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS

Stack Machine posted:

No. You're going to be drinking less than 100mA I'm sure. So you'll drop less than 10mV either way. A factor of 20 better than the a schottky diode.


I can't figure out what you're suggesting if the goal is to drop neither the battery nor the USB supply through a diode. That doesn't have to be the goal; ideal diode ICs are kind of baroque, but an ideal diode would at least need some sort of comparator.

https://electronics.stackexchange.com/questions/359490/p-channel-enhancement-mosfet-behaviour

https://electronics.stackexchange.com/questions/418090/advice-for-this-p-channel-mosfet-power-source-selector/418277

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe

Yes. This works if you don't mind the diode drop in Vusb and you are ok with potential damage to the circuit in the event of a brown-out of Vusb. Say it stays for a little while at a value less than Vbat but not low enough to turn the FET completely off so the FET starts to heat up... I think I like the classic diode OR better than this circuit.

mobby_6kl
Aug 9, 2009

by Fluffdaddy
So I spent half a day yesterday debugging the latest layout on the breadboard, which turns out didn't work because one of the pins I was using was input only, even though it's labeled "GPIO". Maybe that's a convention but kind of misleading if it doesn't the "O" part.

So let's give etching a try, how hard could it be?

Oh. Attempt 2

Attempt 3

Attempt 4

Final result


This took a few tries but it wasn't that difficult to get the transfer to work, now that I know which paper to use and that 50:50 water/acetone mix works better than pure acetone, I could do it in like 5 minutes and with no mess. Etching itself was just dropping it in a small tupperware container with warm ferric chloride for 10 minutes, letting it drip off and wiping on a paper towel. I didn't already have the sodium persulfate but thanks for the suggestion, maybe next time I'll give it a try. This was relatively painless though.

The results aren't quite as good as I hoped but also... better than I expected, really. I don't know if you can realistically get anything better from this method. The print was fine of course but the transfer has some issues and I had to spend about 20 minutes tracking down and fixing some shorts. It didn't help that I effectively reduced clearances by increasing pad size because I was worried I'd annihilate them with the drill. Oops. Another thing is that I definitely should've checked for shorts before etching, it'd be way easier to clean up some toner than to cut copper.


mobby_6kl posted:

Whoa I'm pretty sure I've seen SMT headers in the wild before but just didn't think about it until now. I'll definitely remember now if I ever need to diy another board
There's an exact SMT connector that I need on the board I was working with, and I literally posted a photo of it before lol :doh:



Even though I completely blanked on it, it wouldn't actually work on this board because I need it/the header on the other side.

mobby_6kl fucked around with this message at 08:54 on Jun 7, 2020

longview
Dec 25, 2006

heh.
For me the lack of plated through holes completely destroys any desire to etch my own boards. Using moderately quick turnaround services like OSHPark is much more convenient for me since I actually end up with a production quality board that I can often use after the first attempt.

Also my experience with old power supplies built without plated holes has shown me that it's a massive reliability issue, since the plated hole seems much stronger than only connecting on one side. So many bad solder joints...

Unrelated, I got bit by my first STM32 I2C issue today, not too long after the topic of I2C reliability came up in this very thread.
For some reason in my new design using a 103C8T the I2C controller would get stuck in the BUSY state on startup, and the HAL libraries can't handle this so all my accesses would fail.
Seems it's related to a startup issue, when accessed it would just generate a single start condition then fail.
Figured out that it would work reliably if I had the scope probe on the SDA line, so I just tacked a 10pF cap on the pullup for that line, and that seemed to fix it.

I've also implemented a check in the code now that attempts to reset the controller if it's stuck when the MCU starts (only situation I've seen), or if it were to get stuck later during normal operation (and if it can't reset it, reset the entire chip).

After designing with the STM32F103C8T again I'm realizing it's an ok device, but the STM32F303 is just so much nicer to work with (even the communications peripherals are better), and the STM32F030 is a better choice for my smaller designs.

Here's some pictures of the PCAs involved, it's an active receiving antenna with fiber optic output (I posted about the HF variant in the ham radio thread a few months ago, this is a higher frequency variant of the same design).

Logic board has the MCU (on the bottom layer), my ST-Link FFC connector in the bottom left.


RF board, the I2C controller with the issues talks to the AD5252 IC to the right to set AGC control voltages for the RF amplifier.

The two brass spacers in the middle are the RF input, they are just M2 brass spacers soldered into plated holes. I did make a small mistake here and had a lot of clearance for these holes, when it should have been exactly 2mm to center the spacers. Just a bit more fiddly to assemble since I had to visually align the spacers before soldering.

This is the second time I've made a 3-board stack, this time I decided to drill out some brass hex spacers and solder these to each board (on the corners). That way the board spacers are permanently attached to the boards. Then I cut up some M2 threaded rod and screw it down to the bottom board and tighten it with a nut from the top.
This is much more convenient since I can just stack the boards, then insert the rods and tighten, instead of attaching male-female threaded spacers for each board.
I guess you can buy solder-in spacers and nuts, but drat those are expensive compared to DIYing with normal spacers...

longview fucked around with this message at 09:42 on Jun 7, 2020

That Works
Jul 22, 2006

Every revolution evaporates and leaves behind only the slime of a new bureaucracy


I'm gonna crosspost this over in the Pi thread but since you all were so helpful getting this running I wanted to see if anyone had guidance on best practices to make a breadboard functioning circuit into a prototype.

Basically I have this motor controller and the Pi, and a separate set of jumpers not shown that connect to a 10k resistor and a temperature sensor.


In the future I will probably add another temperature sensor and a relay, to make a thermostat + heater for the water supply to keep it from freezing.

These are all going to go into a chicken coop and will be out of any wind / rain but will at least need to be covered and put together in a way that is sturdy / stable.

My plan was to put the Pi and motor controller into a 2-gang PVC electrical box with a solid cover on it and have wires going in-out from it via PVC conduit. What's a good way to connect all the GPIO pinned stuff to each component long-term?

mobby_6kl
Aug 9, 2009

by Fluffdaddy
One possibility could be to make a daughterboard/shield that would just plug directly onto the Pi headers and contain all the sensors/relays that you need, but this is probably more effort than it's worth.

What I've seen people do is just mount all the individual components on a piece of MDF or something, connect them together with more solid cables/connectors and just stick all of that in an box. This way you can still use all the relay and sensor modules without having to re-invent anything.

longview posted:

For me the lack of plated through holes completely destroys any desire to etch my own boards. Using moderately quick turnaround services like OSHPark is much more convenient for me since I actually end up with a production quality board that I can often use after the first attempt.

Also my experience with old power supplies built without plated holes has shown me that it's a massive reliability issue, since the plated hole seems much stronger than only connecting on one side. So many bad solder joints...
...
Well this was overall not too bad but definitely not worth the effort for more than a board or two. You have to spend a lot of time checking everything and the results aren't exactly professional grade.

I ended up destroying one through hole pad when drilling, it just came off when I pulled the bit out. Not a big deal though it was't hooked up to anything on the pcb. Much worse though is that there's a bridge between the VCC and GND pins on the ESP. Goddamn. No amount of wicking and scraping seems to get rid of it, and I can't get it off completely either.

mobby_6kl fucked around with this message at 13:44 on Jun 7, 2020

Forseti
May 26, 2001
To the lovenasium!

Dominoes posted:

Unrelated: Forseti - what luck have you had with the quick refreshes on the EPD? I'm running into trouble, mainly since the HAL drivers I'm using are rough / sparsely maintained, and I'm trying to patch them to work better and have a clearer API. Wondering if you've been using quick refreshes, and what your render workflow looks like. Using full refreshes is comparatively easy, but unsuitable for many applications.

I haven't actually messed with it yet to be honest, I ordered some F1C200s SoCs I intended to use with it from aliexpress that "Left the country" on May 8 according to the tracking... we'll see I guess.

mobby_6kl posted:

So I spent half a day yesterday debugging the latest layout on the breadboard, which turns out didn't work because one of the pins I was using was input only, even though it's labeled "GPIO". Maybe that's a convention but kind of misleading if it doesn't the "O" part.

Dry film photoresist works about 1 million times better than toner transfer in my experience. Basically print your design backwards on a piece of vellum paper (or tracing paper but vellum is easier to print on), lay it on the board with photoresist applied, and hit it with a UV light to cure it. Definitely more of a process but much more consistent once you get the hang of it and I never even got close to the results I can get with photoresist whenever I've tried toner transfer.

Only registered members can see post attachments!

ynohtna
Feb 16, 2007

backwoods compatible
Illegal Hen
Mmm, that sure is one good looking PCB. :kiss:

Forseti
May 26, 2001
To the lovenasium!
Thanks! Not gonna pretend there weren't plenty of screwed up ones dialing it in but I've got it pretty consistent now. I should really make a video/blog post on it.

Also looking at that again reminds me how much fun it was to do the routing (serious). Single sided boards are like a puzzle game, so satisfying to figure it out!

Dominoes
Sep 20, 2007

Stack Machine posted:

No. You're going to be drinking less than 100mA I'm sure. So you'll drop less than 10mV either way. A factor of 20 better than the a schottky diode.
Appreciate it. Now that I think about it, both sources feed into a voltage reg anyway, so this may be a moot pt.

Forseti posted:

I haven't actually messed with it yet to be honest, I ordered some F1C200s SoCs I intended to use with it from aliexpress that "Left the country" on May 8 according to the tracking... we'll see I guess.
That's so frustrating. Weird how sometimes you get the item in a week, others it hangs indefinitely.

Forseti
May 26, 2001
To the lovenasium!
Yeah, I have no frame of reference either. It's the first time I've ever ordered from AliExpress, everything else I've ever considered getting from there I found on eBay for not much more and often with the option to buy one that was already in the US. The only f1c200s on eBay is $7.20 for one and still coming from China :(. The ones I ordered were ~13 for 5 pcs.

As long as they get here eventually it's whatever, but it is annoying.

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe

Dominoes posted:

Appreciate it. Now that I think about it, both sources feed into a voltage reg anyway, so this may be a moot pt.

Absolutely is. Ideal diodes are great when they're necessary but as long as your regulator is getting enough Vin an extra few hundred mV isn't going to hurt. If you need a little less drop, also remember you can use a schottky barrier diode (e.g. 1n5817) in your circuit.

Dominoes
Sep 20, 2007

Sweet. I think i'll just switch to a pair of schottkys. Thanks for the specific model rec; that helps. Would something like this also work? Going based on what's avail at the suppliers I'm using.

Dominoes fucked around with this message at 18:00 on Jun 7, 2020

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe

Dominoes posted:

Sweet. I think i'll just switch to a pair of schottkys. Thanks for the specific model rec; that helps. Would something like this also work? Going based on what's avail at the suppliers I'm using.

That'll work. Those are surface mount versions of the 1n581x series. Def opt for those unless you have a specific reason to prefer through-hole.

Shame Boy
Mar 2, 2010

Forseti posted:

I haven't actually messed with it yet to be honest, I ordered some F1C200s SoCs I intended to use with it from aliexpress that "Left the country" on May 8 according to the tracking... we'll see I guess.


Dry film photoresist works about 1 million times better than toner transfer in my experience. Basically print your design backwards on a piece of vellum paper (or tracing paper but vellum is easier to print on), lay it on the board with photoresist applied, and hit it with a UV light to cure it. Definitely more of a process but much more consistent once you get the hang of it and I never even got close to the results I can get with photoresist whenever I've tried toner transfer.



I have never ever gotten UV to work despite many attempts, while toner transfer works for me every time and has since the very first time I tried it :shrug:

I think I must be applying the film wrong, though I've tried lots of different ways including bigclive's trick of misting the board with a tiny amount of water first. I always wind up with some area that didn't adhere to the board right, or some dust got in there despite all my efforts, or the film didn't cure right in one place or over-cured in another place or aagh.

e: Clicking through to your link, that's literally the photoresist I bought too lmao

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
I did the phototransfer method, when I was doing it. Buying presensitized boards was the way to go though. No way to keep good consistency if you're doing your own photoresist coating

Dominoes
Sep 20, 2007

Stack Machine posted:

That'll work. Those are surface mount versions of the 1n581x series. Def opt for those unless you have a specific reason to prefer through-hole.
Done. I love how every IC you remove from the board takes several res/caps with it. This two-diode setup is simpler.

Dominoes
Sep 20, 2007

Got another. What do you connect fork/spade connectors to? I'm attempting to make something that accepts either bare wires, or spade terminals, since they're both common for the sensor I'm trying to connect. From what I can gather, spade connectors are an easy way to deal with screw terminals, but I'm having a remarkably difficult time finding terminals that work. Searching 'spade terminal', or 'fork terminal' doesn't work, and 'screw terminals' seem to mainly have recessed screws and small openings for bare wires.

eg:


I found this on a Youtube vide;

But not sure how to find those. 'Screw terminal' mainly refers to the small green ones with recessed screws.

Dominoes fucked around with this message at 00:46 on Jun 8, 2020

KnifeWrench
May 25, 2007

Practical and safe.

Bleak Gremlin

Dominoes posted:

Got another. What do you connect fork/spade connectors to? I'm attempting to make something that accepts either bare wires, or spade terminals, since they're both common for the sensor I'm trying to connect. From what I can gather, spade connectors are an easy way to deal with screw terminals, but I'm having a remarkably difficult time finding terminals that work. Searching 'spade terminal', or 'fork terminal' doesn't work, and 'screw terminals' seem to mainly have recessed screws and small openings for bare wires.

eg:


I found this on a Youtube vide;

But not sure how to find those. 'Screw terminal' mainly refers to the small green ones with recessed screws.

I'm having some luck finding the screws themselves with terms like

"captive washer screw terminal"

"square washer screw terminal"

Maybe that can help you find the right path?

Asleep Style
Oct 20, 2010

Are there any good resources for babbys first pcb? I'm building some speakers and feel like I might as well make a pcb for the crossover instead of slapping stuff down on perfboard or scrap wood. I have an EE degree but have only worked professionally in substation design and software development, so I've been removed from electronics for a while. Anywhere I can find info on trace sizing, hole sizing, and pad sizing would be great. Unfortunately I no longer work at a place with all of the IEEE standards available for free, but I'm happy to work off a draft standard or blog post.

It looks like I can't really go wrong with KiCAD for the design and OSH Park for the fab house, but I'm happy to hear opinions about those too.

poeticoddity
Jan 14, 2007
"How nice - to feel nothing and still get full credit for being alive." - Kurt Vonnegut Jr. - Slaughterhouse Five

Asleep Style posted:

Are there any good resources for babbys first pcb? I'm building some speakers and feel like I might as well make a pcb for the crossover instead of slapping stuff down on perfboard or scrap wood. I have an EE degree but have only worked professionally in substation design and software development, so I've been removed from electronics for a while. Anywhere I can find info on trace sizing, hole sizing, and pad sizing would be great. Unfortunately I no longer work at a place with all of the IEEE standards available for free, but I'm happy to work off a draft standard or blog post.

It looks like I can't really go wrong with KiCAD for the design and OSH Park for the fab house, but I'm happy to hear opinions about those too.

I've used KiCAD for all of my board designs, and for anything I wasn't etching myself, I've gone with OSH Park.
There are substantially cheaper options than OSH Park, but they have great customer service and a good balance between turn-around time (normally; I can't speak to right now) and price.
They've also got a spin-off company, OSH Stencils, that makes some fantastic stencils if you're doing any SMT stuff that warrants reflow soldering.

Asleep Style
Oct 20, 2010

poeticoddity posted:

I've used KiCAD for all of my board designs, and for anything I wasn't etching myself, I've gone with OSH Park.
There are substantially cheaper options than OSH Park, but they have great customer service and a good balance between turn-around time (normally; I can't speak to right now) and price.
They've also got a spin-off company, OSH Stencils, that makes some fantastic stencils if you're doing any SMT stuff that warrants reflow soldering.

Good to know I'm on the right track there. Fortunately these are all large through hole components

e: unfortunately for board price lol

Asleep Style fucked around with this message at 01:35 on Jun 8, 2020

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
pcbshopper.com for all the large boards

Forseti
May 26, 2001
To the lovenasium!
The board fab should tell you what the limits are on what they can do (e.g. minimum trace size, clearance, etc) and other than that the defaults on KiCAD seem to be fine to me. There are online calculators out there for figuring out the resistance for a given trace size and copper weight that you can use. Other than that I'd say the magic words to search is something like "PCB best practices" to get some general guidelines like this article from EDN, 10 best practices of PCB design.

I have only used JLC PCB myself but it was a couple of weeks ago and they were great. I ordered two designs (open source from the MiSTer project), one 2 sided and one 4 layer, 5x each, and it took 8 days (5/13 ordered to 5/20 delivered) to get to my doorstep in Houston. I got the DHL shipping, I think it's a lot longer and more variable if you take the cheaper shipping. Cost was ~$37 in total. I'm very pleased with them and while I didn't have to actually contact them I get the impression that they put in a lot of work to make it an easy process.

I've heard good things about PCB Way (and OSH Park also who have been serving the hacker scene for a pretty long time I believe) as well. PCB Way has FlexPCBs which is cool but I think you have to order a pretty high volume. OSH Park by my understanding tends to do more premium work but are a good bit more expensive. They also do flexible PCBs.

Dominoes
Sep 20, 2007

In the top reply on this reddit thread, the owner of OSHpark comments on JLC: He speculates that they're selling below cost to eliminate competition, and notes that the HASL finish on the JLC boards isn't great. If you upgrade to the nicer finish that OSH uses, the JLC price shoots way up. And JLC uses tricks to keep tolerances loose, which may be a problem if your board has closely spaced things. Their boards aren't very heat tolerant, which may or may not be a factor depending on how you're soldering.

If that doesn't bother you, JLC is the most cost effective option, especially for small runs. For my purposes, none of those downsides to JLC are dealbreakers, or enough to justify the higher cost elsewhere.

Dominoes fucked around with this message at 02:12 on Jun 8, 2020

Dominoes
Sep 20, 2007

KnifeWrench posted:

I'm having some luck finding the screws themselves with terms like

"captive washer screw terminal"

"square washer screw terminal"

Maybe that can help you find the right path?
Appreciate it. Diving in, although this isn't bringing anything up on Digikey.

edit: Uh... I have some of the standard green screw terminals, and the forks fit if you double them up... Ie one prong per temrinal / 2 terminals per connection. 5mm spacing.

Dominoes fucked around with this message at 02:30 on Jun 8, 2020

shovelbum
Oct 21, 2010

Fun Shoe
Lol I fried an esp8266 whoops

Dominoes
Sep 20, 2007

What'd you do?

Forseti
May 26, 2001
To the lovenasium!
The ESP-12F module doesn't like it when you hook the power up backwards. Not that I would know because I did that or anything...

Dominoes
Sep 20, 2007

Electricity's electricity right? I don't see what your friend did wrong.

Adbot
ADBOT LOVES YOU

TacoHavoc
Dec 31, 2007
It's taco-y and havoc-y...at the same time!

Dominoes posted:

Appreciate it. Diving in, although this isn't bringing anything up on Digikey.

edit: Uh... I have some of the standard green screw terminals, and the forks fit if you double them up... Ie one prong per temrinal / 2 terminals per connection. 5mm spacing.

Use "Barrier Strips", although there's a few different types. Like this for example I've used on control panels for pump and thermostat wiring in the past:

https://www.te.com/usa-en/product-5-1437646-4.html

They are available in different pitches, that may be bigger than what you need.

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