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
BattleMaster
Aug 14, 2000

Got it; more blood.



This amplifier is bananas. I've never seen sensitivity specced out in per single electron before

Adbot
ADBOT LOVES YOU

Splode
Jun 18, 2013

put some clothes on you little freak
I am Afraid

HorseLord
Aug 26, 2014

BattleMaster posted:

Imo find a 12v 1w bulb

That's the most obvious solution which means that I tried to do that before I decided to do this instead.

The bulb in question is an expensive and very bright red LED with a MES screw fitting (so it can fit in a bike dynamo tail light) and I can't find an equivalent in 12V. This was fine before but now it's being used on an ebike with a bunch of 12V automotive accessories, and the bulb's overvoltage protection cuts off at 9V. Literally my only other option would be to concoct a way of fitting an entire real motorcycle lamp on the back, and no thanks. Resistors cost pennies.

peepsalot posted:

To go into some more detail

P = V * I
1W / 6V = 1/6 A current for your bulb.

The resistor needs to drop 6V at (1/6)A
R = V/I
R = 6V / (1/6)A = 36 Ohms

36 ohm is not a standard value, and 1W is slightly uncommon, so you parallel a bunch of higher resistance to get the exact desired resistance.
For example 36*5 = 180
So parallel 5x 180 Ohm resistors @ 1/4W should work great.

Thank you. I have some of those in the house already.

His Divine Shadow
Aug 7, 2000

I'm not a fascist. I'm a priest. Fascists dress up in black and tell people what to do.
Been researching a pulser unit for my welder a bit more.

Got this diagram someone else built using an arduino and multiplexer:


As far as I understand it, this won't work for my welder as all this is based on 5V and my welder used 0-10V to infer welding current instead. I think I could replace the arduino with the kind of PWM module I linked earlier and run it from it's own 5V source. But the multiplexer here only works up to 5V. I was considering getting a HEF4051 multiplexer which handles voltage up to 15V.

But I also only need a really simple circuit, two inputs, one output, determined by another input, and that seems to be this circuit, cobbled togehter from just four transistors would do the job just fine:
https://www.electronics-tutorial.net/Digital-CMOS-Design/Pass-Transistor-Logic/2-1-MUX-using-transmission-gate/

I think this would work, looks simple and primitive. Some people have warned about interference from the welder and not using intergrated circuits, but the original circuit in the picture worked fine while using several IC's so I dunno if that's a problem worth bothering about. Someone also suggested to build a circuit like in the link but using relays instead of transistors. But I don't see why I would need to do this either, it's just a low voltage circuit after all, just how suspectible would a transistor be to potential interference.

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
I guess take with a grain of salt, because this is one of those things where there are a million ways to do it:

I'd probably skip the mux entirely, read the pots with your Arduino, and then output PWM to a transistor that then has a low pass filter, making a pretty basic DAC with the 10V rail

His Divine Shadow
Aug 7, 2000

I'm not a fascist. I'm a priest. Fascists dress up in black and tell people what to do.
I don't have an arduino and I have never used one. I kinda want to avoid involving any arduino, which is why I wanted to replace it with a ready made PWM generator from ebay, it has all the controls already so I only need one pot between the pedal to create the low setting of the square wave.

asdf32
May 15, 2010

I lust for childrens' deaths. Ask me about how I don't care if my kids die.

BattleMaster posted:

Kilowatts and whole amps are a different world from what I'm used to in radiation detection. I live in a land of gigaohms and kilovolts and picoamps.

I'm having trouble figuring out proper grounding practices though. Here's a picture of the charge-sensitive preamplifier I built:



The circuit board has a ground plane on the back side of it except near the high voltage stuff. Originally the board was grounded to the chassis in only one area, the black wire leading to the solder tab around the BNC connector on the right of the photo. This seemed like it would be fine because the resistance between the shield of the SHV connector on the left and any other grounded part in the circuit was the same resistance of like 0.1 ohms (which is like the resistance of my leads.)

However if I plugged a cable into that SHV connector on the left, the cable seemed to act as an antenna even if it was terminated with a proportional counter. Like I was getting really bad 100 MHz noise with a 1-foot cable and really bad 40 MHz noise with a 3-foot cable.

