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
Shame Boy
Mar 2, 2010

One Legged Ninja posted:

Oops, no, I was phone posting with a baby on the other arm and pasted the wrong link.

Here's the right link.

Yeah ok that makes more sense :v: Anyway thanks!

Adbot
ADBOT LOVES YOU

ryanrs
Jul 12, 2011


:hmmyes:


Fanged wormy, this is why you need the vclamp and brake resistor.

Bad Munki
Nov 4, 2008

We're all mad here.


Maybe a silly question or two:

1) On an electrolytic cap, generally the anode is marked on the can with a stripe of color down that side or similar. On a PCB, generally the cathode is marked on the silkscreen with a dot or a + or similar. Like, generally, or as tradition or the baseline norm. Do I have that right, or am I confused?

2) If my understanding is correct, does that not bug the hell out of everyone?!

Shame Boy
Mar 2, 2010

Bad Munki posted:

Maybe a silly question or two:

1) On an electrolytic cap, generally the anode is marked on the can with a stripe of color down that side or similar. On a PCB, generally the cathode is marked on the silkscreen with a dot or a + or similar. Like, generally, or as tradition or the baseline norm. Do I have that right, or am I confused?

2) If my understanding is correct, does that not bug the hell out of everyone?!

I think you got the words backwards, electrolytic caps have the cathode marked, and on PCB's it's up to whatever footprint library you're using. Like in KiCad they look like this:



Where the cathode is filled in completely to match the stripe on the can, and there's a smaller + to indicate the anode.

Bad Munki
Nov 4, 2008

We're all mad here.


Anode is the negative pole and cathode is the positive, yeah? And the stripe down the side of the can, sometimes filled with dashes, is the negative side, so that'd be the anode marked on the cap, wouldn't it?

I hadn't seen a footprint with half the circle filled in like that so it matches the can. That's what I'd like, and will probably do that. The footprints I saw all just had a dot or a + on the positive terminal, which is opposite the markings on the can.

But maybe as you said I have the anode/cathode thing mixed up in my head because, uhh, capacitors. I dunno.

e: Okay, yeah, I've got my capacitor anode/cathode terms mixed up. Nonetheless, the negative pole on the cap is marked, and all the footprints I'd seen marked the positive pole, and it makes no dang sense! I'll do the one-side-filled thing for my silkscreen.

Bad Munki fucked around with this message at 22:47 on Jan 26, 2024

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
1) Yes (other than aforementioned reversal)
2) No, not even a little



I guess I hadn't considered it before, because that's not how my mental model of the components works.

The line on the cap is a big negative (-), or ground. That makes sense to me.


A big (+) is marked on the board. That makes sense to me as well


I don't equate the two as being related to each other, I just know the orientation that each mark is telling me and internalise it without really seeing it

kid sinister
Nov 16, 2002

Bad Munki posted:


e: Okay, yeah, I've got my capacitor anode/cathode terms mixed up. Nonetheless, the negative pole on the cap is marked, and all the footprints I'd seen marked the positive pole, and it makes no dang sense! I'll do the one-side-filled thing for my silkscreen.

This is right. Cathode is where electrons come from. Electron flow is opposite of conventional flow. The way I remember it is thinking of old CRTs. They had an electron gun shooting electrons at the screen, the cathode ray.

Shame Boy
Mar 2, 2010

ante posted:

I don't equate the two as being related to each other, I just know the orientation that each mark is telling me and internalise it without really seeing it

All the footprints I use have that big fill for the negative and I guess I've always mentally gone "oh the bit that's got the big ink fill needs to match the big ink fill on the cap [the stripe, or on SMD ones literally a visually similar fill on the top]"


kid sinister posted:

This is right. Cathode is where electrons come from. Electron flow is opposite of conventional flow. The way I remember it is thinking of old CRTs. They had an electron gun shooting electrons at the screen, the cathode ray.

I just remember "electrons Arrive at the Anode" because they both start with A

Shame Boy
Mar 2, 2010

