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.
 
  • Locked thread
Sagebrush
Feb 26, 2012

spam spam spam

hobbesmaster posted:

you have a good scope. calculate the time constant and use your good dmm to measure the resistor

i did this and it's fuckin' great



100nF capacitor reads as 72-84nF when repeatedly tested. badass

i know it's p basic stuff from an electronics standpoint but having the scope has been like...such a huge change in what I can do. like my old analog scope still does what it does, but it's a lot bigger pain for stuff like this -- I'd have to build an oscillator and make measurements on the graticule and blah blah blah. i've been screwing around with electronics since i was 7 years old at science camp, and over the years there have been these moments when it was like a huge step forwards in capability, another level opening up -- when i got my first decent multimeter (age 12), when i got a good soldering station (age 16), when i built my first arduino from a kit (age 20), and this is another one. i'm super stoked by all that this tool has suddenly enabled.

Adbot
ADBOT LOVES YOU

hifi
Jul 25, 2012

drat i never had any of that

do people poo poo on the dinky handheld lcr meters like they do with transistor testers

longview
Dec 25, 2006

heh.
congratulations sagebrush, i've never tried doing the whole import waveform into ltspice and simulate thing. might have to do find an excuse now!

hifi posted:

drat i never had any of that

do people poo poo on the dinky handheld lcr meters like they do with transistor testers

i never got why transistor testers get so much poo poo, back when they were common it was also fairly common to have to match transistors when replacing parts....

but what i'd expect to be missing in more affordable LCR meters:
* shielding provisions, unlikely to come with shielded leads
* 4-wire sensing
* higher test frequencies
* may not tell you ESR

cheaper meters usually won't do measurements on very small (sub nF or uH) components with any kind of accuracy or repeatability since there's so much stray reactance in the leads.
they also tend to only use up to 1 kHz test frequency to measure while higher end models will do 100 kHz (super fancy ones will do 10 MHz, basically they turn into beautiful vector network analyzers if you throw enough money at them)

in particular it's hard to measure small inductors with cheap meters

i use a set of Smart Tweezers ST5S, they're pretty good

Poopernickel
Oct 28, 2005

electricity bad
Fun Shoe

Sagebrush posted:

spam spam spam


i did this and it's fuckin' great



100nF capacitor reads as 72-84nF when repeatedly tested. badass

i know it's p basic stuff from an electronics standpoint but having the scope has been like...such a huge change in what I can do. like my old analog scope still does what it does, but it's a lot bigger pain for stuff like this -- I'd have to build an oscillator and make measurements on the graticule and blah blah blah. i've been screwing around with electronics since i was 7 years old at science camp, and over the years there have been these moments when it was like a huge step forwards in capability, another level opening up -- when i got my first decent multimeter (age 12), when i got a good soldering station (age 16), when i built my first arduino from a kit (age 20), and this is another one. i'm super stoked by all that this tool has suddenly enabled.

For super heap big fun, try measuring your capacitance as a function of bias voltage :science:

for some kinds of caps, you can get down below half of the nominal capacitance as you get close to the rated voltage of the part.

a 2.2uF/4V Y5V capacitor? On a 3.3V rail it's probably more like 1uF

Poopernickel fucked around with this message at 17:38 on Jun 4, 2017

Sagebrush
Feb 26, 2012

i assume that's cause of leakage or tunneling or something as it gets closer to the breakdown voltage of the dielectric?

Poopernickel
Oct 28, 2005

electricity bad
Fun Shoe

Sagebrush posted:

i assume that's cause of leakage or tunneling or something as it gets closer to the breakdown voltage of the dielectric?

couldn't tell you why - I love circuit design but have approximately 0% interest in the physics/chemistry aspects

I do love how p. much all actual capacitors are drastically different than the 'ideal' capacitor, in surprising ways - voltage-dependance capacitance and temperature-dependent capacitance are just the tip of the fuckin iceberg

Stabby McDamage
Dec 11, 2005

Doctor Rope
I just got caught up on this thread, and all the scopechat reminded me of this:

Bloody
Mar 3, 2013

caps are full of lies and are trash

gonadic io
Feb 16, 2011

>>=

Bloody posted:

caps are full of lies and are trash

ACAB

BobHoward
Feb 13, 2012

The only thing white people deserve is a bullet to their empty skull

Bloody posted:

caps are full of lies and are trash

you're computers memory is caps

checks out

longview
Dec 25, 2006

heh.
i never checked it out but i've suspected it follows a constant energy curve for the more ridiculous C-V combinations (like my favourite 10µF 50V 1210 capacitor, drops down to nothing before 20V)

i built a RIAA using ceramic capacitors in the low level filter section last year, as expected it also works a microphone. i just screwed it into my rack setup so it doesn't vibrate enough to cause audible noise.

"100nF 50V 0603" is still better than "1µH inductor, 1210" as a part specification

Woolwich Bagnet
Apr 27, 2003