As a test I added the second chassis ground wire on the left, to the tab on the SHV connector. Everything is good now.

Why was that second ground connection the difference between really bad performance and good performance?

edit: this thing is sensitive to a fraction of a picocoulomb so even with a shielded proportional counter hooked up to it and the cover screwed on, I get spikes on my scope from static generated by moving around in my seat nearby, so I guess it's no wonder that weird stuff would cause it to get noise, but I figured the grounding situation was fine originally but I guess not???

edit 2:



I didn't take a picture of what it looked like before I added the second ground connection. That's a pulse from a proportional counter with a built-in alpha test source.

Without the second ground connection the noise was so bad it would have made that pulse impossible to see, while with it the noise is more or less the same as the noise seen by the scope with nothing plugged into it. Why did that make such a difference????

I have some experience working with pA circuits (I remember exactly your experience: it could detect any nearby movement) and precision measurement in general.

I don't think there is any single answer to grounding: it comes down to diagraming our your exact circuit and inserting the stray R's, L's and C's to see what the system actually looks like. At first I'd probably imagine the metal shell is tied to your amplifier input ground (and tied well, right at that pin, maybe with a standoff or braid). But you'd want to understand how the amplifier output is related to this, what the power scheme is, where other powered components are etc.

Did you include guard traces on the board around the amplifier input? Does the manufacturer have app notes or demo boards.

Finally theory doesn't really matter if one configuration works measurably better.

ANIME AKBAR
Jan 25, 2007

afu~

BattleMaster posted:

Kilowatts and whole amps are a different world from what I'm used to in radiation detection. I live in a land of gigaohms and kilovolts and picoamps.

I'm having trouble figuring out proper grounding practices though. Here's a picture of the charge-sensitive preamplifier I built:



The circuit board has a ground plane on the back side of it except near the high voltage stuff. Originally the board was grounded to the chassis in only one area, the black wire leading to the solder tab around the BNC connector on the right of the photo. This seemed like it would be fine because the resistance between the shield of the SHV connector on the left and any other grounded part in the circuit was the same resistance of like 0.1 ohms (which is like the resistance of my leads.)

However if I plugged a cable into that SHV connector on the left, the cable seemed to act as an antenna even if it was terminated with a proportional counter. Like I was getting really bad 100 MHz noise with a 1-foot cable and really bad 40 MHz noise with a 3-foot cable.

As a test I added the second chassis ground wire on the left, to the tab on the SHV connector. Everything is good now.

Why was that second ground connection the difference between really bad performance and good performance?

edit: this thing is sensitive to a fraction of a picocoulomb so even with a shielded proportional counter hooked up to it and the cover screwed on, I get spikes on my scope from static generated by moving around in my seat nearby, so I guess it's no wonder that weird stuff would cause it to get noise, but I figured the grounding situation was fine originally but I guess not???

edit 2:



I didn't take a picture of what it looked like before I added the second ground connection. That's a pulse from a proportional counter with a built-in alpha test source.

Without the second ground connection the noise was so bad it would have made that pulse impossible to see, while with it the noise is more or less the same as the noise seen by the scope with nothing plugged into it. Why did that make such a difference????

If the difference is that huge when adding the second ground wire, then something besides the standard RF voodoo bullshit must be going on. Especially since neither of those wires is a particularly excellent connection, it doesn't make sense that two would be far better than one.

Are you certain that the two ground pads you're soldering those wires to are internally connected on the board? Can you post your layout artwork?

BattleMaster
Aug 14, 2000

ANIME AKBAR posted:

If the difference is that huge when adding the second ground wire, then something besides the standard RF voodoo bullshit must be going on. Especially since neither of those wires is a particularly excellent connection, it doesn't make sense that two would be far better than one.

Are you certain that the two ground pads you're soldering those wires to are internally connected on the board? Can you post your layout artwork?