I guess "Conventional Current is Collected by the Cathode" might work too if you don't wanna have to remember to flip it from electron current to conventional

ryanrs
Jul 12, 2011

ante posted:

The line on the cap is a big negative (-), or ground. That makes sense to me.

Except for tantalum caps, where the line means positive.

Splode
Jun 18, 2013

put some clothes on you little freak
I'd never thought about this before, but you're right it's not that intuitive. Something I'll have to keep in mind when training people up in future.

It is at least consistent with diodes, which also generally mark the cathode on the part - though usually the footprint has a mark on the cathode too

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS

ryanrs posted:

Except for tantalum caps, where the line means positive.

Yeeeeeah


You know there's a backwards tantalum up on the International Space Station?

There were many meetings with the cap manufacturer to discuss whether it needed to be replaced.
The conclusion was that it's really really overspecced, so it should be okay

kid sinister
Nov 16, 2002

ante posted:

Yeeeeeah


You know there's a backwards tantalum up on the International Space Station?

There were many meetings with the cap manufacturer to discuss whether it needed to be replaced.
The conclusion was that it's really really overspecced, so it should be okay

Don't tantalums catch fire if they're backwards?

ryanrs
Jul 12, 2011

If it's in space, it's probably a hermetically sealed tantalum, which is a much more expensive capacitor than the molded tantalums you're used to.

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
Tantalum polymer, which are very well behaved, unlike the original formula

Bad Munki
Nov 4, 2008

We're all mad here.


Okay, well, that all makes me feel a bit better about it. And now my footprint looks like this, which seems way more explicit and helpful:



And in practice:



(never you mind that diode in the background)

Ne Cede Malis
Aug 30, 2008

Bad Munki posted:

Okay, well, that all makes me feel a bit better about it. And now my footprint looks like this, which seems way more explicit and helpful:



And in practice:



(never you mind that diode in the background)

Don’t worry, the fabricator will still install it backwards 😀

Bad Munki
Nov 4, 2008

We're all mad here.


Ne Cede Malis posted:

Don’t worry, the fabricator will still install it backwards 😀

Well the fabricator is me, soooooo


There, fixed the diode, too.



Mostly just trying to sort these things out in order to Do It Right™ for the sake of learning.

Bad Munki
Nov 4, 2008

We're all mad here.


Is there a way in Kicad to tell it that two pins on a symbol are on the same net? In this case, I have a header for an RPi on my board, and there's pad out there on my board that is supposed to be on the 3v3 net. I have it hooked up to one of the 3v3 pads, but Kicad is still showing a line on the ratsnest to the other 3v3 pin. I want it to accept a connection to either as counting.



I can't see any way to just define a pin as being on a net, like, internally to the symbol.

Bad Munki fucked around with this message at 05:16 on Jan 27, 2024

Ne Cede Malis
Aug 30, 2008

Bad Munki posted:

Well the fabricator is me, soooooo

Don't worry the statement is still true :smugbert:


Bad Munki posted:

Is there a way in Kicad to tell it that two pins on a symbol are on the same net? In this case, I have a header for an RPi on my board, and there's pad out there on my board that is supposed to be on the 3v3 net. I have it hooked up to one of the 3v3 pads, but Kicad is still showing a line on the ratsnest to the other 3v3 pin. I want it to accept a connection to either as counting.



I can't see any way to just define a pin as being on a net, like, internally to the symbol.

In Altium the term is is "Jumper" or "air wire" to denote that the two nets are connected via an external mechanical item not modeled in EECAD. If you're fabricating/assembling this board yourself, and you know that this will be soldered onto something so that netlist is true, you can ignore it.

Bad Munki
Nov 4, 2008

We're all mad here.


Ne Cede Malis posted:

If you're fabricating/assembling this board yourself, and you know that this will be soldered onto something so that netlist is true, you can ignore it.

Yes but it bugs me :mad:

Skinnymansbeerbelly
Apr 1, 2010
I'm thinking of setting up a ratgdo for my ancient-rear end dry contact garage door opener, but it's been way too long since I electroniced. I'm looking at tapping in to the already existing limit switches on my garage door, and measured 8 volts DC between contact and rail. This is what I'm looking for, right?

E: "Other precautions This Relay is a Power Relay which is suitable for power load switching. Do not use the G6C for signal purposes such as micro load switching under 10 mA" OK. What the hell am I looking for, then?

Skinnymansbeerbelly fucked around with this message at 05:55 on Jan 27, 2024

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS

Bad Munki posted:

Is there a way in Kicad to tell it that two pins on a symbol are on the same net? In this case, I have a header for an RPi on my board, and there's pad out there on my board that is supposed to be on the 3v3 net. I have it hooked up to one of the 3v3 pads, but Kicad is still showing a line on the ratsnest to the other 3v3 pin. I want it to accept a connection to either as counting.



I can't see any way to just define a pin as being on a net, like, internally to the symbol.

I think net ties exist in kicad. But just connect them

Bad Munki
Nov 4, 2008

We're all mad here.


rev2 ready to go, wish me luck, hopefully I didn't flub any polarity or what have you but for the two parts where that's even a chance, I can install them either way, so no harm done if the silkscreen is wrong.



ante posted:

I think net ties exist in kicad. But just connect them

You mean run a trace across the board? That doesn't seem like a good solution, they're both getting supplied the 3v3 from those pins on the Pi, that just creates a needless trace to complicate the layout and also makes a loop of unknown provenance, which just feels wrong?

ryanrs
Jul 12, 2011

Skinnymansbeerbelly posted:

I'm thinking of setting up a ratgdo for my ancient-rear end dry contact garage door opener, but it's been way too long since I electroniced. I'm looking at tapping in to the already existing limit switches on my garage door, and measured 8 volts DC between contact and rail. This is what I'm looking for, right?

E: "Other precautions This Relay is a Power Relay which is suitable for power load switching. Do not use the G6C for signal purposes such as micro load switching under 10 mA" OK. What the hell am I looking for, then?

It means the relay contacts are silver oxide (power) instead of gold (small signal). If you are switching <1 mA signals, the silver oxide contacts will not be as reliable, not meet the resistance specs, etc, because the silver contacts want a bit of a spark when switching.

Real talk: you should completely ignore this detail. It'll be fine.

e: above applies only to relay contacts. I dunno what relay you should actually be using for compatibility with your garage door, but an 8V coil sounds pretty weird.

ryanrs fucked around with this message at 07:21 on Jan 27, 2024

karoshi
Nov 4, 2008

"Can somebody mspaint eyes on the steaming packages? TIA" yeah well fuck you too buddy, this is the best you're gonna get. Is this even "work-safe"? Let's find out!

Bad Munki posted:

Is there a way in Kicad to tell it that two pins on a symbol are on the same net? In this case, I have a header for an RPi on my board, and there's pad out there on my board that is supposed to be on the 3v3 net. I have it hooked up to one of the 3v3 pads, but Kicad is still showing a line on the ratsnest to the other 3v3 pin. I want it to accept a connection to either as counting.



I can't see any way to just define a pin as being on a net, like, internally to the symbol.

From the source:

sch_symbol.cpp posted:

// Some people like to stack pins on top of each other in a symbol to indicate
// internal connection. While technically connected, it is not particularly useful
// to display them that way, so skip any pins that are in the same symbol as this
// one.

Skinnymansbeerbelly
Apr 1, 2010
On further consideration, I think using something like an INA3221 to monitor the (8V, ~1mA) garage door limit switch circuits and blatting that to the microcontroller is the way to go. But I have read the manual front to back and I haven't found the answer to my question: does this thing keep the circuit closed when the sensor is unpowered? That would be necessary for this application.

babyeatingpsychopath
Oct 28, 2000
Forum Veteran


Skinnymansbeerbelly posted:

On further consideration, I think using something like an INA3221 to monitor the (8V, ~1mA) garage door limit switch circuits and blatting that to the microcontroller is the way to go. But I have read the manual front to back and I haven't found the answer to my question: does this thing keep the circuit closed when the sensor is unpowered? That would be necessary for this application.

Which ancient-rear end dry contact garage door opener do you have? I would presume the ratgdo would play well with the switches as they sit, since that's what it was designed for: to be a drop-in thingy for old-rear end openers.

Dia de Pikachutos
Nov 8, 2012

When I'm wiring up an N-channel mosfet to be switched by a logic input from a microcontroller, where should I locate the gate discharge resistor relative to the gate current-limiting resistor?

After:


or before?

ShoulderDaemon
Oct 9, 2003
support goon fund
Taco Defender

Dia de Pikachutos posted:

When I'm wiring up an N-channel mosfet to be switched by a logic input from a microcontroller, where should I locate the gate discharge resistor relative to the gate current-limiting resistor?

It matters very little, but option 2 ("before") is probably better. Option 1 makes a voltage divider at the gate, which means you can't drive the gate with a full 5V, only 4.high or whatever. If you're using the FET as a switch, then this isn't actually something that's going to matter, but if you were trying to operate in the linear region or something you'd care.

AlternateNu
May 5, 2005

ドーナツダメ!

Dia de Pikachutos posted:

When I'm wiring up an N-channel mosfet to be switched by a logic input from a microcontroller, where should I locate the gate discharge resistor relative to the gate current-limiting resistor?

After:


or before?


This may be a dumb question, but where are the capacitors in the circuit?

Dia de Pikachutos
Nov 8, 2012

Based on my monkey-see monkey-do knowledge of electronics, a mosfet is basically like a tiny capacitor that lets current flow from source to drain when it's charged

e: probably

ShoulderDaemon
Oct 9, 2003
support goon fund
Taco Defender

AlternateNu posted:

This may be a dumb question, but where are the capacitors in the circuit?

The model MOSFET has a capacitor between gate and source. In a big beefy discrete power FET like the 2905 in Dia de Pikachutos' circuit the capacitance of that might be 1 to 2 nF - enough that it'll generate small but measurable spikes if you're looking at a scope, and if you didn't provide enough bypass capacity on the driver then there is a slim chance you could cause power glitches. So you put a resistor in series with the gate to limit the switching current. Honestly, 270ohm is a lot smaller than I'd expect - typically I see 1K or 10K in that position - but I mostly only ever look at very low speed circuits which are not at all sensitive to switching time - higher gate current means faster switching. Many circuits will omit this resistor entirely and just count on having enough bypass caps to cushion the power rails from the glitch, and let the driver push the FET as fast as it can.

The discharge resistor matters even less, as long as it's sufficiently higher than the current-limiting resistor. It's just there so that if you float the output it goes somewhere reasonable instead of letting the FET float into its linear region. It is extremely common to omit this resistor entirely and just assume the driver will never go into a high-impedance state, but if you're driving from a microcontroller then there's probably a nontrivial period of time at startup when you haven't yet configured the port but your power rails are live, so it's not a bad idea, especially if you're driving a big power-hungry load and you really don't want to risk the FET sitting in linear mode - the failure case here is that your load is damaged by being undervolted and/or the FET is damaged by heating up because you didn't design an adequate heatsink for use as an impromptu linear regulator.

Shame Boy
Mar 2, 2010

Dia de Pikachutos posted:

Based on my monkey-see monkey-do knowledge of electronics, a mosfet is basically like a tiny capacitor that lets current flow from source to drain when it's charged

e: probably

Like some kind of transistor... where the electric field... causes the effect...

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe

Dia de Pikachutos posted:

When I'm wiring up an N-channel mosfet to be switched by a logic input from a microcontroller, where should I locate the gate discharge resistor relative to the gate current-limiting resistor?

After:


or before?


"Before".

The "after" one there will decrease the gate voltage when the MOSFET is on by a couple of percent, and that will increase the on resistance of the MOSFET for no benefit. There are good reasons to put either or both of these resistors in sometimes, but just in case you weren't sure, you can absolutely just connect the MOSFET gate straight to the microcontroller pin unless you have a good reason not to.