modeling stuff and having it work is awesome. i used multisim (based off ltspice) to model a 1-3 kV current monitor in the n-uA range and the model was surprisingly close to the real circuit I built.

i should probably get a real scope at some point but in the mean time i've been using this http://store.digilentinc.com/analog-discovery-2-100msps-usb-oscilloscope-logic-analyzer-and-variable-power-supply/ since i graduated and don't have access to real equipment anymore and it works pretty well. if you're in school you can get it for something like $180. has a LA, scope, waveform gen and a few other things built in. not a bad deal.

Sagebrush
Feb 26, 2012

goldarnit. my arduino nano quit responding (must have brushed it with the 12v or something) and i lent my other one to a student (mistake) and she never returned it and now i have no more breadboard-sized AVR usb microcontrollers to test with.

how fast can amazon ship these things i wonder

e: oh nm i have a teensy 2.0. *digs through drawer of dozens of different mcu boards, complains i have nothing that'll work*

Sagebrush fucked around with this message at 20:42 on Jun 4, 2017

hobbesmaster
Jan 28, 2008

just jumper out from the arduino headers or w/e

Sagebrush
Feb 26, 2012

yeah but that's messy and consumes space :spergin:

silence_kit
Jul 14, 2011

by the sex ghost

Sagebrush posted:

i assume that's cause of leakage or tunneling or something as it gets closer to the breakdown voltage of the dielectric?

I didn't know about this, but I did a little bit of Google-searching, and found that the highest energy density ceramic capacitors with the highest dielectric constants are often made with dielectrics like barium titanate and related materials. A lot of materials in this class exhibit a lot of unusual effects like piezo-electricity (ac electricity <--> vibration conversion--this is probably why longview's circuit worked like a microphone) and ferro-electricity (the electrical analogue of a permanent magnet).

The micro-scopic theory of these materials gets some material scientists and condensed matter physicists really excited, and seems really complicated. Kind of like magnetic materials (loving magnets, how do they work?) these materials are probably not very well understood fundamentally and the microscopic theory is a mess and doesn't really make good predictions.

longview
Dec 25, 2006

heh.
my RIAA was mostly built with low value ceramics (C0G dielectric characteristic), AFAIK all ceramics are microphonic to varying degrees

film capacitors are pretty good, but they're also huge compared to ceramics or electrolytics

the piezoelectric effect + probably the C-V effect is why most high end audio circuitry uses film capacitors for AC coupling

they're also fairly common in AC line filters or things like class D amplifier output filters, i think power dissipation requirements are a big deal when choosing them there. a decent film capacitor for filtering will have specific ratings for maximum AC voltage across frequency.

tantalums are generally pretty good as local decoupling but forget about using them for line filters since they're probably the most fragile kind of capacitor in common use

spankmeister
Jun 15, 2008






I have some soviet surplus teflon film capacitors but they are MASSIVE.

Look good in tube amp projects tho.

silence_kit
Jul 14, 2011

by the sex ghost

spankmeister posted:

I have some soviet surplus teflon film capacitors but they are MASSIVE.

Look good in tube amp projects tho.

Yeah, the dielectric constant of Teflon is 2. The dielectric constant of the material in the previously mentioned Y5V capacitors is in the 1000's.

Sagebrush
Feb 26, 2012

probably better suited for idiot spare time projects thread but this is where i'm posting about mine so whatev

it's coming together!! teaser

hobbesmaster
Jan 28, 2008

does it play the theme from knight rider?

seems like it should

Sagebrush
Feb 26, 2012

i may put it in the video i will make when this thing is assembled! it can absolutely do a knight rider/cylon eye scanner effect

current state: i finally got the OLED fired up! far too difficult to interface with and the datasheet is, of course, quite poor, but check this poo poo out it's working: :woop: :wooper: :woop:



top strip will be the tachometer, bottom will be the indicator lights and/or coolant temperature and/or other stuff.

currently working on interfacing with the EERAM that i'm gonna use to store the mileage and other persistent stuff.

Luigi Thirty
Apr 30, 2006

Emergency confection port.

you know what to do

wire the LED strips up to show the loudness of your stereo

Raluek
Nov 3, 2006

WUT.

Luigi Thirty posted:

you know what to do

wire the LED strips up to show the loudness of your stereo

well, theres a good chance its actually mono, but that top one should already do that :q:

Zopotantor
Feb 24, 2013

...und ist er drin dann lassen wir ihn niemals wieder raus...

hobbesmaster posted:

does it play the theme from knight rider?

seems like it should

https://www.youtube.com/watch?v=U6ragUeIkKA

atomicthumbs
Dec 26, 2010


We're in the business of extending man's senses.

Sagebrush posted:

i have been workin on the motorcycle thing and hopefully should have some real cool results soon but i just gotta say god drat, it is SO nice having this digital oscilloscope. having the ability to sample 4 channels at once and pause waveforms and zoom in and watch every piece of the circuit doing its thing. like i'm looking at a trace of a 20-nanosecond-long ringing from the inductance of a 6 inch long piece of wire, holy poo poo. feelin like doctor manhattan: "I have witnessed events so tiny and so fast, they could hardly be said to have occurred at all."