There are test boards available for this chip and we have a couple of them. I ripped off the schematic but laid it out a little more sparsely on a larger board. Like the original it has a ground fill on the underside except near the high voltage stuff, and multimeter checks before and after assembly show that the ground connections seem to all check out.

There aren't any guard traces on the original and guard traces aren't described as a recommendation in the datasheet and application notes. (for that matter I've seen guard trace and triaxial connectors and such on electrometers for ionization chambers, but never on charge-sensitive preamplifiers for pulse processing like this one, so I have no clue if that's something that would have been nice to have here.)

Here's the test board schematic; it's identical to mine but neater:



With the second ground connection added, my board performs as well as the official board, at least as far as I can tell with the instruments I have.

edit: Here's the original board layout for completeness, but it doesn't show traces

BattleMaster fucked around with this message at 02:05 on Nov 3, 2019

Hexyflexy
Sep 2, 2011

asymptotically approaching one
The A250 costs about $400, I'm trying to think of a really creative way to ask my employer for one. Like, it'd be really useful if the FPGA I'm programming got taken out of standby by a gamma ray burst in the next galaxy. I really want an electron detector, for no particular reason :D

BattleMaster
Aug 14, 2000

Hexyflexy posted:

The A250 costs about $400, I'm trying to think of a really creative way to ask my employer for one. Like, it'd be really useful if the FPGA I'm programming got taken out of standby by a gamma ray burst in the next galaxy. I really want an electron detector, for no particular reason :D

If you convince them be sure to :justpost: whatever you make with it!

If you want to use the 2SK152 JFET that the AmpTek documentation has a bunch of performance specs for, I discovered that it's some old Japanese-only part but there's an equivalent one made by InterFET that I was able to find for sale on Mouser. Datasheet: https://www.interfet.com/jfet-datasheets/jfet-ifn152-interfet.r00.pdf

A Lone Girl Flier
Sep 29, 2009

This post is dedicated to all those who fell by the forums, for nothing is wasted, and every apparent failure is but a challenge to others.
I picked a fancy light flasher as my first electronics project and am struggling with it.

I found one of these:


It has a six volt incandescent lamp inside.

I wanted to make it "breathe" instead of flashing, so I tried building this:



Substituting the 6v lamp for the the LED and 2k resistor, and a 5v power supply for the battery.

When I built it, the lamp just stayed on dimly. Any ideas as to what I'm doing wrong?

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
I haven't run the numbers on your 555 circuit or used one in probably over 5 years, so this is all off the cuff:


I'd bet that you're getting a fixed, fast frequency. That "dimly lit" appearance is actually, say, 50% duty cycle at 1000Hz (not actually those numbers though).

From gut feel, there should be no way you can get a breathing effect without using two 555s. One of them controls the "breathe rate" at, say, 1/2Hz, and the other controlling the output PWM, at some variable value from 0-100% at a high-ish frequency to simulate dimming.

ante fucked around with this message at 09:24 on Nov 5, 2019

Foxfire_
Nov 8, 2010

Thinking about what exactly putting the emitter not at ground does hurts my brain. Move it to the other side of the LED?

A Lone Girl Flier
Sep 29, 2009

This post is dedicated to all those who fell by the forums, for nothing is wasted, and every apparent failure is but a challenge to others.

Foxfire_ posted:

Thinking about what exactly putting the emitter not at ground does hurts my brain. Move it to the other side of the LED?

That's what someone off-site suggested too. Will try it tomorrow.

Thanks for your responses!

Shame Boy
Mar 2, 2010

Foxfire_ posted:

Thinking about what exactly putting the emitter not at ground does hurts my brain. Move it to the other side of the LED?

I used to do that crap before I had fully figured out how transistors work :v:

It works, sort of, sometimes. Until it doesn't.

Here's where they got that circuit from if anyone's interested:

https://www.instructables.com/id/LED-fading-with-a-555-timer/

It looks like putting the components that way was intentional, for... some... reason...

Can you get the circuit working with an LED? Maybe that 2K resistance + LED voltage drop is critically important to this circuit, and replacing it with the (relatively much lower) resistance of the bulb is screwing it up?

Shame Boy
Mar 2, 2010