Dia de Pikachutos
Nov 8, 2012

ShoulderDaemon posted:

In a big beefy discrete power FET like the 2905 in Dia de Pikachutos' circuit the capacitance of that might be 1 to 2 nF
My limited understanding was that gate capacitance mostly impacted switching times - does mosfet discharge back into the microcontroller when it switches or something? My actual application will probably end up using IRLR8726's because I got a handful of them from a friend. Not sure where they fall on the beefiness spectrum.

Stack Machine posted:

you can absolutely just connect the MOSFET gate straight to the microcontroller pin unless you have a good reason not to.
I mostly included the gate resistor to limit the amount of current the gate draws to avoid burning out the GPIO pin, because I have burned out a lot of GPIO pins previously!

Dia de Pikachutos fucked around with this message at 03:45 on Jan 29, 2024

Shame Boy
Mar 2, 2010

Dia de Pikachutos posted:

I mostly included the gate resistor to limit the amount of current the gate draws to avoid burning out the GPIO pin. Would the mosfet discharge back into the microcontroller when it switches or something?

The microcontroller will need to sink the current that it previously sourced when it turns the FET off because yeah it does more or less just act like a capacitor like you figured. The reason I usually see resistors going to FET gates like that is to counteract ringing, since if the trace is long enough to have a decent amount of inductance you've basically made an LC circuit with the capacitance of the gate and if you slam that from 0 to +V as hard as the microcontroller can switch, the resulting waveform at the gate (and therefore how the transistor actually switches) is going to be real ugly. However I don't really use enormous FET's that often so maybe they do run the risk of burning out microcontroller pins if they have enough capacitance, idk.

ShoulderDaemon
Oct 9, 2003
support goon fund
Taco Defender

Dia de Pikachutos posted:

I mostly included the gate resistor to limit the amount of current the gate draws to avoid burning out the GPIO pin. Would the mosfet discharge back into the microcontroller when it switches or something?

Yeah, your uC can both source and sink current through GPIO pins unless they're specifically labeled as open collector or something. You don't need an external pulldown unless you care about the state of that output during startup, programming, or other periods when you don't have software control of the pin.

And you aren't gonna burn out a GPIO driver by driving a FET gate unless the FET is, like, measured in inches. Your potential failure is that you pull enough current to cause a momentary brownout. Most uCs will have internal current limiters that make that impossible if you followed the guidelines for bypass capacitors. Other than that, all you're doing is slowing down the edge a little bit, which will serve to reduce RF noise and maybe avoid some ripple in your power rails if you're sensitive to that.

Modern uCs are extremely forgiving and while that is a power FET, it's not a big enough power FET to warrant any particularly careful handling in your design.

Dia de Pikachutos
Nov 8, 2012

Thank you both, I hadn't really thought about where the charge in the transistor went when it got switched off.

What sort of frequencies would ringing become an issue? At most I'm only going to be switching maybe 3-5A total at whatever the PWM frequency on the nano is (like 500hz or something), which doesn't seem terribly high speed?

Dia de Pikachutos fucked around with this message at 03:58 on Jan 29, 2024

Adbot
ADBOT LOVES YOU

Shame Boy
Mar 2, 2010

Dia de Pikachutos posted:

What sort of frequencies would ringing become an issue? At most I'm only going to be switching maybe 3-5A total at whatever the PWM frequency on the nano is (like 500hz or something), which doesn't seem terribly high speed?

Depends on how far away the transistor is from the micro and a bunch of other stuff. I usually just add a zero-ohm resistor in series with anything that even vaguely seems like it might be a problem, so I can put in some resistance later if I need to, rather than trying to figure it all out ahead of time :shrug:

e: And the ringing generally isn't an issue with overall frequency but with rise/fall times, to be clear

e2: And the fact that you already seem to be planning to use a series resistor there means it's not a problem under any circumstances either :v:

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