fuckin bad. rear end.

every electronics hobbyist who doesn't own a DSO should go out and buy that rigol 1054 immediately

otoh, digital things are utterly lame and if your storage scope uses mostly solid state electronics you're a fuckin scrub

tek 564 or leave

Sagebrush
Feb 26, 2012

atomicthumbs posted:

otoh, digital things are utterly lame and if your storage scope uses mostly solid state electronics you're a fuckin scrub

tek 564 or leave

lol ok whatever dude. can your 564 do this

Sagebrush
Feb 26, 2012

embedded programming question: if you have a constant in your code, what might be the reasons to use either

#define SEXNUMBER 69

vs

const uint8_t sex_number 69;

?

I tend to use preprocessor directives for those things for no real reason other than that's what i got used to, but they both end up the same way after compilation iirc. is there an advantage to one or the other?

atomicthumbs
Dec 26, 2010


We're in the business of extending man's senses.

Sagebrush posted:

lol ok whatever dude. can your 564 do this



no, but I don't care because it has an AT&T Long Lines asset tag on it

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

Sagebrush posted:

embedded programming question: if you have a constant in your code, what might be the reasons to use either

#define SEXNUMBER 69

vs

const uint8_t sex_number 69;

?

I tend to use preprocessor directives for those things for no real reason other than that's what i got used to, but they both end up the same way after compilation iirc. is there an advantage to one or the other?

the preprocessor directive can be overridden with a compiler flag if you set it up with an #ifndef surround

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

Sagebrush posted:

I tend to use preprocessor directives for those things for no real reason other than that's what i got used to, but they both end up the same way after compilation iirc. is there an advantage to one or the other?

I always prefer const uint8_t sex_number = 69; because the compiler has type information it can propagate, which is especially useful when you crank the warnings way up

if it has any effect at all on code generation it should be positive (due to having more complete type information)

Spatial
Nov 15, 2007

i try to use static const for constants when I can, but sometimes it does cause issues. embedded compilers are often real stupid so it can lead to different code generation, even though you'd think any piece of poo poo can propagate a constant.

the compiler I use at work can't do this:
code:
static const uint32 fart = 100;
static const uint32 butt = fart + 1;
it complains that x isn't a constant expression.

Sapozhnik
Jan 2, 2005

Nap Ghost
the c standard doesn't let you do that unfortunately. you need c++ "constexpr" (ugh) to be able to do that.

you can define it as a freestanding enum constant though.

enum { fart = 100, butt = fart + 1 };

JawnV6
Jul 4, 2004

So hot ...

Sapozhnik posted:

the c standard doesn't let you do that unfortunately. you need c++ "constexpr" (ugh) to be able to do that.

heh, -O0 will still emit a ctor for constexpr

Spatial
Nov 15, 2007

the c standard sucks balls and when i become king i'm going to annihilate it from the surface of this earth

Cybernetic Vermin
Apr 18, 2005

nah, the c standard is one of the few reasonably complete language standards not entirely bound to a single implementation. javascript and c++ are the only other of relevance i can think of (common lisp has a great standard as well, but it came out when lisp was already passing out of relevance)

granted one can argue that .net/java or similar, which has a proper standard for the core language, is in a similar situation, but no software is produced against the standard, the entire platform, which is not standardized (nor, often, well documented), gets assumed

Cybernetic Vermin
Apr 18, 2005

i mean, in this context especially, one could streamline the c standard a ton if one just assumed a reasonable workstation or similar, but the value proposition of the standard is that it really does define a minimal level an implementation must reach to be called c. in practice a lot of embedded stuff still fails that bar, but then they at least can document what is non-standard, and it becomes a manageable little list, as compared to writing a whole specification for the fragment

Spatial
Nov 15, 2007

cool respectable programmer: what happens if i shift an integer to the right, the c standard?
the c standard (idiot): i dunno!!

cue laugh track

hobbesmaster
Jan 28, 2008

Spatial posted:

cool respectable programmer: what happens if i shift an integer to the right, the c standard?
the c standard (idiot): i dunno!!

cue laugh track

huh? http://port70.net/~nsz/c/c11/n1570.html#6.5.7

quote:

The result of E1 >> E2 is E1 right-shifted E2 bit positions. If E1 has an unsigned type or if E1 has a signed type and a nonnegative value, the value of the result is the integral part of the quotient of E1 / 2E2 . If E1 has a signed type and a negative value, the resulting value is implementation-defined.

how can a shift of a negative number anything other than implementation defined? assuming that's what you're complaining about

Adbot
ADBOT LOVES YOU

Sapozhnik
Jan 2, 2005

Nap Ghost
well, shifting by more than the word size is also undefined. on some arches you get zero, on others the high-order bits of the shift parameter are ignored.

  • Locked thread