Yeah it's definitely using the transistor as part of the timing circuit... somehow:

quote:

The rate of the LED fading in and out can easily be modified by playing around with different resistor or capacitor values. You can even add a linear potentiometer or photo resistor in place of the 20K Ω resistor and see how it affects the LED. Removing the transistor will produce a blinking LED affect instead of the fading affect. You can also connect the circuit to an oscilloscope and visually see the pulse signal being produced by the 555 timer. Tinker around and have fun with your new pulsing LED!

I guess the forward turn-on voltage of the transistor is affecting... something...? This circuit hurts my head.

Shame Boy
Mar 2, 2010

I drew it up in the only simulator I have on my work computer (lol) and it does in fact "breathe" when it has an LED, by wobbling around enough to cause current to increase and decrease a tiny amount. The LED never fully turns off or on, it just... wobbles... and It's not actually doing any sort of PWM, it's just... wobbling.... What a weird little circuit.

It does appear to "work" with an incandescent bulb and the 2K resistor, but it's only running 1-2mA through the bulb so I'd be amazed if that's even emitting visible light. Removing the 2K resistor kills the oscillation and leaves it at a steady 40mA.

Anyway I think you'd be better off finding a different circuit, like one that uses 2 555 timers as was mentioned, or something like that. This is a weird nifty circuit but it doesn't seem particularly well suited to doing anything other than making an LED wobble.

e: I think I get how it's working now though, the 555 is generally set up to make a triangle wave by charging and draining the capacitor, which normally you'd just use to base its square wave output on, but this is using that triangle wave directly to drive the LED. The transistor is there to buffer it somewhat because otherwise the LED would severely affect the oscillation (hence why it turns into a "blinking" circuit when the transistor is removed.)

You can actually sorta get it working with the incandescent bulb, if you adjust the resistance value of the 20K resistor, add a resistor to the transistor base to limit current, put the bulb over the transistor and remove the 2K resistor entirely. I still say you should find a different design though since this one is... touchy :v:

Shame Boy fucked around with this message at 16:12 on Nov 5, 2019

Shame Boy
Mar 2, 2010

Here's the one I got working in iCircuit if you want to play with it, I added a second transistor to make a darlington array so I could increase the base resistor high enough that its affect on the rest of the circuit was negligible, but it can still switch the ~100mA needed by the lamp:



The transistors in this design are going to get mighty toasty though since they're operating linearly, I'd still say go with a different solution if you're going to leave this running for a long period of time.

Shame Boy fucked around with this message at 16:24 on Nov 5, 2019

insta
Jan 28, 2009
This is 11 lines of code with a 20 cent micro, a single FET, and a gate resistor.

A Lone Girl Flier
Sep 29, 2009

This post is dedicated to all those who fell by the forums, for nothing is wasted, and every apparent failure is but a challenge to others.
Awesome! Thanks heaps everyone. I'm gonna go research these options and build my favourite one.

What I learned from this is it's better to try a new design out on breadboard rather than soldering on protoboard.

Sagebrush
Feb 26, 2012

insta posted:

This is 11 lines of code with a 20 cent micro, a single FET, and a gate resistor.

Amen

Anyone starting out in electronics in tyool2019 needs to buy a handful of attinys and a programmer, not 555s

Jaded Burnout
Jul 10, 2004


Gang tag contest!

https://forums.somethingawful.com/showthread.php?threadid=3903115

KnifeWrench
May 25, 2007

Practical and safe.

Bleak Gremlin

Ohm's Lawyers

Shame Boy
Mar 2, 2010

Sagebrush posted:

Amen

Anyone starting out in electronics in tyool2019 needs to buy a handful of attinys and a programmer, not 555s

I don't know, I think there's still a lot to learn and fun to be had playing with stuff like the 555. A kit with a breadboard, some wires, a few 555's and some resistors and capacitors and LED's is ultra-cheap, and you can do it without needing a laptop standing by or having to install software or anything. There's still something very fun to me in playing around with a physical thing where messing with the pieces changes how the thing operates, especially nowadays when everything is touch screen buttons and out of the box firmware updates and such.

But ultimately yeah you should then learn to do this stuff with a microcontroller since that's just how things are done today and it's cheaper and easier in the long run :shrug:

Dairy Days
Dec 26, 2007

you kids and your "integrated circuits"

but I bet a true greybeard would somehow use the lightbulb as an integral component of the oscillator
edit: misread the original post, the circuit also works with LEDs

(don't do any of this unless you already have a book of resistors and capacitors)

Dairy Days fucked around with this message at 20:42 on Nov 5, 2019

Foxfire_
Nov 8, 2010

If you want to stay hardware-y instead of software-y, but still more modern than 555s, a minimal circuit for a cpld can be pretty simple too.

shovelbum
Oct 21, 2010

Fun Shoe

Sagebrush posted:

Amen

Anyone starting out in electronics in tyool2019 needs to buy a handful of attinys and a programmer, not 555s

can you recommend a programmer from attinys and a good way to start programming for them?

Splode
Jun 18, 2013

put some clothes on you little freak

Shame Boy posted:

But ultimately yeah you should then learn to do this stuff with a microcontroller since that's just how things are done today and it's cheaper and easier in the long run :shrug:

It's not cheaper or how it's done in industry. If you were building this as a product there's no way you'd use a micro (unless you need a bunch of other features, and that's only because we live in the age of the internet of poo poo).

It's only cheaper and easier for a one off hobby build, and this is a great problem to practice analogue electronics with.

I do agree that triple 5s are pretty old school though. I've only seen them used very occasionally, but there's usually a more specialised IC for a similar price or you just do it discrete like a real EE

Splode
Jun 18, 2013

put some clothes on you little freak

Dairy Days posted:

you kids and your "integrated circuits"

but I bet a true greybeard would somehow use the lightbulb as an integral component of the oscillator
edit: misread the original post, the circuit also works with LEDs

(don't do any of this unless you already have a book of resistors and capacitors)

Hell yeah this is the best one.

Stabby McDamage
Dec 11, 2005

Doctor Rope

shovelbum posted:

can you recommend a programmer from attinys and a good way to start programming for them?

USBasp. You program them just by hooking the pins where it says, installing the ATtiny package in Arduino, choosing your chip model, and hitting the same upload button you'd hit on an Uno.

http://riteshkhanna.com/2016/04/20/programming-attiny45attiny85-with-a-usbasp-avr-programmer/

https://www.instructables.com/id/The-Idiots-Guide-to-Programming-AVRs-on-the-Chea/

Stabby McDamage fucked around with this message at 21:34 on Nov 5, 2019

VictualSquid
Feb 29, 2012

Gently enveloping the target with indiscriminate love.

shovelbum posted:

can you recommend a programmer from attinys and a good way to start programming for them?
Buy an Arduino or something. You can use it as a programmer.
A cheap one goes for the same price as a small bag of 555s.

Or an R-Pi. It can program attinys over the GPIO.
https://www.rototron.info/raspberry-pi-avr-programmer-spi-tutorial/

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
There is also this thing from Sparkfun if you want a ready made thing.

https://www.sparkfun.com/products/11801

Shame Boy
Mar 2, 2010

Splode posted:

It's not cheaper or how it's done in industry. If you were building this as a product there's no way you'd use a micro (unless you need a bunch of other features, and that's only because we live in the age of the internet of poo poo).

It's only cheaper and easier for a one off hobby build, and this is a great problem to practice analogue electronics with.

I do agree that triple 5s are pretty old school though. I've only seen them used very occasionally, but there's usually a more specialised IC for a similar price or you just do it discrete like a real EE

I guess it depends on what market we're talking about then, because it seems like 'anonymous 8-pin chip' microcontrollers are in most of the consumer crap Big Clive takes apart, even when they're not really needed at all :v:

I like doing stuff without a microcontroller unless it's genuinely called for too, just seems like that's a less and less popular opinion.

shovelbum
Oct 21, 2010

Fun Shoe

VictualSquid posted:

Buy an Arduino or something. You can use it as a programmer.
A cheap one goes for the same price as a small bag of 555s.

Or an R-Pi. It can program attinys over the GPIO.
https://www.rototron.info/raspberry-pi-avr-programmer-spi-tutorial/

I've got plenty of both lying around, I'll get a ZIF and a sack of Tinys and be in business, good call.

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS

Shame Boy posted:

I guess it depends on what market we're talking about then, because it seems like 'anonymous 8-pin chip' microcontrollers are in most of the consumer crap Big Clive takes apart, even when they're not really needed at all :v:

I like doing stuff without a microcontroller unless it's genuinely called for too, just seems like that's a less and less popular opinion.

Yeah, I would say the jellybean microcontroller for everything is industry standard now

Sagebrush
Feb 26, 2012

shovelbum posted:

can you recommend a programmer from attinys and a good way to start programming for them?

USBasp, under $5 on eBay, and a 10-pack of ATTiny85s, $15.

https://www.ebay.com/itm/USBASP-USBISP-AVR-Programmer-Adapter-10-Pin-Cable-USB-ATMEGA8-ATMEGA128-Arduino/323636672471

https://www.ebay.com/itm/10-PCS-ATTINY85-20PU-ATTINY85-MCU-8BIT-8KB-MICROCONTROLLER-SHIPPED-FROM-USA/282315153031

From that point you're basically doing Arduino stuff so get yourself one of the little $25 Elegoo/SainSmart starter kits and go hog wild.

Shame Boy posted:

I guess it depends on what market we're talking about then, because it seems like 'anonymous 8-pin chip' microcontrollers are in most of the consumer crap Big Clive takes apart, even when they're not really needed at all :v:

I like doing stuff without a microcontroller unless it's genuinely called for too, just seems like that's a less and less popular opinion.

I appreciate the elegance of a good analog electronic circuit (the filter I built to turn a noisy 350v motorcycle ignition spike into a clean TTL pulse, using only analog parts, is one of my favorite designs and also probably the most reliable electronic device I've ever built) but most of the time I just want something that works right now and christ it is so much faster to do 95% of the stuff with a microcontroller. Want to change the "breathing" rate of that LED? Well I guess I could dig out a calculator and hope I have the right components, or I could change a number and press ctrl-U

Sagebrush fucked around with this message at 22:32 on Nov 5, 2019

Foxfire_
Nov 8, 2010

If it were a real high volume product, microcontroller vs discrete parts would probably come down to:

(1) How much space are you allowed?
(2) Are you allowed to burn power in a partially on FET?
(3) How nice of a fade-on/fade-off schedule do you need?

A microcontroller is $0.30 [+preprogramming costs], a 555 timer or an op amp is $0.10, FETs are a couple pennies, resistors and caps are rounding errors.

1 timer for linear FET is same size and 1/3 the cost of the MCU
2 timers for PWM FET is bigger and 2/3 the cost of the MCU

The timers will be less flexible fades since you only get 2-3 before the MCU is cheaper + easier + smaller.

I guess you could build your oscillators out of discrete transistors instead of ICs for cheaper, but it'll get huge.


ATTiny's aren't very good learning microcontrollers in my opinion. You want something with enough pins to dedicate to a debugging interface to poke around. Debugging a 4 IO pin MCU involves a lot of staring and thinking.

Foxfire_ fucked around with this message at 06:07 on Nov 6, 2019

Splode
Jun 18, 2013

put some clothes on you little freak
Every product I've worked on has had a microcontroller, but it's usually because every product does more than one thing. I've opened plenty of $2 Halloween decoration type things with no micro.

This is the learning electronics thread though, and discrete circuits teach you the most on a per project basis. And all the stuff they teach is important

Adbot
ADBOT LOVES YOU

Shame Boy
Mar 2, 2010

Foxfire_ posted:

A microcontroller is $0.30 [+preprogramming costs]

Aren't those ultra-cheap Padauk ones like 3 cents or something? I'm assuming all the micros in cheap crap are that thing.

Anyway yeah if you actually want to get into and learn electronics, build stuff out of discrete components or logic chips or stuff like that. If you just want to get your project done and move on with your life, get a microcontroller :shrug:

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